Skip to main content
Known Participant
April 4, 2017
Question

Can't load secondary swf in iOS

  • April 4, 2017
  • 1 reply
  • 374 views

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()

This topic has been closed for replies.

1 reply

Participating Frequently
May 30, 2017

I suspect this is related to these issues:

Tracker

AIR-4198266

Tracker

AIR-4194914

Try using AIR 22 and see if that fixes your issue.