In this exercise you use Flash Builder to create and produce the desktop application shown in Figure 1. You will also package it as an AIR application installer.

Figure 1. Your task is to create this desktop application.
In this exercise, you will learn how to:
In order to complete this tutorial, you need the following software and files:
In this section, you will explore the contents of a Flash Builder projects bin-debug folder.
Select File > New > Flex Project (see Figure 2).

Figure 2. Create a new Flex project.
In the Select Project Location dialog box, navigate to the ex5_08_starter folder you extracted in Step 1 (see Figure 3).

Figure 3. Select the folder extracted from the exercise files.
For the Application type, click the check box next to Desktop (see Figure 4).

Figure 4. Configure the New Flex Project dialog box.
In the Select Main Application File dialog box, select the EmployeePortal.mxml file (see Figure 5).

Figure 5. Select the EmployeePortal.mxml file as the main application file.
At the bottom of the dialog box, in the ApplicationID text field, change the value to com.fiaw.EmployeePortalDesktop (see Figure 6).

Figure 6. Set the Application ID value to com.fiaw.EmployeePortalDesktop.
You should see the EmployeePortal.mxml file open in the editor view.
In this section, you will learn how to convert a Flex application so that it may be published to the desktop.
In the EmployeePortal.mxml
file, change the opening and closing Application tags to WindowedApplication tags:
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
width="980" height="690"
xmlns:components="components.*"
skinClass="skins.ApplicationContainerSkin">
...
</s:WindowedApplication>
Save the file and run the application.
You should see the Adobe AIR dialog box open and display the error: Undefined state 'normalAndInactive' (see Figure 7).

Figure 7. View the error message.
Click the Dismiss All button in the dialog box.
You should see the EmployeePortal Air application open (see Figure 8).

Figure 8. Preview the EmployeePortal desktop application.
Properties of
the parent comment, locate the states block. Change the second state
from disabled to normalAndInactive:
<s:states>
<s:State name="normal"/>
<s:State name="normalAndInactive"
/>
</s:states>
Save the file and run the application.
You should see the application runs without errors.
In this section, you will modify the way the desktop application will be displayed.
systemChrome node on line 46. Within the systemChrome tag set, enter the value none:
<systemChrome>none</systemChrome>
transparent node on line 49. Between the transparent tags, enter the value true:
<transparent>true</transparent>
Below the UI components comment, locate and comment out the Rect primitive tag block:
<!--<s:Rect width="973" height="636" x="0" y="0">
<s:stroke>
<s:LinearGradientStroke weight="1"/>
</s:stroke>
</s:Rect>-->
You should see the EmployeePortal application contains no border and has a transparent background (see Figure 9).

Figure 9. Run the application to see the change in the application.
In this section, you will create a production build of the EmployeePortal Air application.
Select Project > Export Release Build (see Figure 10).

Figure 10. Select Project > Export Release Build.
In the Export Release Build dialog box leave the default settings (see Figure 11).

Figure 11. Leave the default settings.
In the Create Self-Signed Digital Certificate dialog box, enter epd (employee portal desktop) for the Publisher name, epd for the password, and epd for the Save as value (see Figure 12).

Figure 12. Type epd for the Publisher name, password and Save as name.
In the Package Explorer view, locate the EmployeePortal.air file (see Figure 13).

Figure 13. View the EmployeePortal.air file in the Package Explorer view.
In this exercise, you learned how to create an AIR application from a Flex application. You also learned how to create production builds for AIR applications.
WindowedApplication container tag.transparency property.transparency property to take effect?systemChrome property.Trilemetry, Inc is a development and education organization that implements a human-centered design approach to the creation of software and content. Their Adobe portfolio includes the Adobe ColdFusion Getting Started Experience, the Adobe Flex Getting Started Experience, the Flex in a Week video series, the official Adobe instructor-led training course Flex 3: Extending and Styling Components and more. They also create and support many Web applications from interactive Flash sites and corporate web sites to mission-critical business applications.