Developing AIR applications with Flash Builder
Adobe® Flash® Builder™ 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 Flash Builder is similar
to that for developing most Flex applications.
Creating AIR projects with Flash BuilderIf you have
not already done so, download and install AIR runtime.
Open Flash Builder.
Select File > New > Flex Project.
Enter the project name.
In Flex, AIR applications are considered an application type.
You have two type options: an application that runs on the Web in
Adobe® Flash® Player
and a desktop application that runs 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-debug folder. Click Next.
Modify the source and library paths as needed and then click
Finish to create your AIR project.
Converting Flex projects to Adobe AIR projectsFlex projects specify an application type of either Web
(runs in Adobe Flash Player) or Desktop (runs in Adobe AIR). You
can convert the application type of a Flex project from Web to Desktop.
See Changing Flex projects to Adobe AIR projects.
Note: If you import a Catalyst project from an FXP file, Flash
Builder imports the project with the Web application type. You can
convert the project to a Desktop application type (runs in Adobe
AIR).
Debugging AIR applications with Flash BuilderFlash Builder provides full debugging
support for AIR applications. For more information about the debugging
capabilities of Flash Builder, refer to Debugging your applications.
Open a source file for the application (such as an MXML
file) in Flash 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 Flash 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) in the AIR documentation.
Packaging AIR applications with Flash BuilderWhen 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
Selecting a generic AIR file or a native installer to install
the application
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 applicationOpen
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 Flash
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 Flash Builder, see the Flash Builder
Help.
Important: For server projects, you can
select the services folder when exporting source files. Exporting
files that implement services has security implications. These files
can expose access to your database, including user names and passwords.
See Exporting
source files with release version of an application.
Select Export to AIR File or Export to Native Installer.
Click Next.
Export to AIR File creates a generic installer
file that can be used to install the application on either Windows
or Mac OS X platforms.
Export to Native Installer creates
an installer for the target platform, either Windows or Mac OS X.
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 applicationsBefore 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 in
your AIR documentation.
Digitally sign your AIR applicationYou
can digitally sign your AIR application by selecting an existing
digital certificate or by creating a new self-signed certificate.
Select Project > Export Release Build.
Select the
AIR project to export and the file to export the project to. Click
Next.
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.
(Optional) Click Next. Select output files to include in
the exported AIRI file.
By default, all the files are included.
Click Finish to generate the AIR file.
Create an intermediate AIR fileYou can
create an intermediate AIRI file that can be signed later. Use this
option for testing only.
Select Project > Export
Release Build.
Select the AIR project to export and the file
to export the project to. Click Next.
Select Export an Intermediate
AIRI File that will be Signed Later option.
(Optional) Click Next. Select output files to include in
the exported AIRI file.
By default, all the files are included.
Click Finish.
After you have generated an intermediate
AIR file, it can be signed using the AIR Developer Tool (ADT). For
information on the ADT command line tool, see Signing an AIR Intermediate File with ADT in
your AIR documentation.
Create an AIR library projectTo 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 Include 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 Flash Builder Help.
|
|