Game Development Reference
In-Depth Information
Several additional properties are used for transforming an object in 3D space. You won't be using
them in this topic, but you should know that they exist and experiment with them when you have the
chance. Although their primary purpose is to be used as building blocks for creating 3D objects and
spaces, you might find uses for these properties for special effects in some of your games. Table 4-2
shows 3D properties you might want to get to know.
Table 4-2. MovieClip Class's 3D Properties
3D property
What it represents
v
The depth of the object in 3D space. Higher numbers make the object appear
farther away; lower numbers make it appear closer.
o_]haV
The scale (ratio of its original size) of the object in 3D space. The object is scaled
from its center registration point.
nkp]pekjT
The rotation of the object around the x axis.
nkp]pekjU
The rotation of the object around the y axis.
nkp]pekjV
The rotation of the object around the z axis.
You can have a lot of fun with these properties, and they're very easy to use. In the next few sections,
you'll use them in the storybook to turn the _]p object into an interactive toy.
Setting up the project files
You're welcome to continue working on the same project files from Chapter 2, but you can start work-
ing from the start files in the chapter's source if you prefer. To do that, follow these steps:
1. In Flash, select File ° Open .
2. Navigate to the Op]npBehao folder in the chapter's source files.
3. Select the FLA file called ejpan]_peraOpknu^kkg[L]np.*bh] and click the Open button. The
FLA will open in Flash's main workspace.
4. In the Project panel, click the drop-down menu. Select Quick Project . The interactiveStorybook_
Part2.fla and Main.as files appear as project files.
To open any of these files in Flash's workspace, just click the file's name in the Project panel.
Going up and down
The first thing you'll do is create an up button and a down button to move the cat up and down the
hill. There are a few ways to program these buttons. To demonstrate exactly how the t and u proper-
ties work, you'll start with the simplest way and then modify the program a little so that the effect is
a bit more realistic.
 
Search Nedrilad ::




Custom Search