Daniel Dura

All About the Adobe Flash Platform

Archive for the ‘AIR’ Category

AIR and Flex Presentations and Code Samples

with 12 comments

I have been pretty slack in posting this. Over the past few months I have been busy presenting on AIR and Flex at numerous events such as the onAIR Bus Tour and Adobe MAX. I have just finished cleaning up and compiling all of the examples and the presentations that I have been showing.

There are two presentations, compiled as PDFs. Most of my AIR presentations are a variation of the one below. I have also included a Flex Builder presentation that I gave here in Europe at the Beyond Boundaries events we held in Amsterdam and Brussels. Along with the presentations is an archive of Flex Builder project archives that contain most of the code I have showed.

Enough talking, here are the files:

Written by Daniel Dura

October 9th, 2007 at 11:36 am

Posted in AIR,Conferences,Flex

Weekly AIR Application Showcase

with 5 comments

I have decided to do a weekly showcase on this site. This will be a video showcase in which I will demo an AIR application of my choosing that I think is not only illustrative of what an AIR application can and should be, but is just plain cool and useful. If I have time, I may even interview some of the creators of these applications and get some insight into their work.

I have some ideas about which applications I am going to showcase first, and there are definitely quite a few to choose from now that the AIR Developer Derby has finally complete. But if you want to have your AIR application moved to the top of the list, or just want to make me aware of what you are working on, please feel free to contact me.

I will probably be starting this showcase next week, so keep an eye out here on my blog.

Written by Daniel Dura

September 18th, 2007 at 9:39 am

Posted in AIR,Showcase

Adobe AIR Does Not Compete With Silverlight

with 9 comments

As I have been reading in many blog posts lately, I felt that I needed to make one point perfectly clear. Silverlight is not Microsoft’s answer to Adobe AIR, it is Microsoft’s competitor to the Flash Player. This means they now have a competitor to Flash in the browser. Sorry for the bold type, but I wanted to make sure my point was made. I know that many of the readers of my blog get this, but there still seems to be quite a bit of confusion.

Adobe AIR is a new technology that allows developers to take their web applications which were built using Ajax or Flash and move them outside of the browser where they can take advantage of desktop features such as file IO, system notifications, multiple windows, drag and drop, etc. I am not sure where the confusion is coming from, maybe just ignorance and the fact that Adobe AIR and Silverlight are getting a lot of press. But right now Microsoft does not have a cross platform runtime equivalent to AIR (not that I know of, I am willing to be proven wrong here if someone has that information.)

I am not trying to put down Silverlight here. Congrats to the Silverlight team, I am sure they are having some big parties this week after their launch. Silverlight is a good attempt at accomplishing some of the same functionality that we have provided in the Flash Player. But we do have a ten year head start and the Flash Player is installed on 98% of all PCs today (we just announced that Flash Player 9 is on over 90% of PCs.) But, we don’t take the competition or our current position in this market lightly.

As you can see by our recent announcements, such as the addition of H.264 to the Flash Player, we will continue to innovate and do everything we can to make Flash the best platform for building RIAs in the browser and now on the desktop within Adobe AIR. As Ted mentioned yesterday, we have a lot of things you will want to keep an eye on. Just wait until you see what we will be talking about at MAX!

Written by Daniel Dura

September 7th, 2007 at 9:03 am

Taking Your Applications Offline Using AIR

without comments

When we are out talking to developers about AIR, we spend a lot of time discussing offline applications. AIR has a lot of functionality for building offline applications such as connectivity APIs and an embedded SQLite database engine. What we don’t focus on is how you actually approach architecting these applications. Not only do you need to consider how to architect your code, but how do you actually surface the functionality to the end user?

Google recently announced a new browser plugin that allows you to build offline applications within the browser called Google Gears. Much like AIR, Google Gears uses an embedded SQLite database to store data for offline access. But again it is up to the developer to consider how to architect their application to use this functionality effectively.

Although there are differences between the Google Gears and AIR implementations, the way you architect your application is going to be very similar. Google just recently published a case study of a startup called Remember the Milk that is using Google Gears to do offline data storage within its Ajax based task management application. Although this article is targeted at developers using Google Gears, there is a lot of information that will be valuable if you are developing a Flex, Flash, or Ajax based AIR application and want users to have access to online data when they are offline.

Written by Daniel Dura

September 5th, 2007 at 3:04 pm

Posted in AIR,Ajax

The Desktop Takes Center Stage Again

without comments

One thing I am asked about ever so often is the reasoning behind building a desktop runtime when over the last few years people have been moving to the web? Even though there are benefits to building purely web based applications using Flex, Ajax, or other similar technologies, you still are leaving a lot of functionality on the table when making that transition. The question is, what platform can I use to get the best of both the desktop and the browser? I believe AIR is the answer to that question and I think other people are starting to take notice.

BusinessWeek has a great article today that discusses exactly this issue. From the article:

Perhaps most important for developers, the desktop’s advantage is that it is still the first thing users see when they turn on their computer. If your icon is there, it’s more likely that a user will opt to use your product—rather than the myriad other programs on the Web. Says Kay of Finetune: “It’s not in a browser window that might get closed.”

Read the entire article here.

Written by Daniel Dura

September 5th, 2007 at 10:53 am

Posted in AIR,Ajax

When will H.264 be in AIR?

with one comment

There were a lot of announcements today about features that will be in the update to the Flash Player, code-named Moviestar. The most interesting of these features was H.264, but also included are AAC playback and many hardware acceleration optimizations for video rendering in general.

You may be wondering when you will be able to use these features in AIR. As Mike Downey mentioned in his keynote at the onAIR Bus Tour event in DC, we will be releasing a new beta of AIR at MAX which will contain all of these features announced today.

