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!

23 Responses to “35+ AIR Examples for JavaScript Developers”

  1. Andrew Wooldridge Says:

    These examples are great! I’m going to be using some of this for my AIR based RPG - Limitless Quest…

  2. Area sviluppo Tesene » Blog Archive » Adobe AIR - Ebook gratuito Says:

    […] Altri esempi si trovano qui.  […]

  3. ArtBuilders on Design 3.0 » Blog Archive » Ajaxian.com Posts Adobe AIR E-Book Says:

    […] http://blog.kevinhoyt.org/2007/06/27/35-air-examples-for-javascript-developers/ […]

  4. on AIR Weblog Says:

    […] 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 […]

  5. Arnaud Pagnier Says:

    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.

  6. Andre’s Blog » Blog Archive » links for 2007-07-04 Says:

    […] 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) […]

  7. Gary Gilbert Says:

    Kevin,

    Great “Atomic” examples exactly the style of examples that I find to be the most beneficial when learning something new!

  8. 35+ AIR Examples for JavaScript Developers « Flash Enabled - Get Ready With Flash… Says:

    […] To read the full post and download the examples, click here. […]

  9. Kent Brewster Says:

    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.

  10. 01 Hiso's Digital eVil » 35+ AIR Examples for JavaScript Says:

    […] Kevin Hoyt在他的35+ AIR Examples for JavaScript Developers一文中提供了,提供了不少用JavaScript開發AIR的範例(檔案連結),另外有免費的“AIR Pocket Guide for JavaScript Developers”之pdf下載,你可用之前提過的Dreamweaver CS3或Aptana的外掛來作測試,而下面是範例的列表: […]

  11. Nilesh Says:

    Oh thanks much for the examples and resource links to get started. Ummie examples, more please :)

    thanks,
    Nilesh

  12. 35 AIR examples for javascript developers | Adobe AIR Tutorials Says:

    […] 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/ […]

  13. reintroducing.com Blogging Receptacle » Blog Archive » 35+ AIR Examples For JS Devs Says:

    […] 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 […]

  14. snydersoft.com » Blog Archive » Air Sample Applications Says:

    […] 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/ […]

  15. Puleen Patel Says:

    AIR is beautiful :)

    This is great, I am going through your book and it’s great that there are more examples available.

    Cheers!

  16. Chizl Says:

    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.

  17. Kevin Hoyt Says:

    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

  18. Caglar kaya Says:

    These examples are great! I’m going to be using some of this for my AIR based RPG - Limitless Quest…

  19. Mondo Libero Says:

    Wonderful examples, thanks

  20. sohni Says:

    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

  21. Abi Says:

    Nice exapmles! I like this poat.

  22. denemo Says:

    Great stuff like you usually post!
    Thanks

  23. ankara nakliyat Says:

    good working .
    thanks.

Leave a Reply