Quantcast
Channel: Adobe Community : Unanswered Discussions - AIR Development
Viewing all articles
Browse latest Browse all 2010

AIR 3.8 & Flash Builder 4.6 for iOS - loaded SWF with ABC works on fast packaging but not on release

$
0
0

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:

 

privatefunction loadFile(f:String):void{  
           
var _urlRequest:URLRequest=newURLRequest(f);
           
var _loader:Loader=newLoader();
           
var _lc:LoaderContext=newLoaderContext(false,ApplicationDomain.currentDomain,null);
            _loader
.contentLoaderInfo.addEventListener(Event.COMPLETE, onSWFLoaded);
            _loader
.load(_urlRequest, _lc);
            txt
.text="loading";
           
// add loader to container
            grp
.addChild(_loader);
       
}
       
privatefunction 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.



Viewing all articles
Browse latest Browse all 2010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>