stage.addEventListener(Event.ENTER_FRAME,rotate);
function rotate (e:Event){
        var theX:int = mouseX - theArrow.x;
        var theY:int = (mouseY - theArrow.y) * -1;
        var angle = Math.atan(theY/theX)/(Math.PI/180);
        if (theX<0) {
                angle += 180;
        }
        if (theX>=0 && theY<0) {
                angle += 360;
        }
        angletext.text = angle;
        theArrow.rotation = (angle*-1) + 90;
}