35+ AIR Examples for JavaScript Developers
You may not have known this, but it was completely possible to author an AIR application with the “Apollo Alpha” using only your favorite HTML editor. No Flash and no Flex required; just you and your HTML. This continues to be the case with the AIR Beta, which improves integration and offers more features. Hot off the presses, the “AIR Pocket Guide for JavaScript Developers” aims to accelerate your success in getting started with this workflow.
I was lucky enough to be able to contribute to this book along side Mike Chambers and Danny Dura. Even after our deadline, I continued to grow my list of cookbook examples – often times based on customer requests. To that end, here are more than thirty-five (35+) source code examples for the AIR developer using JavaScript. Many of these are in the book, while many others are not. Yet others have been refined and updated.
At the time of this post, the complete list of examples is:
- Read a Text File Synchronously
- Read a Text File Asynchronously
- Reading XML Data (using XMLHttpRequest)
- Writing a Text File
- Creating a Temporary File
- Uploading a File in the Background
- Creating a New Window
- Creating a New Native Window
- Creating a Full Screen Window
- Creating Customized Chrome
- Adding Custom Window Controls
- Meebo Window
- Digg iPhone
- Selecting a File
- Selecting Multiple Files
- Selecting a Directory
- Connectivity to an HTTP Server
- Connectivity to a Jabber Server
- Dragging Text Into an Application
- Dragging an Image Into an Application
- Dragging Files Into an Application
- Dragging From an Application to the Desktop
- Putting Files on the Clipboard
- Getting Files from the Clipboard
- Reading XML Data (using XMLHttpRequest)
- Connecting to a Database
- Creating Database Tables
- Storing Data in a Database
- Accessing Data in a Database
- Database Concepts Applied
- Full Database CRUD
- Using a JavaScript Encoder
- Using an ActionScript Encoder
- Playing a Sound
- Scaling an Image
- Determining Image Dimensions
- MapCache (Yahoo! Maps)
There’s no particular order to these examples, and while some of them do build off a previous example (slightly), they are for the most part what I call “feature-atomic.” That means that if you’re simply looking to solve a particular problem around a specific feature of AIR, then you’ll likely find an example in this list. If there’s something that’s not on this list, then I’d encourage you to leave a comment, or to email me directly.
I can see a future where these are rolled into an “Example Browser” AIR application. You’d be able to install the application, select from a list of examples, and then see the associated code. The application could check a server periodically for updates, and download them as necessary. It’d also make for a great conduit for example requests, ratings and more.
That’s the future though, and for now I’m just happy to see the book hit the market, and to finally release the source code for these examples to the community. The book is also available for free online from Ajaxian as a download in PDF format. For now the book is only available on Amazon. If you’re going to be attending any of the onAIR bus tour events, you’ll also likely be able to score a free printed copy of the book!
What are you waiting for? Download the AIR Beta SDK, crack open your preferred HTML authoring environment (I recommend Dreamweaver CS3 or Aptana), and let us know what you think!
June 27th, 2007 at 6:08 pm
These examples are great! I’m going to be using some of this for my AIR based RPG - Limitless Quest…
June 28th, 2007 at 9:23 am
[…] Altri esempi si trovano qui. […]
June 30th, 2007 at 2:33 am
[…] http://blog.kevinhoyt.org/2007/06/27/35-air-examples-for-javascript-developers/ […]
July 2nd, 2007 at 5:20 pm
[…] are going to be talking about how to leverage HTML/JavaScript inside of Adobe AIR. In fact, Kevin Hoyt has been working on a bunch of examples to show both how powerful JavaScript and AIR can be and how […]
July 3rd, 2007 at 9:46 am
Hi ! Fine and clever examples. I’ve trying the DragNDrop sample… but encoder only generate totaly black (JPGEncoder) or white (PNGEncoder) images. Is there a problem with library.swf ? Please, tell me more about that… Thanks a lot. Regards.
July 3rd, 2007 at 10:22 pm
[…] 35+ AIR Examples for JavaScript Developers | Kevin Hoyt here are more than thirty-five (35+) source code examples for the AIR developer using JavaScript. (tags: air tutorials javascript examples sample kevinhoyt adobe) […]
July 4th, 2007 at 4:48 am
Kevin,
Great “Atomic” examples exactly the style of examples that I find to be the most beneficial when learning something new!
July 4th, 2007 at 8:34 am
[…] To read the full post and download the examples, click here. […]
July 10th, 2007 at 2:33 pm
I’m in Seattle right now watching the eBay presentation … my first app using AIR was remarkably easy to bring up; I ported over one of my Web search widgets, added a Close button and a drag handle, and it ran, first try. See here:
http://kentbrewster.com/air-search/
This little guy uses Yahoo! and del.icio.us to find, show, and (optionally) bookmark search results.
July 14th, 2007 at 12:08 pm
[…] Kevin Hoyt在他的35+ AIR Examples for JavaScript Developers一文中提供了,提供了不少用JavaScript開發AIR的範例(檔案連結),另外有免費的“AIR Pocket Guide for JavaScript Developers”之pdf下載,你可用之前提過的Dreamweaver CS3或Aptana的外掛來作測試,而下面是範例的列表: […]
July 15th, 2007 at 1:48 pm
Oh thanks much for the examples and resource links to get started. Ummie examples, more please
thanks,
Nilesh
July 20th, 2007 at 2:07 am
[…] Lot and Lots of example to learn.Yes all you require to start is your HTML editor. Download source code @ http://blog.kevinhoyt.org/2007/06/27/35-air-examples-for-javascript-developers/ […]
July 20th, 2007 at 10:02 am
[…] hate long titles so I try to abbreviate whenever possible. Anyway, here is a page with a growing list of AIR example files for developers who are familiar with […]
August 1st, 2007 at 9:16 pm
[…] Here is the blog entry where Kevin Hoyt discusses and provides the download: http://blog.kevinhoyt.org/2007/06/27/35-air-examples-for-javascript-developers/ […]
September 11th, 2007 at 4:55 pm
AIR is beautiful
This is great, I am going through your book and it’s great that there are more examples available.
Cheers!
October 22nd, 2007 at 11:05 am
Nice examples indeed. Any plans on upgrading these to beta 2? I’m just learning and seems more people have beta 1 examples which is causing me to struggle with the learning process.
October 22nd, 2007 at 11:18 am
Chizl,
I have updated the source for Beta 2, and even included a few new samples, but just haven’t posted them yet. Good idea! Watch for a post in the coming few days.
Thanks,
Kevin
December 30th, 2007 at 6:47 pm
These examples are great! I’m going to be using some of this for my AIR based RPG - Limitless Quest…
March 1st, 2008 at 12:41 pm
Wonderful examples, thanks
March 16th, 2008 at 12:31 pm
Hi Kevin i am new to your website found very good info which you provde to your visitors i was searching for your book “Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Guide (Adobe Developer Library) Mike Chambers, Daniel Dura, Kevin Hoyt” but i could not find i tried amazon also thank you
March 28th, 2008 at 1:47 am
Nice exapmles! I like this poat.
May 2nd, 2008 at 3:48 am
Great stuff like you usually post!
Thanks
June 10th, 2008 at 7:06 am
good working .
thanks.