Chapter 9. Desktop 2.0 with AIR
This chapter covers
- Creating a common SWC library
- Making an AIR version of a Flex application
- Creating a key for signing the application
- Packaging the application for distribution
- Distributing the AIR application via the web
Although your Flex application is rich and engaging, some power users will want a version that they can download and install locally as a desktop application. Adobe AIR allows you to easily accomplish this otherwise daunting task. RIAs blur the line between traditional web applications and desktop client applications, especially when you can convert the Flex application to a desktop application running in the Adobe AIR runtime by changing only a couple of lines of code. Yes, you heard that right—only a couple of lines. What other framework allows you to reuse this much of the client code, going from a purely web-based experience to a desktop application?
You do want to be able to use the Flex version of your application, so you’re going to refactor all the code that will be common between the Flex application and the AIR application that you’re going to build into a separate Shockwave Component (SWC) project. Then you can declare a dependency on this SWC library in both the AIR project and the Flex project.