Chapter 17. AIR Application Distribution with the Browser API

After you create your AIR application, you will need a reliable means of distributing your application to its potential users. The AIR Browser API enables developers to distribute their applications via the browser so that the install process is as seamless as possible for the end user. When you use the Browser API, you can prevent a user from having to install AIR separately from your application. This means the user can install your application without ever leaving your site and in as few steps as possible.

In addition, the Browser API provides functionality beyond installation. For example, you can launch an AIR application from the browser. Additionally, you can determine valuable pieces of information about the user’s environment including whether the user has AIR installed, whether the user has your application installed, and what version of your application is installed.

Including the Browser API

Problem

You need to include the Browser API in a Flash movie to interact with an AIR application from the Web.

Solution

Include the Browser API SWF in your application to gain the needed functionality.

Discussion

To utilize any of the Browser API functionality, it must first be included in your application. Adobe hosts the SWF for the Browser API at http://airdownload.adobe.com/air/browserapi/air.swf. You can load this SWF into your Flash, Flex, or SWF-based AIR application to provide the Browser API functionality.

This snippet ...

Get Adobe AIR 1.5 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.