hi
I'm trying to do rotate arrow toward mouse only in the left side
only 180 Degrees not 360 Degrees..
but its not work its jump down if rotaions Large number 180, i dont know whay!!
http://acw.gi-israel.info/rabi/arrow/arrow_01.html
i have this code:
stop();
var radiance:Number = 180 / Math.PI;
_root.onMouseMove = function()
{
//calculate rotation
walkdirection = -(Math.atan2(_xmouse - circle1_mc._x, _ymouse - circle1_mc._y)) * radiance;
//set rotation
circle1_mc._rotation = walkdirection;
if (circle1_mc._rotation < 60 || circle1_mc._rotation > 179)
{
if (circle1_mc._rotation <= 60)
{
trace("bbbbbbbbbbb");
circle1_mc._rotation = 57;
}
if (circle1_mc._rotation >= 179 )
{
trace("ccccccccccccccccc");
circle1_mc._rotation = 178;
}
}
};
link to view:
http://acw.gi-israel.info/rabi/arrow/arrow_01.html
link to dawonload the FLA:
http://acw.gi-israel.info/rabi/arrow/arrow_01.fla
thanx!