Game Development Reference
In-Depth Information
Figure 8-22. gameOverLost replaces dungeonOne on the main stage.
AS3.0 often tries to model these real-life scenarios. `qjcakjKja exists as an object on the op]ca.
The op]ca is the `qjcakjKja container —its l]najp object. `qjcakjKja can't remove itself, so it asks its
l]najp to do it. (Besides this change of perspective, the process of adding and removing game screens
is exactly the same as the way you added and removed pages in your interactive storybook in Chapters 2,
3, and 4.)
One nice feature of the l]najp keyword is that objects don't need to know the exact
names of their parent containers. That means that if the `qjcakjKja parent object
ever changes, you won't need to rewrite this code. By using keywords such as pdeo and
l]najp , you keep your code general, flexible, and portable.
 
Search Nedrilad ::




Custom Search