Setting up the Flex 3 SDK



To develop Adobe® AIR® applications with Adobe® Flex™, you have the following options:

  • You can download and install Adobe® Flex™ Builder™ 3, which provides integrated tools to create Adobe AIR projects and test, debug, and package your AIR applications. See Developing AIR applications with Flex Builder.

  • You can download the Adobe® Flex™ 3 SDK and develop Flex AIR applications using your favorite text editor and the command line tools.

About the AIR SDK command line tools

Each of the command line tools you use to create an Adobe AIR application calls the corresponding tool used to build Flex applications:

  • amxmlc calls mxmlc to compile application classes

  • acompc calls compc to compile library and component classes

  • aasdoc calls asdoc to generate documentation files from source code comments

    The only difference between the Flex and the AIR versions of the utilities is that the AIR versions load the configuration options from the air-config.xml file instead of the flex-config.xml file.

    The Flex SDK tools and their command line options are fully described in Building and Deploying Flex 3 Applications in the Flex 3 documentation library. The Flex SDK tools are described here at a basic level to help you get started and to point out the differences between building Flex applications and building AIR applications.

    For more information, see Creating an AIR application using the command line tools.

Install the Flex 3 SDK

Building AIR applications with the command line tools requires that Java is installed on your computer. You can use the Java virtual machine from either the JRE or the JDK (version 1.5 or newer). The Java JRE and JDK are available at http://java.sun.com/.

Note: Java is not required for end users to run AIR applications.

The Flex 3 SDK provides you with the AIR API and command line tools that you use to package, compile, and debug your AIR applications.

  1. If you haven't already done so, download the Flex 3 SDK at http://opensource.adobe.com/wiki/display/flexsdk/Downloads.

  2. Place the contents of the SDK into a folder (for example, Flex 3 SDK).

  3. The command line utilities are located in the bin folder.

    For more information, see Creating your first AIR application with the Flex SDK.

Compiler setup

You typically specify compilation options both on the command line and with one or more configuration files. The global Flex SDK configuration file contains default values that are used whenever the compilers are run. You can edit this file to suit your own development environment. There are two global Flex configuration files located in the frameworks directory of your Flex 3 SDK installation. The air-config.xml file is used when you run the amxmlc compiler. This file configures the compiler for AIR by including the AIR libraries. The flex-config.xml file is used when you run mxmlc.

The default configuration values are suitable for discovering how Flex and AIR work, but when you embark on a full-scale project examine the available options more closely. You can supply project-specific values for the compiler options in a local configuration file that takes precedence over the global values for a given project. For a full list of the compilation options and for the syntax of the configuration files, see Flex SDK Configuration in Building and Deploying Flex 3 Applications (http://www.adobe.com/go/learn_flex3_building) and in the Flex 3 documentation library.

Note: No compilation options are used specifically for AIR applications, but you must reference the AIR libraries when compiling an AIR application. Typically, these libraries are referenced in a project-level configuration file, in a file for a build tool such as Ant, or directly on the command line.

Debugger setup

AIR supports debugging directly, so you do not need a debug version of the runtime (as you would with Adobe® Flash® Player). To conduct command line debugging, you use the Flash Debugger and the AIR Debug Launcher (ADL).

The Flash Debugger is distributed in the Flex 3 SDK directory. The native versions, such as fdb.exe on Windows, are in the bin subdirectory. The Java version is in the lib subdirectory. The AIR Debug Launcher, adl.exe, is in the bin directory of your Flex SDK installation. (There is no separate Java version).

Note: You cannot start an AIR application directly with fdb, because fdb attempts to launch it with Flash Player. Instead, let the AIR application connect to a running fdb session.

Application packager setup

The AIR Developer Tool (ADT), which packages your application into an installable AIR file, is a Java program. No setup is required other than setting up your environment so that you can conveniently run the utility.

The SDK includes a script file in the SDK bin directory for executing ADT as a command. You can also run ADT as a Java program, which can be convenient when using build tools such as Apache Ant.

For more information, see Packaging an AIR installation file using the AIR Developer Tool (ADT).