Graphics Programs Reference
In-Depth Information
Figure 9.5 Sample screen from planarLines3D.swf
Note also that, unlike other ActionScript lines, you cannot have a semicolon ( ; ) at
the end of the line when using #include . Let's also set the distance from the viewer
to the picture plane.
Step 4: Initialize object information
As we have done many times before, we'll create an empty movie clip named scene3D
and set its location to be the center of the Stage (lines 17-19). We are also going to
define five new arrays (lines 22-26). These arrays will be used to store the 3D coordi-
nate data of the object and the equivalent 2D screen coordinates of the object.
11
12
13
14
15
16
17
18
19
20
// -------------------------------------------------------
// initialize object information
// create the picture plane: a movie clip named scene3D
// and position it in the center of the Stage
// the object will be drawn on scene3D
this.createEmptyMovieClip("scene3D", 100);
scene3D._x = Stage.width/2;
scene3D._y = Stage.height/2;
Search WWH ::




Custom Search