Developing AIR applications with Flex Builder 3

Adobe® Flex™ Builder™ 3 provides you with the tools to create Adobe® AIR® applications. Flex Builder includes the Flex components for Adobe AIR applications. The workflow for developing AIR applications in Flex Builder is similar to that for developing most Flex-based applications.

Adobe Flash Builder

For information about building AIR applications with Flash Builder, see Developing AIR applications with Flash Builder.

For a quick overview of building an AIR application with Flex Builder 3 or Flash Builder 4, see Creating your first Flex AIR application in Flash Builder or Flex Builder.

Creating AIR projects with Flex Builder

If you have not already done so, install AIR and Flex Builder 3.

  • Open Flex Builder 3.

  • Select File > New > Flex Project.

  • Enter the project name.

  • In Flex, AIR applications are considered an application type. You have two type options. One option is for creating a Flex-based application that runs on the Web in Adobe® Flash® Player. The other option is for creating an AIR application that runs on the desktop in Adobe AIR. Select Desktop Application as the application type.

  • Select the server technology (if any) that you want to use with your AIR application. If you’re not using a server technology, select None and then click Next.

  • Select the folder in which you want to place your application. The default is the bin folder. Click Next.

  • Modify the source and library paths as needed and then click Finish to create your AIR project.

Debugging AIR applications with Flex Builder

Flex Builder provides full debugging support for AIR applications. For more information about the debugging capabilities of Flex Builder, refer to Flex Builder Help.

  1. Open a source file for the application (such as an MXML file) in Flex Builder.

  2. Click the Debug button on the main toolbar.

    You can also select Run > Debug.

The application launches and runs in the ADL application (the AIR Debugger Launcher). The Flex Builder debugger catches any breakpoints or runtime errors and you can debug the application like any other Flex application.

You can also debug an application from the command line, using the AIR Debug Launcher command-line tool. For more information, see Using the AIR Debug Launcher (ADL).

Packaging AIR applications with Flex Builder

When your application is complete and ready to be distributed (or tested running from the desktop), you package it into an AIR file. Packaging consists of the following steps:

  • Selecting the AIR application you want to publish

  • Optionally allowing users to view the source code and then selecting which of your application files to include

  • Digitally signing your AIR application using a commercial code signing certificate or by creating and applying a self-signed signature

  • Optionally choosing to create an intermediate AIR file, which can be signed at a later time

Package an AIR application

  1. Open the project and ensure that the application has no compilation errors and runs as expected.

  2. Select Project > Export Release Build.

  3. If you have multiple projects and applications open in Flex Builder, select the specific AIR project you want to package.

  4. Optionally select Enable View Source if you want users to be able to see the source code when they run the application. You can select individual files to exclude by selecting Choose Source Files. By default all the source files are selected. For more information about publishing source files in Flex Builder, see the Flex Builder Help.

  5. You can also optionally change the name of the AIR file that is generated. When you’re ready to continue, click Next to digitally sign your application.

Digitally signing your AIR applications

Before continuing with the Export Release Version, decide how you want to digitally sign your AIR application. You have several options. You can sign the application using a commercial code signing certificate, you can create and use a self-signed digital certificate, or you can choose to package the application now and sign it later.

Digital certificates issued by certification authorities such as VeriSign, Thawte, GlobalSign, and ChosenSecurity assure your users of your identity as a publisher and verify that the installation file has not been altered since you signed it. Self-signed digital certificates serve the same purpose but they do not provide validation by a third party.

You also have the option of packaging your AIR application without a digital signature by creating an intermediate AIR file (.airi). An intermediate AIR file is not valid in that it cannot be installed. It is instead used for testing (by the developer) and can be launched using the AIR ADT command-line tool. AIR provides this capability because in some development environments a particular developer or team handles signing. This practice insures an additional level of security in managing digital certificates.

For more information about signing applications, see Digitally signing an AIR file.

Digitally sign your AIR application

  1. You can digitally sign your AIR application by selecting an existing digital certificate or by creating a new self-signed certificate. Select the Export and Sign an AIR File with a Digital Certificate option.

  2. If you have an existing digital certificate, click Browse to locate and select it.

  3. To create a new self-signed digital certificate, select Create.

  4. Enter the required information and click OK.

  5. Click Next to optionally select files to exclude from the exported AIR file. By default, all the files are included.

  6. Click Finish to generate the AIR file.

Create an intermediate AIR file

 Select Export an Intermediate AIRI File that will be Exported Later option. Click Finish to generate the intermediate file.

After you have generated an intermediate AIR file, it can be signed using the ADT command-line tool (see Signing an AIR intermediate file with ADT).

Create an AIR Library project

To create an AIR code library for multiple AIR projects, create an AIR library project using the standard Flex library project wizard.

  1. Select File > New > Flex Library Project.

  2. Specify a project name.

  3. Select the Add Adobe AIR Libraries and then click Next.

    Note: The Flex SDK version you select must support AIR. The Flex 2.0.1 SDK does not.
  4. Modify the build path as needed and then click Finish. For more information about creating library projects, see “About library projects” in the Flex Builder Help.

// Ethnio survey code removed