Preparing to Build Your First AIR Application
- How to Use Flex Builder 3 for AIR Development
- How to Use Flash CS3 Pro for AIR Development
- How to Use Dreamweaver CS3 for AIR Development
- Workshop
How to Use Flex Builder 3 for AIR Development
Setting up Flex Builder 3 for AIR development is a simple matter because everything you need to develop AIR applications is included. Why would anyone want to use another development tool? One possible reason is that Flex Builder 3 might not be free and for smaller, cost-conscious firms, the relatively low upgrade cost might be too much.
Other considerations might make Flex Builder 3 a poor choice. If you are not planning to leverage Flex as your development language for your AIR applications, Flex Builder 3 is not the best choice for you. If you are a Flash developer, you should take a look at the Adobe AIR Update for Flash CS3 Professional. If you are a fan of Dreamweaver, give the Adobe AIR Extension for Dreamweaver a try. The next two sections in this hour discuss both of these alternatives to Flex Builder 3.
Okay, so you are still here and want to create your AIR applications with Flex-based code. Without a doubt, Flex Builder 3 is the de facto tool for quickly building Flex-based AIR applications. You should have already downloaded and installed the trial version of Flex Builder 3 (during the Exercises found at the end of Hour 1, “Taking a Deep Breath of AIR”). If not, do so now from www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email.
As mentioned in Hour 2, “Ready to Install AIR,” the installation steps are outside the scope of this book. The goal for this section is to familiarize you with the AIR-related parts of Flex Builder 3 and not how to install the tool.
With Flex Builder 3 installed, fire it up and you see a main screen that looks like Figure 4.1. This screen is the Flex Start Page.
Figure 4.1 The Flex Start Page.
You can always get to this screen by looking under the Help menu and selecting Flex Start Page.
The Flex Start Page is a great place to start learning more about building web-based, rich Internet applications, so you can spend some time here later if you like. In the meantime, take a look at the built-in AIR development features found in Flex Builder 3. With Flex Builder 3 you can perform all of the following:
Create a Flex-based project for coding your AIR application using a wizard-style user interface (UI). Figure 4.2 shows the first step of this wizard-style UI. The rest of the steps are covered in Hour 5, “Writing Your First AIR Application with Flex 3.”
Figure 4.2 Step one of a new Flex project for building an AIR application.
Automatically create the AIR application descriptor, an Extensible Markup Language (XML)–based file that contains metadata information about how the AIR application is handled. This file is automatically generated and named according to the following convention: the AIR main application filename (sans the .mxml extension) plus -app.xml (for example, HelloWorld-app.xml), as shown in Figure 4.3.
Figure 4.3 The AIR application XML-based descriptor filename.
Test your AIR application from the toolbar to ensure that you are satisfied with the functioning of your AIR application. Figure 4.4 shows this capability.
Figure 4.4 Testing an AIR application from a Flex Builder 3 menu.
- Use the Debug toolbar button to debug your AIR applications from within Flex Builder 3. Hour 9, “Debugging AIR Applications,” covers debugging in detail.
- Profile the performance of your AIR application by clicking the Profile toolbar button.
- Package your AIR application for distribution from a wizard-style tool. Hour 10, “Distributing Your AIR Application,” covers packaging and distribution in detail.
Access abundant help within the Flex Builder 3 application. Figure 4.5 shows an example of searching for help for the topic, AIR.
Figure 4.5 Help for developing an AIR application from Flex Builder 3.
As you can see, if you are going to use Flex-based code to build your AIR applications, the price of the Flex Builder 3 integrated development environment (IDE) might well be worth the expense.