Graphics Programs Reference
In-Depth Information
Save your movie as 8_2_objectVRorbit.fla and test it. It should follow a circular path,
although not a centered one, as shown in Figure 8.6.
Figure 8.6 Circular path of the object movie clip
Step 3: Adjust the center point of the circular path
We have a similar situation to one in Chapter 6 where the registration points of the
frames of the object are all in the upper-left corner. Let's compensate for that by
changing the center point of the circular path. We'll move the path to the left and up
to take into account the registration points, and we'll move it a little farther back in
space so that the object easily fits on the Stage.
8
9
10
11
12
13
// define the path characteristics
var xc:Number = -200; // xc = horizontal center of path
var yc:Number = 0; // yc = vertical center of path
var zc:Number = 200; // zc = depth center of path
var r:Number = 200; // r = path radius
Step 4: Add the total number of frames in the object movie clip
It will be useful to define a variable that identifies the number of frames in our object
movie clip, so let's add that to the script with lines 14 and 15 as shown.
 
Search WWH ::




Custom Search