flash - Adobe flex can't load module using ModuleLoader -
main.swf
<?xml version="1.0"?> <!-- modules/stylemodloaderapp.mxml --> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <s:layout> <s:verticallayout/> </s:layout> <fx:style> @namespace s "library://ns.adobe.com/flex/spark"; s|button { color:blue; cornerradius:10; } </fx:style> <s:vgroup> <s:moduleloader id="ml1" url="mod1.swf"/> </s:vgroup> <s:button id="mybutton" label="main app button"/> </s:application> mod1.swf
<?xml version="1.0"?> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:style> @namespace s "library://ns.adobe.com/flex/spark"; s|button { color:red; } </fx:style> <s:vgroup> <s:label id="lab1" text="module 1"/> <s:button id="mybutton1" label="mod1 button"/> </s:vgroup> </s:application> why can happening?
both main.swf , mod1.swf in same folder, main.swf executes fine, there no mod1.swf button, should loaded, dwadwadwafeaf
just rename application tag module in mod1.swf. module loader not able handle application tagged swf.
Comments
Post a Comment