Game Development Reference
If you entered the code from the last section in the I]ej[?d]n]_pan*]o file, you could try modifying
it with this new code, but it might be safer just to erase it all and start again. There are enough differ-
ences in the code to make it an almost completely new program. Let's create a new class file for this
1. In the Project panel, click the New File button (you'll find it in the bottom-right corner of the
panel). Make sure that ActionScript is selected as the file type.
2. Enter Main_Character_Two in the File field.
3. Click the Create button.
4. The I]ej[?d]n]_pan[Psk*]o file opens as a blank document in a new ActionScript editor
5. You need to set I]ej[?d]n]_pan[Psk*]o as the FLA's document class. Open the _d]n]_pan?kjpnkh*
bh] file and enter Main_Character_Two in the Class field.
6. Save the _d]n]_pan?kjpnkh*bh] file.
7. Open the I]ej[?d]n]_pan[Psk file.
8. Add the following new code to the I]ej[?d]n]_pan[Psk*]o file (again, if you prefer not to
type it, you'll find the finished file in the ?d]n]_pan?kjpnkh folder in this chapter's source