Requirements
     
Prerequisite knowledge
Required Products Exercise files
User level

Exercise 1.1: Setting up Flash Builder and your project files

Flash Builder 4.7 Premium (Download trial)

ex5_10_starter.zip

ex5_10_solution.zip

Intermediate

In this exercise you use Flash Builder to create a production build of the Flash application shown in Figure 1.

You create a production build of this application.

Figure 1. You create a production build of this application.

Explore the bin-debug directory

In this section, you will explore the contents of the bin-debug directory.

  1. Download the ex5_10_starter.zip file if you haven’t already and extract the file ex5_10_starter.fxp to your computer.
  2. Open Flash Builder.
  3. Import the ex5_10_starter.fxp file.
  4. Open the ex5_10_starter.mxml file.
  5. Run the application.

    You should see the Employee Portal page (see Figure 2).

 Run the application to see its preview in a browser.

Figure 2. Run the application to see its preview in a browser.

  1. Return to Flash Builder.
  2. Within the Package Explorer view, expand the bin-debug folder.

    The bin-debug output files contain additional debug code and metadata that the debugger uses for tasks such as setting breakpoints or viewing variables.

  3. Within the bin-debug folder, right-click the ex5_10_starter.swf file and select Properties (see Figure 3).
Right-click the ex5_10_starter.swf file and select Properties.

Figure 3. Right-click the ex5_10_starter.swf file and select Properties.

  1. Note the file size (see Figure 4).
Note the file size for the bin-debug version of the ex5_10_starter.swf file.

Figure 4. Note the file size for the bin-debug version of the ex5_10_starter.swf file.

Create a production build

In this section, you will create a release build version of the Employee Portal application.

  1. Select Project > Export Release Build (see Figure 5).
Select Project > Export Release Build.

Figure 5. Select Project > Export Release Build.

  1. In the Export Release Build dialog box, select the check box next to Enable view source (see Figure 6).

    Note that the export folder is named bin-release.

Click the check box next to Enable view source.

Figure 6. Click the check box next to Enable view source.

  1. Click Finish.

View the production build

In this section, you will view the release build in a browser and use the source view option to view the code source.

  1. Within the Package Explorer view, expand the bin-release folder.
  2. Right-click the ex5_10_starter.swf file and select Properties.
  1. Note the file size.

    You should see the file size is considerably smaller (see Figure 7).

 Note that the file size of the production build SWF file is much smaller.

Figure 7. Note that the file size of the production build SWF file is much smaller.

  1. Click OK.
  2. Run the application.
  3. Right-click somewhere in the browser window and select View Source (see Figure 8).
Fig Right-click somewhere in the browser window and select View Source.

Figure 8. Right-click somewhere in the browser window and select View Source.

You should see the source view open (see Figure 9). Note the Download source link in the bottom left corner.

 Note the Download source link in the bottom left of the source window.

Figure 9. Note the Download source link in the bottom left of the source window.