Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Developing AIR application using actionscript only

New Here ,
Apr 25, 2011 Apr 25, 2011

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

TOPICS
ActionScript
930
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 25, 2011 Apr 25, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 25, 2011 Apr 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 03, 2011 May 03, 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?

screenshot.GIF

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 03, 2011 May 03, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 03, 2011 May 03, 2011
LATEST

Oh sorry. I should have mentioned the version: Flash Builder 4.5 which is now available.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines