I want to rotate a movieclip depending upon the mouse movement. Rotation is working also but I want to rotate it from the center of the movieclip. The registration point of the movieclip is top - left
Code
var radiance:Number = 180/Math.PI;
_root.onEnterFrame = function()
{
//calculate rotation
walkdirection = -(Math.atan2(_xmouse-box_mc._x, _ymouse-box_mc._y))*radiance;
//set rotation
box_mc._rotation = walkdirection;
}
I cannot figure out how to do this