The final rotation effect is as follows:
http://www.flash8.net/bbs/UploadFile/2005-4/2005416211918814.swf
Create first Ellipse
Createemptymovieclip ("L0", 0);
With (L0) {
Beginfill (0xff0099, 50);//Fill Color
MoveTo (30, 0);
for (var i = 0; i<=2*math.pi; i + = math.pi/180) {
LineTo (30*math.cos (i), 50*math.sin (i));
}
Endfill ()//End Fill
}
r = 0;//variable initialization
Onenterframe = function () {
R + + math.pi/60;
Create an empty array
x = new Array ();
y = new Array ();
Du = new Array ();
Copy First Ellipse
for (var i = 1; i<5; i++) {
L0.duplicatemovieclip ("L" +i, I);
}
Set the motion and rotation of the ellipse
for (var i = 0; i<5; i++) {
Eval ("L" +i). _x = 273+50*math.cos (2*math.pi/5*i+r);
Eval ("L" +i). _y = 200+50*math.sin (2*math.pi/5*i+r);
Assigning values to an array element
X[i] =-math.cos (2*math.pi/5*i+r);
Y[i] =-math.sin (2*math.pi/5*i+r);
Du[i] = Math.atan (y[i]/x[i]) *180/math.pi;
Set the angle of rotation of the ellipse
Eval ("L" +i). _rotation = x[i]>0? 90+du[i]: du[i]-90;
}
};
Play your rich imagination, wonderful effect waiting for you!