[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1406
  • Last Modified:

Moving SWF to AIR

I am currently using Flash to create an Actionscript 2 Projector (EXE) File.

I want to use AIR. My EXE is 4.8 MB and growing. When I convert to AIR it drops to ~200KB (WowWowWeWa!).

That's my only motivation; size.

Here are my concerns ; 3 questions.

#1. Reading Local Files : I use the projector to open a local file (C:\msconfig.txt) and load variables. Can I do this in AIR?
#2. Fullscreening : I use the projector to fullscreen (I know this works with AIR but how do I do it with Actionscript 2.0 I can't find anything that works)
#3. Updating : I can update my EXE by over-writing it and it works. Do I need to send a new package each time for the user to install? Is there any auto-update function or process with AIR? Is there any silent update process so the user wouldn't have to do anything whether updating AIR or my app?

Thanks in Advance
  • 3
  • 2
1 Solution
you can technically wrap an AS2 app in AIR, but it's not really the same thing, and will be limited:  http://www.mikechambers.com/blog/2008/08/18/anyone-using-actionscript-2-to-build-air-applications/

however, to answer your questions:

1 - yes (kinda), AIR apps can read local files - however, you only have certain system privileges in the application directory - access to files outside the application directory can result in a security sandbox violation.
2 - yes (kinda), AIR apps can take advantage of full screen - again, AS2 is not directly compatible with AIR, so I'm not sure how you'd do it
3 - AIR has an update feature, but it'd need to be implemented with AS3 - again, not sure how you'd do it with AS2.

AIR was meant to work with AS3, not AS2, so you might be able to achieve what you want, but it probably won't be straightforward.

last thing - i don't see any way that an AIR application is going to compress a 5MB swiff to less then 200KB.  I suspect you're loading the swiff and not counting it.  You might get a little savings, but I don't see 2500% compression.
#1.  Yes...

#2.  No, AIR requires you to use AS3...  You cannot use AS2 with it...

#3.  I don't think you can update the app silently, but you can definitely make an app to check the server and update if necessary...

KodiakASPAuthor Commented:

1. Thanks
2. Keep going.... All my AS2 seems to run fine in AIR. I mean the whole thing works it just won't full screen.
3. I would assume there is AS2?
No It's the projector element. The SWF is only 97 KB :) uncompressed.
When I convert it to EXE it is 4.78 MB
When I convert it to AIR it is 200 KB :)
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

KodiakASPAuthor Commented:
CyanBlue "...AIR requires you to use AS3"

I don't think so... Under publish settings in Flash CS4 my AS2 application goes RIGHT INTO an Air installer package and runs just fine... it just won't full screen haha.
check the mike chambers blog post i linked - you can port apps to AIR, but you're really just kind of wrapping them - and you won't have direct access to a lot of the AIR-specific API
"No It's the projector element. The SWF is only 97 KB :) uncompressed.

When I convert it to EXE it is 4.78 MB
When I convert it to AIR it is 200 KB :)"

gotcha - that makes more sense : )

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now