开发者

Why is loaderInfo available only after applicationComplete fires?

In an AS3 project, we can access loaderInfo in the first line of the root class' constructor. This means that the entire AS3 application can take advantage of the loaderInfo object.

However, in Flex, it seems that the loaderInfo object is not available until after the applicationComplete event is sent. This is problematic for me, as other components (that need to leverage load开发者_运维百科erInfo) are initialized long before the applicationComplete event is sent.

I must be missing something. Thanks for your help, everyone! :)


Use Application.application.systemManager.stage.loaderInfo in Flex.

See: http://www.actionscript.org/forums/showthread.php3?p=938460&posted=1#post938460


Or for Flex 4:

FlexGlobals.topLevelApplication.systemManager.stage.loaderInfo


Because the applicationComplete event occurs when the application layout is added to the displaylist, so until then stage is not available.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