How to tween (with ease out) a movie clip using only Action Script 2.0
I would like to tween a movieclip (with ease out) using purely action script 2.0. Does anyone know 开发者_如何学Pythonwhere to find any resources on this or could point me in the right direction?
Thanks!
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
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.
精彩评论