Game Development Reference
In-Depth Information
18. Drag an instance of the Da]hpd symbol onto the main stage.
19. Give it the instance name health . Figure 7-12 shows what the stage should now look like.
Figure 7-12. Add a new object called health to the main stage.
If you open the Iapan symbol's editing window, you'll see that the rectangle's blue fill area is exactly
to the right of the symbol's center point. As Figure 7-13 shows, there should be nothing to the left of
the crosshairs that define the center of the symbol. This will be very important for the health meter
because you'll be using the object's se`pd property to reduce the size of the meter. Flash does this by
squeezing together the graphics on the left and right of the object's center point. Because the iapan
object has graphics only on the right, it will look like it's gradually disappearing to nothing instead of
being squeezed from both sides. You'll see this effect at work soon enough.
Figure 7-13. The graphics for the meter object should extend from the right of the center crosshairs.
You now have an object called da]hpd, which contains a subobject called iapan. You can access the
iapan object with dot notation like this:
Search Nedrilad ::

Custom Search