<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" cornerRadius="20" borderStyle="solid" alpha="1.0" styleName="global" verticalGap="1"
creationComplete="initApp(event)" >
<mx:ModuleLoader id="m1" url="module1.swf" creationComplete="initModule1(event)" x="0" y="0" width="120" height="100%" paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0"/>
<mx:ModuleLoader id="m2" url="module2.swf" x="0" y="0" width="100%" height="100%" paddingTop="5" paddingBottom="5" paddingLeft="5" paddingRight="5"/>
</mx:Application>
module1.mxml:
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" creationComplete="initModule(event)">
事件调用顺序:
initModule(event) --> initModule1(event) --> initApp(event)
即先调用模块中的creationComplete事件,再调用moduleLoader中的creationComplete事件,最后调用主程序Application中的creationComplete事件。
Flex中含有ModuleLoader的creationComplete事件顺序
最新推荐文章于 2017-10-11 00:13:00 发布