Game Development Reference
Before you go any further, ensure that your program looks like Figure 1-7.
Figure 1-7. Add a comment to your code.
The ActionScript editor window colors comments gray so that you can easily differentiate them from
9. Finally, if everything looks good, save the I]ej*]o file.
You're now ready to see result of the program in action.
Publishing the SWF file
Earlier I mentioned that the FLA and AS files work together to produce a SWF file. The SWF file is your
finished product, and you need to create one to see how your program works. The act of creating
a SWF file is known as publishing it.
The first step is to bind the AS file with an FLA file. You need to do this because the SWF file will be
created by software components that are part of the FLA file; the AS file contains the logic that will
control these components.
You'll set the I]ej class as the FLA file's document class. Any class that's assigned as a document
class is automatically run when the SWF file runs. This is a vital step in getting your program to work.
Follow these steps:
1. Click the helloWorld.fla tab near the top of the editing window to return to the dahhkSknh`*
bh] file. You'll know you've done this when you see your program replaced by the FLA's empty
2. Check to see whether the Properties panel is open. If it isn't, display it by selecting Window °