Smooth spinning?

Hi All!

I’m trying to figure out how to make the following code spin smoother.
Any ideas or suggestions would be appreciated.

TIA!

jc_

here its…

Create a new movie FLA, 550 x 400
Create a MovieClip on the stage named “spinner”

Paste this code on the timeline:


var leftBoundary:Number = 0;
var rightBoundary:Number = 550;
var topBoundary:Number = 0;
var bottomBoundary:Number = 400;
var boundaryHeight:Number = bottomBoundary-topBoundary;
var boundaryWidth:Number = rightBoundary-leftBoundary;
var quadrantSize:Number = boundaryWidth/2;
var centerPoint:Number = rightBoundary-quadrantSize;
//
this.onMouseMove = function() {
	if (_xmouse>leftBoundary && _ymouse>topBoundary && _xmouse<rightBoundary && _ymouse<bottomBoundary) {
		var panAmount = ((_xmouse-centerPoint)/quadrantSize)*100;
		_root.spinner._rotation = _root.spinner._rotation+(panAmount/5);
		trace(panAmount)
	} else {
		//
	}
};

This will spin the “spinner” MC according to the mouse position.
If you move the mouse to the left or right it will spin in the opposite direction.

the problem…
How to make the rotation Tween or Move more smoothly?

:h: :beer:

look into importing tweens and or easing. im not sure how it worked, i saw a prof using it and it made everything like buttah! ya gotta import em at the beginning of yur script
import mx.transitions.Tween;
import mx.transitions.easing.*;

dont recall what was next

bump :slight_smile: