PDA

View Full Version : Any one start playing with AIR?



awflasher
June 25th, 2007, 02:06 PM
Does the AIR project's everything have to be started from a mxml?

I downloaded a lot of sources from adobe.com and some projects contains only an as file and a app-xml file, and some other files.
No mxml is found and the complier just cannot be launched!

Krilnon
June 25th, 2007, 02:24 PM
What are you using to compile the projects?

senocular
June 25th, 2007, 02:33 PM
Flex SWFs are created with MXML. You do not need to use MXML for AIR projects. In fact, you don't even need to make new projects to develop something in AIR.

AIR is essentially a player. It "plays" HTML, SWF, and PDF where HTML and SWF documents can represent the main or "root" document within an AIR application - the document first loaded when the app is run.

The only thing required to make AIR work outside of all your normal SWF and HTML development is an extra XML file that describes your application (app-xml). This file provides the name of the Window the AIR application produces, the root SWF or HTML file with what window chrome it should use, information about that application like description or copyright, along with icons it uses and some other information if you want to generate an installer (in fact most of the information is for making an installer - I think the root file and the name may be the only required, can't remember now).

When the AIR "player" launches, it basically launches the XML file. That file tells AIR what kind of window to launch (title, chrome) and what to load into that window (root document) to make up the resulting application. You could just as well use existing SWFs or HTML files you already have, just so long as you make an application XML file for AIR to point to them.

An AIR (.air) file is an installer. This is a wrapper for the root document and other files that might be needed to run your app along with the application XML used to launch it. By running an AIR you extract the application files to a directory on your computer which are then used to launch the actual application (using the XML file).

If you download the SDK, there will be an example application.xml file in the templates folder. Create a new one of those pointing to a SWF or HTML file (in the rootContent node) and just drag it on to adl in the bin folder to launch that file as an AIR app.

Outside of just playing existing files, you can develop content to make use of features specific to files being played within the AIR shell. AIR will add new classes and features to both Flash and HTML to do things like save files to the hard drive and open windows etc. Look for documentation from the AIR pages on labs.adobe.com for more information and the Flex 3 livedocs for Flash AIR API http://livedocs.adobe.com/labs/flex/3/langref/


Oh, and you can use the compiler to compile just AS files - so its possible those AS files are the complete source files to the SWFs being used for the AIR app.

awflasher
June 26th, 2007, 05:30 AM
senocular, thanks very much :)