RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Fresh AIR for RIAs : Page 5

Take a look at Adobe's AIR, and see how this cross-platform, run-time engine can help you apply your skills to create and distribute Internet-enabled desktop applications.

Packaging Your AIR Application
When you're ready to package your application, choose the AIR – Application & Package Settings command, which will open the dialog shown in Figure 2. For simple testing, you can usually accept all the default values in this dialog, but you must be sure to test your movie after any changes, before compiling. The Test Movie command generates a current SWF that will be used to create the AIR application.

Figure 2. Putting the Baby to Bed: Usually you can accept all the default values in the AIR – Application & Package Settings dialog, but be sure to test your movie after any changes and before compiling.

In this case, you'll want to make sure one additional change is made, which is switching the Window Style menu to Custom Chrome (transparent). This change will cause the Flash stage to disappear, and only nontransparent pixels will show in the application. Optionally, you can also choose which icons are used for your application by choosing pre-created PNGs in 16-, 32-, 48-, and 128-pixel square sizes.

You may notice in Figure 2 that these options appear disabled, and the "Use custom application descriptor file" checkbox is checked. If desired, you can configure the autogenerated XML document yourself. You may find this approach easier to repurpose from project to project, for example. (An example is included here.) If so, check the aforementioned checkbox, and browse for this file:

<?xml version ="1.0" encoding="utf-8" ?>
<application appId="com.air.flash.HelloWorld-AS" version="0.1" 
    A simple Hello World application with the following features: 
    draggable, minimizeable, closeable, shows/hides assets, 
    writes text file to desktop.
  <copyright>Creative Commons Attribution-ShareAlike 3.0</copyright>
  <rootContent systemChrome="none" transparent="true" visible="true">
<!-- <handleUpdates/> -->
<!-- <fileTypes> <fileType> <name>adobe.FlashFile<name> 
  <extension>swf Adobe Flash File</description> 
  <contentType>application/x-shockwave-flash</contentType> </fileType> 
Author's Note: In this described Flash CS3 workflow, you may want to put your custom XML file in a separate directory. Every time the movie was tested a new copy of the XML file was generated, overwriting the custom file without as much as a fare-thee-well.

Also, once you've set up the dialog or XML file the first time, you can then skip immediately to the AIR—Package AIR File command.

Again, this entry level "first AIR application" tutorial was pushed a bit to demonstrate the AIR-specific commands. If you are just interested in creating a custom shaped window for your linear Flash animation, you can do that without any extra work at all. If this tutorial seemed like a breeze, dig in deeper. There are several impressive sample applications in the related resources list.

Also included is a reference to Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Guide (see related resources). It's a fine book that provides a handy pocket reference for you to have right on your desk. If you're comfortable with digital text, and you have the screen real estate to move back and forth between a PDF and your application, the authors and O'Reilly generously teamed up to make the book freely downloadable through the folks at Ajaxian.

Finally, a bonus source package that isn't included in the source code download is included in the related resources. It is the same exercise but recreated in HTML/JavaScript for use with the Dreamweaver CS3 AIR extension.

Related Resources

Rich Shupe is president of FMA, a full-service multimedia development and training facility based in New York. He is a regular Flash columnist for DevX and coauthor of the upcoming "Flash 8: Projects for Learning Animation and Interactivity" and the upcoming "Learning ActionScript 3.0," (both published by O'Reilly). FMA develops web and disc-based products for clients including McGraw-Hill, Phillips, 20th Century Fox, and Nickelodeon, and trains digital media professionals in Flash, ActionScript, HTML, JavaScript, and more.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date