FilChi Weblog

Creating a sample Hello World Adobe AIR application with HTML and Javascript

Posted by: phpcurious on: March 12, 2008

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

6 Responses to "Creating a sample Hello World Adobe AIR application with HTML and Javascript"

Astig mo Joe… teach me please…

[...] geposte link naar tutorial is voor Adobe AIR beta en werkte dus maar half meer met de nieuwe AIR. Deze tutorial half toegepast, geeft eindelijke een deftig Hello World [...]

In my case
When I copy 3 files mentioned above in the BIN directory, and using first command then it is giving error

application descriptor not found

Please tell me how to do it as I am new to AIR programming.

Leave a Reply

Flickr Photos

Cris Daquiz Despedida Party

Getz Bros Summer Outing 2009

The other teams

Our Team vs. Francis' Team

guys of Getz Bros Philippines

More Photos