AIR 3.8 & Flash Builder 4.6 for iOS - loaded SWF with ABC works on fast packaging but not on release
I have a simple Flex Mobile project that just allows user to swap between 2 different .swf games. I load the .swf with the following code:
private function loadFile(f:String😞void{
var _urlRequest:URLRequest = new URLRequest(f);
var _loader:Loader = new Loader();
var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded);
_loader.load(_urlRequest, _lc);
txt.text="loading";
// add loader to container
grp.addChild(_loader);
}
private function onSWFLoaded(e:Event😞void {
// status text to show it loaded
txt.text="loaded!";
}
Then on user button click I just do:
loadFile("file1.swf");
file1.swf is packaged into the build. I run this on debug under fast packaging on my iPod Touch and everything works like a charm, but when I do an export release build, my status text still says "loaded", but the swf loads very strangely - as if there's some code that is failing to run properly.
Since it works on fast packaging with no issue, what would be the difference between release build and fast build that can cause code in child swfs to fail? From everything I have read, since AIR 3.6 child swf with actionscript code is supported as long as they are packaged to the build, so I'm not sure why this is failing.
Any ideas would be appreciated.
Thanks.
