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):

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:

<application xmlns=”http://ns.adobe.com/air/application/1.0″>
<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:

<html>
<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:

adl HelloWorld-app.xml

If there are no problems, your AIR application should show up like this:
Adobe AIR Hello World

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:

adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air
HelloWorld-app.xml HelloWorld.html AIRAliases.js

already installed HelloWorld AIR application

4 Responses so far »

  1. 1

    meloncolie said,

    March 13, 2008 @ 2:30 am

    Astig mo Joe… teach me please…

  2. 2

    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/

  3. 3

    phpcurious said,

    May 21, 2008 @ 1:45 am

    http://weblog.mrinalwadhwa.com/2008/05/21/adobe-air-versus-microsoft-silverlight/

  4. 4

    phpcurious said,

    May 21, 2008 @ 6:39 am

    http://findbyclick.blogspot.com/2008/05/adobe-air-operating-system.html

Comment RSS · TrackBack URI

Say your words