Copy link to clipboard
Copied
Hello
Can android AIR and IOS AIR app download and play external SWF with code inside?
I have created android AIR app(SDK version 4.0) which load external swf with simple movie clip on the scene.
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
loader.load(new URLRequest("2.swf"));
function onLoaded(e:Event):void
{
addChild(loader);
}
I have installed this android AIR app on device but i do not see external swf on the scene.
Thanks in advance
you must add the external swf to the included files. and for ios you must assign the loadercontext property.
Copy link to clipboard
Copied
you must add the external swf to the included files. and for ios you must assign the loadercontext property.
Copy link to clipboard
Copied
So for ios as3 code must be like this one.?
var _urlRequest:URLRequest = new URLRequest("2.swf");
var _loader:Loader = new Loader();
var _lc:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
_loader.load(_urlRequest, _lc);
addChild(_loader);
One more question: How exactly i can add the external swf to the included files?
Can you give link with information or some sample? Also, does it work on Android Air?
If you have sample for ios Air or for Andoid Air i will be very appreciative.
Sorry for my english.
Copy link to clipboard
Copied
yes, to your loadercontext question.
and in the edit application settings > general tab is an included files text area where you can add files and directories.
Copy link to clipboard
Copied
Thanks for information
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now