Some problems with tween class

hi there…

i am pretty new to this FORUM as this is mu first post as far i remember…:slight_smile:
i have been dueling with AS3 and it fun…i have made a mouse follower which does not work well is stucks some time…i will paste the code here and also attach the .fla file for Flash CS3…if some one can tell me what have i done wrong and how to solve… i will appreciate…

As you may see in the attached file that there is only one MOVIE CLIP in library simply a circle…with a linkage name mc_circle…but all of circles don’t follow properly…any ideas…

import fl.transitions.Tween;
import fl.transitions.easing.*;
//import fl.transitions.TweenEvent;
var mouseFollower:mc_circle;

for (var i:Number = 0; i < 10 ; i++) {

mouseFollower = new mc_circle;
addChild(mouseFollower);
mouseFollower.name = "mouseFollower" + i;
trace (mouseFollower.name);

}

var xTween:Tween;
var yTween:Tween;
var alphaTween:Tween;
var xMouse:Number = root.mouseX;
var yMouse:Number = root.mouseY;
var startxMouse:Number = 0;
var startyMouse:Number = 0;

//xTween = new Tween(mouseFollower,"x",Bounce.easeOut,10,250,2,true);
//yTween = new Tween(mouseFollower,"y",Bounce.easeOut,10,250,2,true);

stage.addEventListener(MouseEvent.MOUSE_MOVE, makeClips);

function makeClips(eve:MouseEvent):void
{
for (var x:Number = 0 ; x < 10 ; x++)
{

followMe(getChildByName("mouseFollower" + x),x);

}

}

function followMe(clipName,diff:Number):void
{
//trace (clipName.name);
diff = 1 + (diff/5)
startxMouse = clipName.x;
startyMouse = clipName.y;
xMouse = root.mouseX;
yMouse = root.mouseY;
xTween = new Tween(clipName,“x”,None.easeOut,startxMouse,xMouse,diff,true);
yTween = new Tween(clipName,“y”,None.easeOut,startyMouse,yMouse,diff,true);
yTween = new Tween(clipName,“alpha”,None.easeOut,0.1,.3,diff,true);

//trace("y = " + startxMouse + " : x = " + startyMouse);

}

Well i am using tweener from caurina and it is good…lets try it that ways…

I use TweenMax by Jack Doyle … It is da Bomb … Try it :slight_smile: