Can't load secondary swf in iOS
I simplified this example as much as possible.
Debug works great with fast, but as soon as I try debugging with Standard the application crashes.
I created an empty Flex Mobile Project. The only thing I added was code to load the secondary swf, called when I click on the stage:
_urlPath = "assets/swf/secondary.swf";
var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
var loader:Loader = new Loader();
loader.load(new URLRequest(_urlPath), loaderContext);
sve.addChild(loader); //<s:SpriteVisualElement id="sve"/>
secondary.swf is an a Flex Project with only a spark Image component
When I load secondary.swf I get the following error:
[SWF] MainMobileProect.swf - 227,964 bytes after decompression
[SWF] assets/swf/secondary.swf - 59,177 bytes after decompression
TypeError: Error #1034: Type Coercion failed: cannot convert mx.styles::StyleManagerImpl@10ae01f11 to mx.styles.IStyleManager2.
at _Secondary_FlexInit$/init()
at _Secondary_FlexInit$/init()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()
at mx.preloaders::Preloader/timerHandler()
at mx.preloaders::Preloader/timerHandler()
at flash.utils::Timer/tick()
