Graphics Programs Reference
In-Depth Information
28
29
30
31
32
33
34
35
36
37
this.onEnterFrame = function()
{
if (spin == true)
{
angle += 5; // update the angle
setObject(); // move the object
wheel_mc._rotation = -angle; // rotate the wheel
if ( angle > maxAngle ) { spin = false; }
}
}
Exercise 5.2: Circular Motion of Multiple Objects
Now that we have one object rotating in a circle, let's see what needs to be done to
rotate several objects that are equally spaced around a circle. Lots of things move
around in circles. Let's go for a ride on the Silverfish Ferris wheel shown in Figure 5.21.
Figure 5.21 Circular motion of multiple objects
 
Search WWH ::




Custom Search