tags:

views:

80

answers:

2

I am using Fedora 12 (linux) Installed Packages adobeair.i386 2.0.2-12610 @adobe-linux-i386.

I want to make a simple "hello world" application which is able to run in my desktop and also via http://localhost/air/index.php

Can someone please show me step by step, a working example?

Thank you Regards

N.B: What are the differences between Adobe Air and Adobe Flex? Can you share please, seems very confusing, i could use C++ (which is Air) and i could use PHP (which is Flex), like that kind of difference?

+1  A: 

This could've been solved by googling "adobe air tutorial hello world", but here's the link to Adobe's official air beginner hello world tutorial: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7ecc.html

Rafe Kettler
@Rafe Kettler: screenshot: http://i.imgur.com/lA0mM.png , Question is not finding a tutorial, the reason of asking here is in web url its not working, but CLI its working. Can you please show me how can i do the same result in Web browser also?
Stackfan
@Stackfan: I'm not sure, I'm not very familiar with Air (I thought this was a more straightforward "I'm too lazy to find it" question). Even though you get an error message, it looks like it displays all right, so what's the problem?
Rafe Kettler
In the screen shot you can see, i get a error :air is undefined[Break on this error] air.trace("Hello World"); My goal is more or less get it workout from browser instead of CLI.
Stackfan
@Rafe Ketter: that means, i use Air for Desktop Release? And Flex i will use for Web release?
Stackfan
The whole Flash / Air / Flex seems still confusing to me. Even i read there hello world and compiled there hello world in Flex or Air. Any differences between Flash / Air / Flex can you explain?
Stackfan
Why exactly i/1 should use Air and Flex? What comes the choice for? In case of desktop or mobile or web browsers release we take Air ? or we take Flex?
Stackfan
Air is the language/dev platform, Flex is a utility for making web apps with Air
Rafe Kettler
+2  A: 

The AIR app won't work in a browser. For the web version, you would use Flex and for the desktop version you would use AIR. Both applications can be written in Actionscript 3 however, unlike Flex apps, AIR apps can also be written in HTML/JS. If you write your apps in Actionscript 3, your Flex and AIR apps could use almost identical code. Obviously, there are a few classes which can only be used in AIR as these related to desktop functionality. If you look at the Actionscript 3 reference (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/), you can see which of the classes are AIR only and which can be used in both Flex and AIR.

AIR files are exported as .air files while Flex file are exported as regular Flash .swf files.

As far as, "C++ (which is Air) and i could use PHP (which is Flex)", that is sort of right. AIR is a replacement for C++ in that you can write desktop apps with both. However, because of the AIR runtime, you do not have to write different versions for different operating systems. the one AIR app will work on Windows, Mac, Linux and now Android phones. With C++, you'd have to modify your codebase for all of these environments. Flex is not like PHP however, it's client side so is more like a more-powerful Javascript. You can have a Flex app talking to a PHP backend (using AMFPHP or Zend_AMF to communicate) which handles all the server-side stuff like retrieving data from a database and sending it back to the Flex app running in the browser on the client. Flex is sort of like a collection of components (it's officially an SDK) to make writing web apps easier. So, for example, there's drop-down menus, date-pickers, datagrids, trees, video displays, etc, plus everything else that's available in Flash. IMO, the best thing about Flex development over HTML/JS development is the layout model. You can make some very complex fluid layouts very easily in Flex which adapt to different screen sizes. You also don't have to do much in the way of cross-browser testing - it looks the same in all browsers on all OSes as long as the user has the approriate Flash Player. It's also very fast when handling lots of data and makes it easy to mix many different multimedia components, video, audio, etc, in the same app. Some good apps written in Flex are Aviary, Photoshop.com and Buzzword. Some good AIR apps are the eBay desktop client, Feedalizr, Seesmic Desktop, etc.

dazweeja
Thanks for breaking it in to details, its a good information to make the choice as a new person (coming from pascal/c/c++/c#), reading 500 pages only to make choice for air/flex/flash seems crazy to me. Thanks a lot.
Stackfan