UPDATE: Official Adobe AIR support, August 21 Adobe has released official support for AIR in Flash CS3. We'll keep the AIR panel available, but it's unlikely it will be updated any further. Get the Flash CS3 update for AIR.

Currently, you can only create AIR (formerly Apollo) applications with FlexBuilder. Adobe has already announced that they will be adding support to Flash CS3 to create AIR projects, but we wanted a solution in the meantime. As such, we've extended the work that Guy Watson began with his "Test in Apollo" jsfl command, and built a panel that lets you test, configure and compile AIR applications from within Flash CS3.

Step 1: Install the AIR global SWC
The AIR global SWC is a compiled class library containing the AIR API. Flash CS3 needs a copy of it in its class path to compile against.

1. Install the FlexBuilder 3 ("Moxie") beta, or download the Flex 3 SDK from Adobe Labs
2. Locate the "airglobal.swc" file in one of the following locations:
- in the FlexBuilder 3 "Moxie" application directory, in "sdks/moxie/frameworks/libs/air/"
- in your applications directory in "Adobe Flex Builder 3 Plug-in/sdks/moxie/frameworks/libs/air/"
- in the FlexBuilder 3 "Moxie" SDK "frameworks/libs/air/"
3. Make a copy of that file in your Flash CS3 application directory under "Configuration/ActionScript 3.0/Classes

Unfortunately, the AIR SDK does not include this file. You must get it from Flex 3.


Step 2: Install the AIR Panel
This installs the AIR Panel in Flash CS3, which will let you configure, test and package AIR applications

1. Install Extension Manager v1.8
1. Download the AIRPanel zip file from here and unzip it.
2. Run the MXP file to install the panel.
3. Restart Flash
4. In the Window menu, select Other Panels > AIRPanel

If you do not see the AIR Panel, ensure you're using Extension Manager v1.8, and try reinstalling the MXP.


Step 3: Using the panel.
Now that the panel and SWC are installed, you can start creating AIR applications in Flash CS3. You can create your application as you would normally, but you can now use the AIR API without generating compiler errors. Note that you will receive runtime errors if you test movies normally when using the AIR API.

Testing in the AIR runtime:
1. Select your open FLA from the dropdown in the AIR Panel. If you don't see your FLA, make sure it is saved (unsaved files are not shown in the list), and wait a few seconds.
2. Click the "Test" button in the panel.
5. If this is the first time you've used the AIR Panel, you will be prompted for the location of the adl file. Select "adl" (no extension) on Mac, or "adl.exe" on Windows from one of the following locations:
- in the FlexBuilder 3 "Moxie" application directory, in "sdks/moxie/bin/"
- in the FlexBuilder 3 "Moxie" SDK in "bin/"
4. Your application will compile and open in the AIR Runtime. Quit your application to resume working with Flash CS3.

Packaging your AIR Application
1. Select your FLA as above.
2. Click the "Package" button in the panel.
3. If you have not already specified configuration settings for this FLA, you will be prompted for them.
4. As above, if this is the first time you've used the panel you will be prompted for the adl file.
5. Your application will be compiled and packaged into an .air file in the same directory as your SWF.

You can update your configuration settings at any time by selecting the FLA in the panel as above, and clicking the "Settings" button.

One of the advantages of having this as a panel is that you can test your AIR applications without having to click back to your main FLA (ie. you can do it while editing an asset FLA or a class file).


Troubleshooting
If you have problems, check the following:

  • Be sure you are using the correct adl for your system (adl for Mac, adl.exe for Windows), and that it is from the Moxie build of the Flex SDK or FlexBuilder. You can reset this setting by deleting the config.dat file from in your Flash CS3 configuration folder in gskinner/AIRPanel/config.dat
  • Check that your SWF is set to export to the same directory as your FLA (we are looking at ways to remove this limitation).
  • There may also be an issue with FLAs on network drives.
  • Ensure you have the latest java virtual machine. You can download it from java.com

If you are experiencing difficulties on Windows, you can also try using "adl" instead of "adl.exe", just be sure you have the latest JVM installed.

Note that the airglobal.swc and adl files seem to reside in a few different locations. If you can't find one of them in the locations above, do a search for the file, and let us know in the comments below where you find it. If you don't find it, make sure that you have the FlexBuilder 3 beta, or Flex 3 beta SDK installed.


UPDATE: Release 2, July 3 Please use extension manager to remove the previous extension prior to installing this version! Everything should still run ok, but removing the old version in the future may cause problems.

The zip file linked above has been updated with a new build. The most significant updates are the addition of a setting for window mode (system or transparent), and support for XML round-tripping, so edits/additions to the AIR application XML file will be preserved. We've also tweaked the interface, and made some other minor updates.

In a bid to reduce the issues with a jsapi bug and long file paths, we had to put in some messy fixes. Let me know in the comments if you experience any bugs or difficulties.



UPDATE: Release 3, July 4
Fixed a minor bug where the panel would overwrite the app xml file when packaging.


UPDATE: Official Adobe AIR support, August 21
Adobe has released official support for AIR in Flash CS3. We'll keep the AIR panel available, but it's unlikely it will be updated any further. Get the Flash CS3 update for AIR.

We will likely be releasing additional updates based on feedback, so check back here soon (clicking the "?" icon in the panel will take you back to this post). If you have any feature requests, or encounter any problems, let us know in the comments below.