MC move on mouse location?

Trying to figure out how to make a movieclip move base on mouse location similar to the one seen in http://www.tcm.com/2011/31Days/index.jsp. I’ve found some script that I’ve been working with and it rotates the Y just fine but keeps rotating. How would I determine a set rotation to stop when I stop mouse movement. Here is my script:

var maxSpeed:uint = 1

box.addEventListener(Event.ENTER_FRAME, onLoop, false, 0, true);

function onLoop(e:Event):void{

box.y = stage.stageHeight / 2;

var midPt:uint = stage.stageWidth / 2;

var diff:int = mouseX - midPt;

var perc:Number = diff / midPt;

box.rotationY += perc * maxSpeed;

}

Any suggestions?