Datasheet
Luchner c01.tex V3 - 03/20/2008 2:29pm Page 20
Chapter 1: The Development Environment
After running this command, you will be prompted to input the task you wish to perform —
compile
,
launch
,or
package
. Each task will generate a SWF file. If you choose the
launch
task, the AIR application
will then be run using the AIR Debug Launcher (ADL). If you choose to package your AIR application,
then after the
package
task is complete, you will find a
certificat.pfx
file and a
HelloWorld.air
file
within the development directory.
The property settings in this build file are pretty basic and may not suit larger projects. Play around with
your own build file as it suits your needs per project. These files can be moved from one development
directory to the next without affecting the automation process, though it is recommended that you change
any application-specific property values.
Simple Debug Panel
If your debugging tasks are simply logging- or trace-related and don’t rely on stepping through break-
points or handling faults, then you may find it difficult to find the time to open a separate command
prompt to launch the Flash Debugger. Creating a simple debug panel to handle all your
trace
state-
ments would be an excellent example of an AIR application that is quick to create and extremely handy
when it comes time to debug any of your other AIR applications.
Take what you have learned from this chapter and make your own simple debug panel — in fact, one
is available in the code examples for this chapter on the accompanying website. The source is included
and you may modify the code as you see fit. One possible addition is a write-to-log feature if you are
feeling adventurous. The SimpleDebugPanel application does not employ anything specific to the AIR
API and uses
LocalConnection
to pass logging statements from your application to the debug panel
running under the AIR runtime. The
README
file included in the directory outlines correct usage in your
applications, as you need to add some class files to your projects in order for the debug panel to receive
log statements.
Summary
In this chapter you built your first AIR project, a simple Hello World application, and learned about
the command-line tools provided in the AIR SDK installation. Also included in this chapter were some
time-saving solutions for building and debugging applications. In the following chapters you will build
applications that are practical in real-world scenarios — and, it is hoped, have some fun while doing so.
20