Update:
Please note that developing AIR applications with FDT 3 is very easy now. Simply create a launcher for viewing and debugging your application and one launcher to release it as .air file. To create an AIR debug launch configuration select your Document Class in the Flash Explorer and then open the Run Dialog (Run > Open Run Dialog…). Double click “FDT AS3 Application “ to create a new launch configuration. After that select the “Start” tab and choose “AIR Debug Launcher” as viewer.
Press the “Run“ button to compile and launch your AIR application. FDT automatically generates a default application XML file into your output folder.
To release and package your AIR application open the Run Dialog and double click “FDT AIR Application Release” and configure the settings on the right-hand side.
see: http://fdt.powerflasher.com/blog/?p=94
Please note that developing AIR applications with FDT 3 is very easy now. Simply create a launcher for viewing and debugging your application and one launcher to release it as .air file. To create an AIR debug launch configuration select your Document Class in the Flash Explorer and then open the Run Dialog (Run > Open Run Dialog…). Double click “FDT AS3 Application “ to create a new launch configuration. After that select the “Start” tab and choose “AIR Debug Launcher” as viewer.
Press the “Run“ button to compile and launch your AIR application. FDT automatically generates a default application XML file into your output folder.
To release and package your AIR application open the Run Dialog and double click “FDT AIR Application Release” and configure the settings on the right-hand side. See new post: http://fdt.powerflasher.com/blog/?p=94
Previous Post:
On October 1, 2007 Adobe released the beta 2 version of AIR (Adobe Integrated Runtime), formerly known as Apollo.
As a cross-operating system runtime AIR provides developers with the possibility to deploy RIAs to the desktop. This is very promising regarding the users interaction with the web because it provides a faster access to related data by using native desktop applications. On top of this, AIR applications can have a great look and feel by using customized windows.
All you need to do if you want to build those cool things is to download the Runtime, which is required to run any Adobe AIR application and to also download the Flex 3 SDK. The latter includes as well the AIR SDK as the AIR compiler, the AIR debug launcher and the AIR packager. These tools can be used together with ANT to map the whole AIR workflow.
To distribute AIR applications means to pack the required files like swfs, assets and the application descriptor file. These packages are used by the runtime environment, which should be installed at first, to make sure that all AIR applications will work.
Nico Zimmerman promised that there will be an add-on for FDT to support the AIR workflow with which it will be much easier to develop AIR applications.
Now, let’s take a closer look at the current workflow and let’s build a “hello world” Air application step by step.<!–[endif]–>
- Download and install the Runtime (http://labs.adobe.com/downloads/air.html).
- Download the Flex 3 SDK (http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html).<!–[endif]–>
- Now you can start your eclipse in the FDT perspective and add a new AS3 core library.
- Window -> Preferences -> FDT -> Core Libraries -> AS3 Core Libraries -> Add…
- 2. Choose Flex 3 SDK with AIR as Type, type in “Flex3_AIR” as Name and choose a path variable by clicking the “Browse…” button. If there is no variable linking to the Flex 3 SDK, click “New…”, type in “Flex3SDK_AIR” as Name and add the Path to your Flex 3 SDK folder. Press a few times OK, to get back to eclipse.

- Now you’re prepared to start with your first AIR application in FDT: create a New Flash Project with the Name “Hello World”. Choose Action Script 3 with your new core library (“Flex3_AIR”) as the project language and press “Finish”.

- Downloading this zip-file and copying the content to your project folder is the easiest way to go on. The zip-file contains a settings folder within an assets folder. The settings folder contains the application descriptor file which is essential for running AIR applications. This file contains parameters as well for the AIR application as for the first window. You have to customize these parameters as explained in the comments in the file.
Note that the content tag and all tags marked “required” are very important to run the AIR application! Rename the application descriptor file like shown in this example: “-app.xml” (e.g. “powerflasher-app.xml”).

- Add the “src” folder to the classpath and double-click the “Build-Air”file. The most important properties which you have to customize are marked with comments and are located at the top of the file.
- Clean -> Deletes the built directories.
- Build directories -> Creates directories. “Debug” contains the compiled swf for debugging, “build” contains the compiled swf for publishing and “publish” contains the final AIR file.
- Compile for debuging -> Uses the mxml compiler with a special air parameter to compile the AIR swf. Instead of that you can use the amxml compiler as normal as you use the mxml compiler.
- Compile for publishing -> Does the same as “Compile for debuging”.
- Test application -> Uses the AIR debug launcher (ADL) to start the AIR application without packaging and installation. The ADL uses the application descriptor file to set up the window.
- Package application -> Uses the AIR development tool (ADT) to package all required files to an AIR package.
- Create certificate -> Uses the ADT to create a certificate which is required to sign and build the AIR package.
- Now you are ready to create the ActionScript Classnamed “HelloWorld”. The code should look like this:
package
{
import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
/**
* @author Stephan Partzsch
*/
public class HelloWorld extends Sprite
{
public function HelloWorld()
{
var textField:TextField = new TextField();
textField.autoSize = TextFieldAutoSize.CENTER;
textField.text = "Hello world!";
textField.x = (stage.stageWidth - textField.width) / 2;
textField.y = (stage.stageHeight - textField.height) / 2;
this.addChild(textField);
}
}
}
- Open the ANT view. You can find it here: Window -> Show View -> Other -> ANT. Drag the “Build_Air” file to the ANT view and double-click number 4 to test your application. Create a certificate with number 7 and than double-click number 6 to package your first AIR application.

- Finally you find HelloWorld.air in your project directory in the publish folder. Double-click it to install it on your desktop.<!–[endif]–>
Of course, you can also download this sample project right here.
That’s it and I hope I could demonstrate the workflow of AIR so that you can go on with developing ultra-cool AIR applications. 🙂
Stephan
[…] that I was surprised pleasantly that even the official Powerflasher-Blog published an article about compiling AIR projects in FDT 3 I recently started to take the challenge and began with the first […]
it is interesting and informative article. This has been very helpful understanding a lot
of things. I’m sure a lot of other people will agree with me.
@bf Thanks for the tips! there’s a few things to note:
the “Run > Open Run Dialog” was listed as “Run > Run Configurations…” on my machine.
To generate my release .air file, I had to modify my application-app.xml file’s application.initialWindow.content node from “[This value will be overwritten by Flex Builder in the output app.xml]” to “Application.swf”.
Then in the Assets tab of the FDT Air Application Release I had to “Include Files as” my bin-debug/Application.swf as Application.swf.
Good stuff!
Please note that developing AIR applications with FDT 3.1 is very easy now. Simply create a launcher for viewing and debugging your application and one launcher to release it as .air file.
To create an AIR debug launch configuration select your Document Class in the Flash Explorer and then open the Run Dialog (Run > Open Run Dialog…). Double click “FDT AS3 Application “ to create a new launch configuration. After that select the “Start” tab and choose “AIR Debug Launcher” as viewer.
Press the “Run“ button to compile and launch your AIR application. FDT automatically generates a default application XML file into your output folder.
To release and package your AIR application open the Run Dialog and double click “FDT AIR Application Release” and configure the settings on the right-hand side.
http://fdt.powerflasher.com/blog/?p=94
I get this Error Message:
Buildfile: /Users/sandroieva/Flash/FDT/HelloWorld/Build_Air.xml
2. Build directories:
4. Compile for publishing:
[java] Loading configuration file /Users/sandroieva/Flash/Frameworks/flex_sdk_3/frameworks/air-config.xml
[java] /Users/sandroieva/Flash/FDT/HelloWorld/build\HelloWorld.swf (859 bytes)
6. Package application:
[java] could not load keystore file (password may be incorrect)
[java] usage:
[java] adt -checkstore SIGNING_OPTIONS
[java] adt -certificate -cn ( -ou )? ( -o )? ( -c )?
[java] adt -help
[java] adt -migrate SIGNING_OTIONS
[java] adt -package SIGNING_OPTIONS FILE_ARGS
[java] adt -prepare FILE_ARGS
[java] adt -sign SIGNING_OPTIONS
[java] adt -version
[java] SIGNING_OPTIONS: -storetype ( -keystore )? ( -storepass )? ( -keypass )? ( -providerName )? ( -tsa )?
[java] FILE_ARGS: * (( -C + ) | ( -e ))*
BUILD FAILED
/Users/sandroieva/Flash/FDT/HelloWorld/Build_Air.xml:129: Java returned: 7
Total time: 3 seconds
[…] http://fdt.powerflasher.com/blog/?p=10 […]
[…] -storetype is required. Von uns wird also erwartet, den storetype beim Kompilieren mitzugeben. Machen wir gerne, also fügen wir im 6.Buildtask (6. Package application) das Argument -storetype ein und als Wert PKCS12, da es sich hier um ein Dateiformat handelt, das private Schlüssel mit dem zugehörigen […]
Hi, Thanks for the Ant file to compile the AIR apps.
It works as long as I am not using link library ( .SWC ) and link library folder.
is there a way to use the fdt project settings to include the link library automatically like the “Run as FDT3 Applicaion” ?
[…] and i’m a big fan. but it all bacame relative as i needet to compile a project for air. the documentation found on the powerflasher website isn’t up to date and has an incorrect app-descriptor xml. […]
I’ve got AIR1.5 installed and every of Flex SDK 3.0.0 3.2.0 4.0.0
i did all of the steps several times but i still cant test and package application. and i did apply version xmlns=”http://ns.adobe.com/air/application/1.5″ in app.xml. i stil got on test task
[exec] error while loading initial content
[exec] Result: 9
and on publish
-storetype is required
[java] usage:
[java] adt -checkstore SIGNING_OPTIONS
[java] adt -certificate -cn ( -ou )? ( -o )? ( -c )?
[java] adt -help
[java] adt -migrate SIGNING_OTIONS
[java] adt -package SIGNING_OPTIONS FILE_ARGS
[java] adt -prepare FILE_ARGS
[java] adt -sign SIGNING_OPTIONS
[java] adt -version
[java] SIGNING_OPTIONS: -storetype ( -keystore )? ( -storepass )? ( -keypass )? ( -providerName )? ( -tsa )?
[java] FILE_ARGS: * (( -C + ) | ( -e ))*
what is wrong?
[…] wordt nog makkelijker in FDT. Super snel compilen via de flex SDK compiler. Op Powerflasher (http://fdt.powerflasher.com/blog/?p=10) wordt aardig uitgelegd hoe je een AIR project op kunt zetten in de bekende FDT eclipse omgeving. […]
[…] about creating ant build files and so on. you can find a good one with a sample project at the FDT blog. It’s for AIR 1.0 but you just have to change the descriptor xml to the new format and it […]
Good post.
[…] you to develop, test and package AIR applications straight from the Eclipse IDE. This process is explained in detail on the Powerflasher site. However, the Ant build script provided there does not work with the […]
cool site , thanks
Updated the article for AIR 1.0 and the released version of the Flex SDK
http://troyworks.com/blog/?p=120
[…] to FDT Enterprise. I was excited to see that AIR is now supported. Of course it’s been out for several months, just haven’t paid any attention to it. Updating since a few things have changed since AIR went […]
It looks like the a version problem between AIR beta2 and beta3.
Have you installed AIR beta3?
If yes, that is the reason, because the above build-script was developed for beta2.
Click the following link to get the up-to-date build-script for AIR beta 3 and replace the old one with this.
AIR_beta3_buildScript
I hope that this will solve your problem.
I followed all steps of your great tutorial, but in step 6. Package application i got this failure:
6. Package application:
[java] -storetype is required
[java] usage:
[java] adt -package SIGNING_OPTIONS FILE_ARGS
[java] adt -prepare FILE_ARGS
[java] adt -sign SIGNING_OPTIONS
[java] adt -checkstore SIGNING_OPTIONS
[java] adt -certificate -cn ( -ou )? ( -o )? ( -c )?
[java] adt -help
[java] SIGNING_OPTIONS: -storetype ( -keystore )? ( -storepass )? ( -providerName )? ( -tsa )?
[java] FILE_ARGS: * (( -C + ) | ( -e ))*
BUILD FAILED
(i am working with “flex 3 sdk b3 121207”, FDT 3.0.3.1002 and eclipse)
Does this error occure in the console of eclipse or anywhere else?
Please make sure, you have a working version of the AIR or Flex3 SDK. And if you try to work with the latest version of the AIR runtime set up the first part of your descriptor file as follows:
I get the following message when doing the Test Application in Ant.
/Applications/Adobe Flex Builder 3/sdks/3.0.0.B3/bin/adl.exe: /Applications/Adobe Flex Builder 3/sdks/3.0.0.B3/bin/adl.exe: cannot execute binary file
/Applications/Adobe Flex Builder 3/sdks/3.0.0.B3/bin/adl.exe being the path to my Flex 3 SDK.
Any ideas?
http://www.martijndevisser.com/blog/2008/building-air-with-fdt/
This is probably the solution for this problem. Thanks a lot, Martijn.
Please remember that more of these problems can be appear in the future, because AIR is still beta.
Back again, found the solution. In file “Build_AIR.xml”, change these lines (under option 6):
into:
That did it for me, I am now able to compile and package an AIR app from FDT using ADT. Nice.
Hi there, I was trying your sample, but I’m getting an error:
-storetype is required
[java] usage:
[java] adt -package SIGNING_OPTIONS FILE_ARGS
[…more…]
Is your sample perhaps for an earlier version of ADT?
You can compile an FLA from eclipse with a “FDT Flash Launcher”. This launcher start the FlashIDE for compiling such that in effect the IDE is running.
But that’s not AIR specific. Maybe such a question is better to ask in the forum such that more users are able to answere.
This is a great intro. Very helpful. Could you add in a note on how to integrate FDT + AIR + the Flash IDE? I do a lot of coding in support of rich FLAs. I’m new to FDT – can I associate an FLA and compile from Eclipse such that I can test without having the Flash IDE running? Or if I do have to have the IDE running, will FDT compile and launch? Thanks!
Hi
I was very much helped by the information with this article.
Many thanks at you very fascinating resource.
Bye
I think that is a minor problem. It seems as if you forgot to specify the name of your main class in the ANT build file. Please check your ANT file and type the name (without .as) as value of the following entry:
<property name=”app_name” value=”HelloWorld” /> <!– Name of the application. –>
i always get the error:
4. Compile for publishing:
[java] Loading configuration file C:\Tools\Flex3 SDK\frameworks\air-config.xml
[java] Error: unable to open ‘./src/AIR01.as’
[java] Use ‘mxmlc -help’ for information about using the command line.