Skip to main content
Participant
April 25, 2011
Question

Developing AIR application using actionscript only

  • April 25, 2011
  • 2 replies
  • 1002 views

How to create an AIR application using only actionscript(without mxml)?

This topic has been closed for replies.

2 replies

Inspiring
April 25, 2011

If you are using Flash Builder, under the File menu select new "ActionScript Project" and select "Desktop" under Application Type in the wizard. That will get you going. Be sure to set the StageScaleMode and StageAlign in the base class:

stage.align = StageAlign.TOP_LEFT;

stage.scaleMode = StageScaleMode.NO_SCALE;

You don't even need Flash Builder. Just create the classes with your favorite editor, download the free flex sdk and use the command line to compile your code to a swf.

flexplusAuthor
Participant
May 3, 2011

There is no option shown as "Desktop Application" in Flash Builder 4 while selecting File-> ActionScript Project. It is available for Flex Project only. What to do?

Community Expert
May 3, 2011

They didn't make this easy for you but what you need to do is to choose File > New > Flex Project (not ActionScript Project). Then choose AIR (aka Desktop) as Application type.

Then at the final page of the config panel your Main application file is set to by default "Main.mxml" - since it's a Flex project. Rename it to "Main.as" (or YourAppName.as or whatever you like).

When you finish the config panel the Builder will open the main AS class file. Now you have AS only AIR project

kglad
Community Expert
Community Expert
April 25, 2011

open flash and set your publish settings for air.  then use components and other precompiled movieclips.