Anybody know of a tutorial in Flash Pro 8 that helps me to rotate an object to point to the centre.
If not please could somebody direct me to a flash forum?
Printable View
Anybody know of a tutorial in Flash Pro 8 that helps me to rotate an object to point to the centre.
If not please could somebody direct me to a flash forum?
Here's some code:I hope it helps.Code:onClipEvent (enterFrame) {
GotoX = Stage.width/2;
GotoY = Stage.height/2;
DifferenceX = _x-GotoX;
DifferenceY = _y-GotoY;
_rotation = -Math.atan2(DifferenceX, DifferenceY)/(Math.PI/180);
}