Search code examples
actionscript-2moviecliptween

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 where to find any resources on this or could point me in the right direction?

Thanks!


Solution

  • 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