Play SWF file in Android using Adobe AIR.
Copy link to clipboard
Copied
Hi All,
I have a group of SWF files. I want to play these files in my Android Application using Adobe AIR. Is it possible? If yes, can anyone tell me how to do this.
Copy link to clipboard
Copied
Is it a plain ActionScript3 project? if so, from memory, this should be enough:
var loader:Loader = new Loader();
loader.load(new URLRequest("yourswf.swf"));
addChild(loader);
Of course, you can get more control over the loading process, this may result in error if you paste down the code as is in a class that is not a subclass of DisplayObjectContainer, etc.
Copy link to clipboard
Copied
Hi,
Thanks for your quick reply. Its pure ActionScript file and the SWF file has .js and .xml supporting files. I heard .js file only runs in the web browser. Is it run in Android?
Can this SWF file runs on Android 4.0 and above.
Copy link to clipboard
Copied
I don't recall if Flash Professional or Flash Builder generate any XML file. If there is any file that your external .swf file really needs to work, just make sure that .swf file access to it, so if your .swf is packaged inside the final APK binary, package the supporting files as well.
Copy link to clipboard
Copied
I find two methods to from this guide on how to easily play SWF on Android
Approach One: Top 2 SWF Players on Android (Free of Charge)
Approach Two: Convert SWF to Android video format with iDealshare VideoGo
