views:

905

answers:

2

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!

+2  A: 

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
+2  A: 

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.

Yar
I prefer the TweenLite/TweenMax libraries as they are faster, smaller and leave more freedom, and I like the API a bit more
ptor

related questions