Hey John,
[quoted text, click to view] I was getting little pissed with the flash easeing possibilities. So I wrote
and easeing function. It may help you out.
-redLetter
function easePosition(theClip, targetX, targetY, speed){
// The Ease_x Function
if (targetX > theClip._x) {
theClip._x += (targetX-theClip._x)/speed;
//Force to final position
if (theClip._x > (targetX-0.5)) {
theClip._x = targetX;
};
} else if (targetX < theClip._x) {
theClip._x += (targetX-theClip._x)/speed;
//Force to final position
if (theClip._x < (targetX+0.5)) {
theClip._x = targetX;
};
}; // END Ease_x Function
// The Ease_y Function
if (targetY > theClip._y) {
theClip._y += (targetY-theClip._y)/speed;
//Force to final position
if (theClip._y > (targetY-0.5)) {
theClip._y = targetY;
};
} else if (targetY < theClip._y) {
theClip._y += (targetY-theClip._y)/speed;
//Force to final position
if (theClip._y < (targetY+0.5)) {
theClip._y = targetY;
};
}; // END Ease_y Function
}; //END easePosition
To use it all you have to do it call the function like this:
--------------------------------
easePosition(theClip, targetX, targetY, speed);
filled in it looks like this:
--------------------------------
easePosition(movieclip, 250, 300, 5);
Note
--------------------------------
The larger the number you put for the speed the slower it moves.