Graphics Programs Reference
In-Depth Information
rotation about the y-axis as shown in Figure 6.40. Open the file objectSpinning2.fla.
The script used is a copy of the script from 6_5_xzRotation3.fla with a few minor
additions which we will note below.
Figure 6.40 Objects spinning while rotating
In defining the path characteristics, the angle a of the object in radians is initialized and
then set in the placeObj function.
8
9
10
11
12
13
// define the path characteristics
var xc:Number = 0; // xc = horizontal center of path
var yc:Number = -150; // yc = vert. center of path
var zc:Number = 200; // 0; // zc = depth center of path
var r:Number = 350; // r = path radius
var a:Number = 0 // a = angle of object in radians
33
34
35
36
// calculate the angle of the object
var myAngle:Number = i * circleAngle + startAngle;
a = myAngle * Math.PI/180; // in radians
 
Search WWH ::




Custom Search