Developing AIR application using actionscript only
Copy link to clipboard
Copied
How to create an AIR application using only actionscript(without mxml)?
Copy link to clipboard
Copied
open flash and set your publish settings for air. then use components and other precompiled movieclips.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Oh sorry. I should have mentioned the version: Flash Builder 4.5 which is now available.

