Adobe Flex Builder 3 provides you with the tools to create Adobe® AIR™ projects, work with the Flex AIR components, and debug and package Adobe AIR applications. The workflow for developing AIR applications in Flex Builder is similar to that for developing most Flex applications.
Contents
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: a Flex application that runs on the Web in Flash Player and an AIR application that runs on the desktop in the Adobe AIR runtime. 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.
- Open a source file for the application (such as an MXML file) in Flex Builder.
- 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 Verisign or Thwate digital certificate or by creating and applying a self-signed signature
- Optionally choose to create an intermediate AIR file, which can be signed at a later time
Packaging an AIR application
- Open the project and ensure that the application has no compilation errors and runs as expected.
- Select Project > Export Release Build.
- If you have multiple projects and applications open in Flex Builder, select the specific AIR project you want to package.
- 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.
- 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 Verisign or Thwate digital 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 by VeriSign and Thwate 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 devveloper 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
- 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.
- If you have an existing digital certificate, click Browse to locate and select it.
- To create a new self-signed digital certificate, select Create.
- Enter the required information and click OK.
- Click Next to optionally select files to exclude from the exported AIR file. By default, all the files are included.
- 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.
- Select File > New > Flex Library Project.
- Specify a project name.
- 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.
- 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.
See also