Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference

(nextflipdebug5) #1
Creating a Simple AIR Application with HTML and JavaScript | 29

Creating the Application Files


Every AIR application contains a minimum of two files. The
first file is the root content file. This is the main HTML or
SWF file for the application, and is the file that will be dis-
played/executed when the application first starts up.


The second file is called the application descriptor file, which
is an XML file that provides metadata to Adobe AIR about
the application.


Let’s create these files for our application:


1.Create a new folder calledAIRHelloWorld.
2.Inside of this folder, create two new files called
AIRHelloWorld.html andAIRHelloWorld.xml.
3.Open each of these files using your favorite text or
HTML editor/IDE.

Understanding application descriptor files


The application descriptor file is an XML file required for
each AIR application. It provides general metadata (such as
application name and description) to Adobe AIR, as well as
information on how the application should be run. This
includes specifying the root application file for the applica-
tion and the window mode that the initial application win-
dow should use.


First, let’s look at the entire application descriptor file
(AIRHelloWorld.xml) for our application, and then we will
go into more detail on each item within the file.


TIP
You can find a sample application descriptor file in the
AIR SDK in the templates folder.
Free download pdf