views:

24

answers:

1

I'm tweening a movieclip from startX to finishX. The value of startX varies but finishX is a constant. But as the startX increases in value the animation appears to be quicker. How do I adjust the speed of the tween to ensure a consistant speed regardless of the value of startX?

Thanks

A: 

Since you don't specify, I am guessing you are using the Adobe Tween Class. The parameter that controls the type of tween (or animation) is the 'ease class and method' and is the third parameter in the constructor. If you use the None class, it will perform "A simple linear transition from a to b.", I believe that is what you're looking for:

var yourTween:Tween  = 
  new Tween(yourObj, "_x", None.easeOut, startX, finishX, timeInSeconds, true);

PD : Tweenlite is also available for as2 and is much faster AND lighter AND intuitive to use than the Tween class... I strongly recommend that you try it out!! (linear transition in Tweenlite is called 'Regular', but is the default transition so you'll be good)

danii