Question : Slowing down a moving clip that follows the mouse cursor

Greetings!
Could I please ask the following:
I have movie clips that attach from the library and that then drag with the x and y of the cursor, but I would like to delay them by a bit so that they appear to lag behind the cursor by a bit or appear to move a little slower than what the mouse is being moved by.
I am using actionscript 2.
Any help would be greatly appreciated.
Thanks
Mark

Answer : Slowing down a moving clip that follows the mouse cursor

Maybe try the following:

<code>

Here's also a sample fla:
http://vulturous.110mb.com/eefiles/MouseFollower.fla

Good Luck,

-V
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
import mx.transitions.Tween;
import mx.transitions.easing.Strong;

var xTween:Tween;
var yTween:Tween;
var followSecs:Number = 1;
var follower:MovieClip = _root.attachMovie("Follower", "follower", _root.getNextHighestDepth());
follower.onEnterFrame = mouseFollow;
	
	
function mouseFollow():Void {
	this.xtarget = _xmouse;
	this.ytarget = _ymouse;
	xTween = new Tween(this, "_x", Strong.easeOut, this._x, this.xtarget, followSecs, true);
	yTween = new Tween(this, "_y", Strong.easeOut, this._y, this.ytarget, followSecs, true);	
}
Random Solutions  
 
programming4us programming4us