Creating a sample Hello World Adobe AIR application with HTML and Javascript
I thought I might try to study how to create air application with HTML and javascript,
so, I went to the Livedocs and, here’s how I learned it:
Firstly,
You have to download and/or install the following files (Assuming you have windows as your OS):
http://www.adobe.com/go/learn_air_download_AIRSDK_en
Note:
ADL requires Java JDK:
http://java.sun.com/javase/downloads/index.jsp
Adobe AIR:
http://get.adobe.com/air/
1. Create a folder named “HelloWorld”.
2. Create 2 files, named “HelloWorld-app.xml” , “HelloWorld.html” that should be in “HelloWorld” directory.
3. copy AIRAliases.js from ADL frameworks directory to HelloWorld directory.
4. edit HelloWorld-app.xml, and save it with this text:
<id>examples.html.HelloWorld</id>
<version>0.1</version>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.html</content>
<visible>true</visible>
<width>400</width>
<height>200</height>
</initialWindow>
</application>
5. edit HelloWorld.html and save it with this text:
<head>
<title>Hello World</title>
<script src=”AIRAliases.js” type=”text/javascript”></script>
<script type=”text/javascript”>
function appLoad(){
air.trace(”Hello World”);
}
</script>
</head>
<body onLoad=”appLoad()”>
<h1>Hello World</h1>
</body>
</html>
To test the application , go to command console , and type:
If there are no problems, your AIR application should show up like this:

6. use the ADT utility to package the application into an AIR installation file.
Air applications must be digitally signed, especially for commercial distribution for application security. See AIR security for more details and information.
Create the HelloWorld Air application file by typing this in the command console:
HelloWorld-app.xml HelloWorld.html AIRAliases.js







meloncolie said,
March 13, 2008 @ 2:30 am
Astig mo Joe… teach me please…
phpcurious said,
March 13, 2008 @ 8:50 am
some related articles you would read:
1. http://extjs.com/blog/2007/06/29/building-a-desktop-application-with-ext-air-aptana-and-red-bull/
phpcurious said,
May 21, 2008 @ 1:45 am
http://weblog.mrinalwadhwa.com/2008/05/21/adobe-air-versus-microsoft-silverlight/
phpcurious said,
May 21, 2008 @ 6:39 am
http://findbyclick.blogspot.com/2008/05/adobe-air-operating-system.html