Graphics Programs Reference
In-Depth Information
Figure 7.7 Sample screen shot from maskCamDone.swf
Step 1: Getting started
Open 7_2_maskCam.fla and dolphinCam.fla . We will use the script from our previous
discussion as a starting point. To begin, copy the script from dolphinCam.fla and
paste it into the Actions window of 7_2_maskCam.fla .
For convenience, we'll leave the position of the viewer at the origin of our 3D world
(line 2). Let's set the picture plane distance d to be 150 pixels from the viewer (line
5). We'll also set the closeness distance to 100 pixels (line 7). And how do we get this
number? The old-fashioned way, through trial and error. Change the lines as shown.
//create a viewer object with position properties x,y,z
viewer = {x:0, y:0, z:0 }
// set the viewer parameters
var d:Number = 150; // distance from viewer to picture plane
var viewerSpeed:Number = 10; // the viewer speed
var tooClose:Number = 100; // the too close distance
1
2
3
4
5
6
7
8
 
Search WWH ::




Custom Search