Anyone using ActionScript 2 to build AIR applications?
The title pretty much sums it up. Is anyone using ActionScript 2 as the root content of an AIR application? or know or any AIR apps built with ActionScript 2 at the root content?
Note that Im not talking about AIR applications that are built in ActionScript 3 that contain AS2, but rather AIR applications that has its main root content as AS2 content.
Also, if you are using AS2 content in an AS3 or HTML based AIR application, what are you using it for.







I didn’t even know that was possible. In the Flash CS3 Publish Settings, choosing AIR as the player version sets the as version to AS3 and disables it…how is it even possible to target AS2 in the root content SWF?
Dru Kepple
18 Aug 08 at 9:38 am
I’ve taken a few projects, wrapped them in an HTML wrapper and converted them to AIR. I didn’t extend them to take advantage of any AIR features. I converted them more as a quick demo of what AIR is to various folks, in context of web apps they know. Some of the projects were AS2 efforts that are targeted as Flash Lite projects, so you can understand why there is still AS 2 development.
Chris Griffith
18 Aug 08 at 9:46 am
Never underestimate the resourcefulness and creativity of Luddites and/or those overcome with nostalgia. Creating AS2-based AIR apps must be cake compared to porting a TCP/IP stack to Commodore 64! :-)
Pedro Carabeo-Nieva
18 Aug 08 at 9:46 am
Oh, Mike, I forgot to mention… Thanks for shipping me the Actionscript Reference (free of charge). Adobe’s commitment to their customers is second to none, you guys are the best!
Pedro Carabeo-Nieva
18 Aug 08 at 9:48 am
@dru
AIR apis are not exposed to AS2, but, you can run AS2 content by specifying the SWF in the application descriptor file and creating the AIR file with ADT (in the AIR SDK).
I suspect that not many if anyone is doing this, but that is what this post aims to discover.
mike chambers
mesh@adobe.com
mikechambers
18 Aug 08 at 9:50 am
we made a proof of concept at work of a Digital Help Guide that must run from a CD. The app was made nearly 2 years ago so it was made with AS2. We are using Zinc 2.5 for Windows and Mac but Zinc didn’t offer support for Linux at the time. We also did a proof of concept using XULrunner to wrap the app but it is still just a proof of concept.
the stalemate for Air on Linux was the admin permission required for installing the run time if my memory serves me correctly.
thanks for mailing the API reference guide by the way :)
fintan
18 Aug 08 at 10:04 am
You know, I actually do have a small game I put in AIR that way. It’s just something personal though, so I hadn’t even thought of it in a while. Just something I’ve given to a few family members.
Aaron Leavitt
18 Aug 08 at 11:08 am
Thanks for clarifying, Mike. Now that I know, I’ll be back with countless AS2-driven AIR apps! Just kidding…sounds useful for quick proof-of-concept things, as seems to be the answer so far in the comments, but without access to the AIR api, what’s the point? (Rhetorical question, but still, hearing practical uses is always enlightening)
Dru Kepple
18 Aug 08 at 11:18 am
It has been long enough and AS3 is a huge enough advantage over AS2 that there are only two reasons to use AS2 nowadays:
(1) You are supporting/working with/adding onto legacy code already written in AS2
(2) For whatever reason, the developer has yet to figure out AS3
It seems like (1) would rarely come into play with AIR since AIR is so new. And for (2), well, it’s time for the developer to catch up. If you still haven’t figured out AS3 by now, your job opportunities are a lot narrower than they need to be, and everything you produce is instantly legacy work and potentially runs a lot slower than it needs to as well.
I’m not sure what your motives are for asking this question Mike, but if it’s because Adobe is thinking about not supporting AS2 when it come to AIR, I say, don’t hesitate. I’d much rather Adobe spent it’s time supporting AS3 and continuing to lead in the industry than supporting the very small subset of people who would be harmed by this.
Nate Chatellier
18 Aug 08 at 1:09 pm
@Nate:
3) prototyping
Many in the community agree that it is much faster to write code quicker in AS2. things like getURL, dragOver/Off, etc, etc. AS2 just suits itself better to rapid prototyping in my and others opinion.
4) designers
If you’ve worked at an agency then you’ll know how most Flash Designers respond to working with AS3: fear, anger, confusion, giggles, tiredness, terror, rage.
=)
-erik
erikbianchi
18 Aug 08 at 3:32 pm
Our situation falls into the legacy code rationale — we have built a fairly large system using AS1/2 and the Flash Media Server, and we need to create an application with local file read/write permission that can load and interact with AS 1/2 SWF files. We don’t have the budget to begin migration of the system to AS 3 yet.
My (contract) development team wants to use AIR, but I didn’t realize it was going to be such an issue. I guess we could use AS3 and then local connection, which would then allow AS 1/2/3 loaded content to work, I assume. Is that right?
Based on the comments above, it seems safer/easier to go with Zinc. What do you think?
-jonathan
Jonathan Kaye
18 Aug 08 at 8:38 pm
A while ago I made an AIR app that you could search YouTube with and watch videos from various YouTube channels. The YouTube API only supported the AS2 chromeless player though so I ended up having to pass data between the main AS3 interface of the AIR app and a separate AS2 swf using LocalConnection.
jassa
18 Aug 08 at 10:25 pm
@jonathan
don’t use Zinc unless you really have to. it creates exes and is cross-platform to an extent but the APIs available for each platform differ. I haven’t used Zinc 3.0 but Zinc 2.5 certainly has plenty of quirks that had me pulling my hair out.
finty
19 Aug 08 at 12:20 am
We’ve built a web-based eLearning platform with AS2, and we have thousands of Flash 8 SWF assets used in the various courses. There is also a runtime debugging application in AS2 that connects via LocalConnection.
1) We’ve had requests to make the courses portable (i.e. no network), and AIR provides a clean way to package and distribute them, since there are hundreds of files in each lesson. Also, without a standalone Flash Player installed, the course viewer and debugger currently run with distracting browser chrome and possibly in separate browser tabs. For our developers, at least, we created a minimal .NET app that hosts the Flash Player.
2) For a long time we’ve talked about expanding the functionality of the debugging application to include lesson authoring capabilities, thus requiring file system access to work with our XML docs. Before AIR, we had our eyes on tools like SWF Studio. With AIR, we can achieve this by migrating the debugger/authoring tool to AS3, while leaving the course delivery platform on AS2 (since LocalConnection bridges the two) until we get around to migrating the entire portfolio, if ever. If we use AIR for the debugger/authoring tool, we might as well run the AS2 course viewer as an AIR app also, leading to an AS2 in AIR situation.
This is future work for us, but maybe still worth mentioning.
-Lawrence
Lawrence
19 Aug 08 at 6:37 am
@Jonathan: When I worked with Zinc, it was painful at best. AIR has been an absolute dream in comparison. Zinc might be safer, but I’m not so sure about easier. Of course, porting a “fairly large system” to AS3 is nothing to sneeze at. But Zinc is expensive, and doubly-so if you want to support both Mac and PC. Not to mention that getting a Mac+PC app created in Zinc requires tons of conditionals based on OS…it’s not nearly as cross-platform as they would like you to think. And the Zinc application itself (the software you use to create the executable) is absolutely horrendous. Not nice to use at all.
If it were up to me, I’d look forward to porting thing to AS3 (a chance to refactor!) and using AIR. You’ll learn lots and not invest money in something that you won’t need for very long. Just my two cents.
Dru Kepple
19 Aug 08 at 8:03 am
I am about to embark on a new project where the platform is going to be AIR consuming .NET webservices. After a project I did last year with Flash CS3 and AS3 almost made me pull all my hair out and curse everyone in sight for the functionality that was removed from Flash (specifically webservice connectors) I was considering going back to AS2 for this AIR app. Are there any good reasons not to use AS2 for an AIR app?
Alex
19 Aug 08 at 9:08 am
@Are there any good reasons not to use AS2 for an AIR app?
Yes. The AIR APIs are only exposed to ActionScript 3 content. If you do need to use existing AS2 content in an AIR application, then you should do one of the following:
1. Create an AS3 based shell that loads the AS2 content. AS2 to AS3 communication needs to be done via localconnection.
2. Create an AS3 based shell that loads an included HTML template that then loads AS2 content. Communication is AS2 — (External Interface) — JavaScript — (Direct communication) — AS3 / AIR Apis.
In general though, an AIR application built entirely in AS3 is going to be easier to develop and maintain over the long term.
Hope that helps…
mike chambers
mesh@adobe.com
mikechambers
19 Aug 08 at 10:05 am
Thanks for the options for using AS2, but since I’m starting from scratch I guess it’s going to be better to familiarize myself with AS3 and get it done using that.
After I posted I started reading up on AIR (haven’t looked at it since May of last year when I determined it wasn’t ready to build a production app) and it seems like there are a ton of features (like clipboard support) that I can make use of now.
Can you recommend a good place to find any sort of “this is how AS2 did it, and this is how AS3 can do it” comparison? I know some components just aren’t there for Flash CS3, but I didn’t know if anyone has recreated them yet or created a walkthrough of how to do it yourself.
Thanks!
Alex
19 Aug 08 at 11:56 am
@Alex
–
Can you recommend a good place to find any sort of “this is how AS2 did it, and this is how AS3 can do it” comparison?
–
There is a good article to get started on here:
http://www.adobe.com/devnet/actionscript/articles/actionscript_tips.html
and also here:
http://www.adobe.com/devnet/actionscript/articles/six_reasons_as3.html
and
http://livedocs.adobe.com/flex/2/langref/migration.html
and
http://actionscriptcheatsheet.com/blog/2007/03/01/actionscript-20-to-30-migration-cheatsheets-new-free-download/
mike chambers
mesh@adobe.com
mikechambers
19 Aug 08 at 12:06 pm
I pushed a ready made AS2 product customization web app into AIR when clients wanted a locally running version and not compromising the possibility to send e-mail messages (communicating to server).
http://www.heckyes.homewebsite.info/Rawlings/baseball_air/
edzis
19 Aug 08 at 11:45 pm
We use the possibility to load AS2 SWF in an AS3 root for a project of games.
We needed to reuse old flash game, on a new site in as3.
S.
Sakana
21 Aug 08 at 3:40 am
Hi Mike,
I can get AS2 SWF in the browser to communicate with an AIR app via LocalConnection, but I cannot get comms back from the AIR app to the AS2 SWF in the browser.
Any suggestions please. (I am going mad here…)
Warern
23 Oct 08 at 7:04 am