I am trying load a png image from a url for an AIR app that is tobe deployed in Ipad. I am using air 3.6 Below is a simplified version of my code:-
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, onIconLoaded);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, function(event:ErrorEvent):void {
trace('security sandbox error ignored');
});
var context:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
trace("going for image load");
loader.load ( new URLRequest("some url"), context );
private function onIconLoaded(event:flash.events.Event):void
{
trace("image loaded");
var info:LoaderInfo = event.target as LoaderInfo;
addChild(info.content);
}
This works perfectly fine inside adobe flex builder (tried with 4.6 & 4.7). It also works fine in ipad when done fast packaging. But after doing 'export release build' the whole app is getting hanged whenever I try to download the image using the above code snippet.
Can anyone point me what could be the problem?
This is a bug on adobe air. The issue is there for AIR 3.4. In adobe bug base this is tracked under Bug ID - 3320777 & Bug ID - 3519108. The only way to get around this problem is to load your first remote file a image file.