I am building HTML5 applications at Sencha. It is a great platform, take a look...

 

  Ted Patrick - Developer Relations @ Sencha


   Note: This is the personal blog of Ted Patrick. The opinions and statements voiced here are my own.



Configuring ActionScript-Only AIR projects with Flash Builder 4

DIGG IT!     Published Tuesday, March 23, 2010 at 1:27 PM .

There is a trick to setting up an AIR Application using ActionScript-only within Flash Builder 4. Here is how to do it:

1. File > New > "Flex Project"
2. Choose a Project Name: "Foo"
3. Select "Desktop (runs in Adobe AIR)"
4. Press "Finish"
5. Delete "Foo.mxml"
6. File > New > ActionScript Class named "Foo" with "flash.display.Sprite" as SuperClass
7. Press Finish.
8. Right Click on "Foo.as" and press "Set as Default Application"
9. In Foo.as, add this line in the constructor:
"this.stage.nativeWindow.visible = true;"
10. Run & Done!




Here is a sample "Foo" Project for Flash Builder 4: Download

Assuming you used the exact name of the generated MXML file, you project is 100% ready to run, debug, and profile. Within the MXMLC compiler, MXML files are translated into ActionScript classes just before compilation and if you use the same base name, they are interchangeable.

So why use ActionScript Only AIR projects? Mobile.
I have been using this workflow since pre-MAX for mobile application development. It works seamlessly with AIR on mobile.

Cheers,

Ted :)


Where to find me:

Ted on Twitter - @__ted__
Ted on Adobe Groups
Ted on LinkedIn
Ted on Facebook
Ted at Adobe

Latest

Lists

Links

Jobs

city, state, zip

Archives