Hello, I have made a AS 2.0 script that allows an object to ease into rotation. Here is the code:
Is this the best way to write it, or is there something more simple that I can do?Code:_root.onEnterFrame = function(){
rot = Math.atan2(_ymouse-arrow._y,_xmouse-arrow._x)*180/Math.PI;
if(arrow._rotation-rot>180){
rot += 360
}
if(arrow._rotation-rot<-180){
rot -= 360
}
arrow._rotation += (rot-arrow._rotation)/3;
}