View Full Version : Rotation with actionScript
Taohunter
07-31-2003, 04:59 AM
I need a tutorial on how to rotate a movieclip around a center point.
And I dont mean the standard rotation but a rotation wich keeps the movie clip straight up...
Zenith
07-31-2003, 05:13 AM
tell me if this helps you....
I think its what your after.... Oh and dont nick my hamster! :p
Taohunter
07-31-2003, 05:26 AM
Not excactly,
What I mean is rotation like the moon around the earth...
farafiro
07-31-2003, 06:15 AM
www.bit-101.com
or//ball_mc is the MC's name
r = 50;
//radius
xPos = 200;
yPos = 200;
angle = 225;
k = .05;
ball_mc.onEnterFrame = function() {
x = Math.cos(angle)*r;
y = Math.sin(angle)*2*r;
this._xscale = x+xPos/2;
this._yscale = x+yPos/2;
this._x = x+xPos;
this._y = y+yPos;
angle += k;
updateAfterEvent();
};
this code from http://www.flashstar.de
Taohunter
07-31-2003, 06:35 AM
You da man!!!
This is perfect!!!
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.