There are three things to be done
- Application XML file.
- HTML File.
- Executing the application.
Application XML File
- Create a XML file named <AppName>-app.xml, here appname can be HelloAIR.
- The structure of XML is
The text of rootContent element represents the name of the html file that is associated with the xml.
The following the html code
The appLoad is invoked when the page is loaded. As shown above we are including the standard AIRAliases.js file in the HTML file, so AIR runtime will be initialized. If its initialized the Air.Trace statement is used to print on AIR console “Hello Air”. Then XMLHTTP request is made for getting request.txt file and dumping the content of that file onto the AIR console.
Executing the Application
When the AIR sdk is extracted there are two programs that come
- ADL: To execute the AIR application
- ADT: to package the AIR application
Use the adl command to execute the AIR application.
The ADL command