1

I would like to tween a movieclip (with ease out) using purely action script 2.0. Does anyone know where to find any resources on this or could point me in the right direction?

Thanks!

justinl
  • 10,448
  • 21
  • 70
  • 88

2 Answers2

3

you have to import

import mx.transitions.Tween;
import mx.transitions.easing.*;

and then use the command

 new Tween(yourMovieClip, "_alpha", Regular.easeOut, 40, 100, 1, true);

so to speak

// to tween over a period of time:
new Tween(movieclip, "property", easing-type, start-value, stop-value, #seconds, true);

// to tween over a number of frames:
new Tween(movieclip, "property", easing-type, start-value, stop-value, #frames, false);

you can read the tween class

doamnaT
  • 1,003
  • 8
  • 4
2

Although the mx.transitions.Tween class will get you there, I recommend the Tweener library. As the docs say, "it is not tied to specific properties of built-in Classes such as MovieClips or TextFields." Also they have all kinds of cool easing-type curves and so forth.

The examples are awesome and you will able to bring your knowledge forward to AS3 and even Javascript.

Also, I cannot remember what other stuff it does, but I remember tossing out the Tween class on a project about a year ago due to some limits it had, or perhaps because it was cumbersome (or impossible?) to have Tweens fire other Tweens.

Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421
  • I prefer the TweenLite/TweenMax libraries as they are faster, smaller and leave more freedom, and I like the API a bit more – ptor Nov 18 '09 at 10:28