all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

Scrolling Movie Clip With Ease



Scrolling Movie Clip With Ease finalcutexpress
2/16/2006 6:36:21 PM
flash actionscript: Can anyone direct me to a tutorial, or give me the Reader's Digest version of
how to add "ease in/out" to a scrolling movie clip. For example, I have a movie
clip, scrolling_mc, that I want to move up and down on rollOver of up_btn and
down_btn.

up_btn.onRollOver=function() {
scrolling_mc._y-=10;
};
down_btn.onRollOver=function() {
scrolling_mc._y+=10;
};

Simple enough, but I really like what I've seen on some sites where the movie
clip moves up and down (or side to side) and eases in or out to the final
position. Also, the animation is not as "choppy" as what I've created using the
above code.

Thanks in advance!
Re: Scrolling Movie Clip With Ease ufitzi
2/16/2006 7:10:49 PM
Use the following Flash packages
import mx.transitions.*;
import mx.transitions.easing.*;

//use this code, where this is the MC you want to Tween
//_x is the property you want to modify
//Regular.easeOut is the type of transition, you can find a list of those
online
//starting_x, destination_x
//100 is number seconds/frame , which is determined by true/false in the last
parameter
new Tween(this, "_x",Regular.easeOut, starting_x,destination_x,100, false);

Check out this tutorial, as well:

http://www.macromedia.com/devnet/flash/articles/tweening.html
AddThis Social Bookmark Button