Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference

(nextflipdebug5) #1

34 | Chapter 2: Getting Started with AIR Development


TIP
Checking for the existence of the runtime property is a
simple way to determine whether your HTML and
JavaScript application is running within Adobe AIR.
if(window.runtime)
{
//running within AIR
}

Now that we have created both the application descriptor
file, as well as the root HTML application file, we are ready
to run and test our application within the runtime.


Testing the Application


While there are a number of HTML IDEs (such as
Dreamweaver) that are adding support for launching and
testing AIR applications directly from within the IDE, we will
focus on launching and testing AIR applications using the
ADL command-line tool included within the SDK. This will
provide a solid basis for an understanding of what is going
on. It will also provides the most flexibility in integrating the
development process with other IDEs, editors and work-
flows.


Using ADL to Launch the Application


The first step in testing the application is to run it as an AIR
application to make sure that:



  • There are no errors in the application descriptor file

  • The application launches

  • The HTML renders correctly

  • The JavaScript code functions as expected

Free download pdf