Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

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.


advertisement
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" xmlns="http://ns.adobe.com/air/application/1.0.M4"> <name>HelloWorld-AS</name> <description> A simple Hello World application with the following features: draggable, minimizeable, closeable, shows/hides assets, writes text file to desktop. </description> <title>HelloWorld-AS</title> <copyright>Creative Commons Attribution-ShareAlike 3.0</copyright> <rootContent systemChrome="none" transparent="true" visible="true"> HelloWorld-AS.swf</rootContent> <installFolder>Adobe/AIR/FMA</installFolder> <icon> <image16x16>icons/AirApp_16.png</image16x16> <image32x32>icons/AirApp_32.png</image32x32> <image48x48>icons/AirApp_48.png</image48x48> <image128x128>icons/AirApp_128.png</image128x128&g; </icon> <!-- <handleUpdates/> --> <!-- <fileTypes> <fileType> <name>adobe.FlashFile<name> <extension>swf Adobe Flash File</description> <contentType>application/x-shockwave-flash</contentType> </fileType> </fileTypes>--> </application>

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.
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap