I want to know is there any option to create apps for android with AS2 or not? Flex? Adobe AIR?
-
none for as2 solely AFAIK, but why in the 1st place ? – George Profenza Oct 23 '11 at 15:49
-
might be possible to wrap/load an as2 swf into an as3 air-android app, but haven't tried yet – George Profenza Oct 23 '11 at 15:51
2 Answers
Yes, you can create installable AIR applications for Android; one article covering this is Getting started with Adobe AIR for Andorid
Flash Professional CS5 has an AIR for Android plugin which turns AIR apps into installable Andorid apps.

- 8,377
- 2
- 25
- 34
-
1This doesn't quite answer the question. It seems like it possible to create AS2 AIR apps; but you won't have access to any AIR specific APIs: http://www.mikechambers.com/blog/2008/08/18/anyone-using-actionscript-2-to-build-air-applications/#comment-13360 – JeffryHouser Oct 23 '11 at 18:29
-
@www.Flextras.com: that link was talking about desktop.. the same thing isn't possible on Android. – fenomas Oct 25 '11 at 08:07
-
@Phil: the question here is about making AIR/Android apps **in AS2**, not how to make them generally. – fenomas Oct 25 '11 at 08:10
The short answer is no. AIR is the way you make ActionScript apps for Android, but unfortunately the Android AIR runtime does not include the AS2 virtual machine - it just doesn't know how to play AS2 content, period. (This was done partly to keep Android AIR parallel to iOS, where AS2 content can't run because Apple doesn't allow runtime interpretation).
The slightly broader answer is, technically you can get AS2 into an AIR for Android app, but only via the browser. The StageWebView class lets your AIR/Android app show HTML content, and it does that by instantiating a limited version of the device's native browser. So you can show browser flash (including AS2) inside AIR as long as the device's native browser has a Flash player. (This doesn't work on iOS ;D ) But you should avoid this method if at all possible - it will probably work differently on different devices and your Flash content won't be able to use AIR APIs, and I'd expect other problems as well. (How the security sandboxes work I don't even want to consider..)
I'm afraid the only "good" solution is to port to AS3.

- 11,131
- 2
- 33
- 57