Game Development Reference
1. Create a button called @ksj>qppkj. You can either create it from scratch or duplicate one of
the existing buttons in the Library . If you're creating one from scratch, remember to select
Export for ActionScript when you create the button symbol and make sure that the button con-
tains Up , Over , and Down states.
2. Create another button called Ql>qppkj, following the same steps.
3. Double-click the DehhL]ca symbol in the Library to enter symbol editing mode.
4. Click the DehhL]ca symbol's buttons layer once to select it.
5. Drag an instance of the @ksj>qppkj onto the stage. Make sure that it is added to the buttons
layer (you can confirm that this has happened if the buttons layer's first frame contains a solid
6. Give the button you just added the instance name downButton .
7. Drag an instance of the Ql>qppkj onto the DehhL]ca symbol's stage. Give it the instance name
8. Select the _]p object. Give it the name cat in the Instance name box in the Properties panel, as
shown in Figure 4-2.
Figure 4-2. Assign the instance name.
While the cat is still selected, have a look at the Position and Size pane of the Properties panel, an
example of which you can see in Figure 4-2. X: and Y: stand for the horizontal and vertical positions of
the object. All these values are given in pixels. H: and W: stand for height and width.
9. Write down the number next to Y: . This is the current vertical position of the cat on the stage,
and you'll need to use this number very soon in your program. My cat's Y: position is 120 , but
yours will almost certainly be different. Remember it!