
Код AS3:
public function Main():void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.DEACTIVATE, deactivate);
// touch or gesture?
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
// entry point
//Security.allowDomain("*");
//Security.allowInsecureDomain("*");
init();
}
private function init():void
{
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
_loader.load(new URLRequest("http://application.test/slots/BaseEngine.swf"));
}
private function onLoadError(e:Event):void
{
trace("ERROR");
}
private function onLoadComplete(e:Event):void
{
trace("!!!");
addChild(e.target.content);
}
private function deactivate(e:Event):void
{
// auto-close
NativeApplication.nativeApplication.exit();
}
в такой ситуации просто заходит в функцию onLoadError