In this exercise you use Flash Builder to create a production build of the Flash application shown in Figure 1.
Figure 1. You create a production build of this application.
In this exercise you will learn how to:
In this section, you will explore the contents of the bin-debug directory.
- Download the ex5_10_starter.zip file if you haven’t already and extract the file ex5_10_starter.fxp to your computer.
- Open Flash Builder.
- Import the ex5_10_starter.fxp file.
- Open the ex5_10_starter.mxml file.
- Run the application.
You should see the Employee Portal page (see Figure 2).
Figure 2. Run the application to see its preview in a browser.
- Return to Flash Builder.
- 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.
- Within the bin-debug folder, right-click the ex5_10_starter.swf file and select Properties (see Figure 3).
Figure 3. Right-click the ex5_10_starter.swf file and select Properties.
- Note the file size (see Figure 4).
Figure 4. Note the file size for the bin-debug version of the ex5_10_starter.swf file.
In this section, you will create a release build version of the Employee Portal application.
- Select Project > Export Release Build (see Figure 5).
Figure 5. Select Project > Export Release Build.
- 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.
Figure 6. Click the check box next to Enable view source.
In this section, you will view the release build in a browser and use the source view option to view the code source.
- Within the Package Explorer view, expand the bin-release folder.
- Right-click the ex5_10_starter.swf file and select Properties.
- Note the file size.
You should see the file size is considerably smaller (see Figure 7).
Figure 7. Note that the file size of the production build SWF file is much smaller.
- Click OK.
- Run the application.
- Right-click somewhere in the browser window and select View Source (see Figure 8).
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.
Figure 9. Note the Download source link in the bottom left of the source window.
In this exercise you used Flash Builder to create a production build of the Flash application.