Update: Looks like I jumped the gun on this a little bit. The H.264 feature will not be in AIR until a post MAX release, but will definitely be in AIR 1.0.

Written by Daniel Dura

August 21st, 2007 at 9:25 am

Posted in Adobe,AIR,Flash Video

New AIR Pocketguide from O’Reilly on Amazon

with 2 comments

The new AIR Pocketguide for JavaScript Developers that Mike Chambers, Kevin Hoyt, and I wrote is now available on Amazon. For some reason the cover isn’t shown on Amazon but I have attached it here. This book is in the same format as the Apollo for Adobe Flex Developers Pocket Guide that we released during the beta but focuses on developing AIR applications using JavaScript.

Amazon will not be the only way you can get your hands on the book. We will be making a PDF of the book available and you can also get a free printed copy by attending one of the free onAIR Bus Tour events around the country. Also, the contents of the book are released under a Creative Commons license.

Written by Daniel Dura

June 26th, 2007 at 1:32 pm

Posted in Adobe,AIR,Ajax

TwitterCamp Update

without comments

Today I updated TwitterCamp to use the AIR (formerly Apollo) Beta. You can download the new AIR package from the above link as well as see the updated source code. Hopefully by the time the bus tour starts I will have the code for TwitterCamp available on Google Code. This should allow you to keep up with any updates that are made via the Subversion repository. Let me know about any issues that you have installing or if you have any feature requests.

Written by Daniel Dura

June 18th, 2007 at 12:36 pm

Posted in AIR

Apollo Beta Sneak Peak: Drag and Drop

with 5 comments

Over the past few weeks I have been on the road in Tokyo, London, and now Paris. I am actually writing this post as I travel underneath the English Channel on the train! In Tokyo, Mike Chambers and I presented at the Apollo Camp there. My presentation was a sneak peak of some of the beta functionality that will be released in the Apollo Public Beta. The beta should be out in early summer (hmmm, isn’t it summer already?) Until that day comes, I am going to share some of what I have been presenting while on the road and give you a sneak peak of some of the new functionality that will be in this release.

One of the most exciting features in the Apollo Beta is Drag and Drop support. This is full OS level drag and drop support. You will be able to drag files, images, urls, text, serialized ActionScript objects, and other types to and from your Apollo application and other non Apollo applications and the desktop. You can control the image that is dragged and the modifiers that are allowed (copy, link, move, etc.) The first example I am going to share with you is how to start a drag operation from your Apollo application.

In this example, we are going to initiate a drag whenever a user clicks on a Button. We will use a snapshot of the button as the drag proxy (the image you see during the drag operation.) We will be transferring a URL with the drag which will allow us to drop this on browsers, text editors, and any other application that accepts URL types.

First you prepare the data that you are going to share with the drag and drop operation. To do this, you use an instance of the TransferableData class. This class allows you to add multiple data entries that are transfered with the drag operation by using the addData method. So for example, if I am dragging a URL, I might want to put both a URL format and a text format on the TransferableData object. The receiving application can then decide which data format is most appropriate.

var transfer:TransferableData = new TransferableData();
transfer.addData( “http://www.danieldura.com”, TransferableFormats.URL_FORMAT );
transfer.addData( “Daniel Dura’s Weblog”, TransferableFormats.TEXT_FORMAT );

Next, we want to specify a custom image that will be dragged with the image and will represent our data. For this example, we will just take a snapshot of the button that the user is clicking on and use that as our drag proxy. The drag and drop API takes a BitmapData object for this purpose.

var dragImage:BitmapData = new BitmapData( dragButton.width, dragButton.height, true );
dragImage.draw( dragButton );

Last, we initiate the drag by calling the DragManager.doDrag method. This method takes three arguments: the initiating display object, the TransferableData instance, and the BitmapData instance for the drag image.

DragManager.doDrag( dragButton, transfer, dragImage );

Here is the full example:


import flash.desktop.ClipboardManager;
import flash.desktop.TransferableFormats;
import flash.desktop.TransferableData;
import flash.desktop.DragManager;

private function handle_imageClick():void
var transferFormat:TransferableData = new TransferableData();
transferFormat.addData( "http://www.danieldura.com",
TransferableFormats.URL_FORMAT );

var dragImage:BitmapData = new BitmapData( dragButton.width,
dragButton.height, true );
dragImage.draw( dragButton );

DragManager.doDrag( dragButton, transferFormat, dragImage );


x="10" y="10"/>


So, this is just a very small taste of the funtionality available in the drag and drop API. In my next post, I will show how you can accept drops from other applications.

Written by Daniel Dura

June 8th, 2007 at 1:29 pm

Posted in AIR

Video Demo: Adobe Media Player

with 9 comments

Yesterday we announced the Adobe Media Player, previously codenamed Philo. I have attached below a video of the application in action. This video comes from the Web 2.0 Expo where Kevin Lynch was presenting (this video was taken by Josh Lowensohn of CNet’s Webware.com):

The Adobe Media Player serves the need of two groups: video consumers, and video distributors. For consumers of video it allows them to consume both local and remote video resources in a very rich application. They can aggregate RSS feeds that contain video assets which will be stored locally for offline use. Consumers can also import video that can be found on their local machine. We are also adding a social aspect to the application that will allow users to rate and comment on videos.

Video distributors and producers can publish RSS feeds that contain videos for consumption in the Adobe Media Player. They can include information about custom branding that they would like to appear in their feed to provide a unique user interface. There are also some reporting, advertising, and content protection features that will be available.

A beta of the Adobe Media Player should be available this summer.

Written by Daniel Dura

April 17th, 2007 at 5:11 pm

Posted in Adobe,AIR,Flash Video