Game Development Reference
In-Depth Information
Starting in CS5.5, if you
re publishing to Flash Player 10.2 (or any mobile
version), you finally have the option to set the initial visible property of a
display object on the Stage. This has long been an annoyance in earlier
versions, and works as a great alternative to setting the property in the
constructor of the class. Figure 12.4 shows where this option resides in
the Property Inspector for any Stage object.
ll look
at the document class driving this example. Note that this class
makes use of the Time class we created back in Chapter 11; if you
skipped ahead to this chapter, all you need to know is that it has a
method to return the time elapsed between the frame cycles.
Now that we have the player Sprite and its test points, we
public class HitTestPoint extends Sprite {
public var barriers:Sprite;
public var player:Player;
public function HitTestPoint() {
Figure 12.4 The new visibility
toggle in the property
inspector, under the display
Search Nedrilad ::

Custom Search