Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Macromedia Flash Simple Ease

Macromedia Flash Simple Ease


Flash easing is a process of controlling the speed of the motion tween in flash movie. Consider two types of circle's movement below. The first movie is done without easing applied; the second movie is done with easing algorithm applied.

Click the button to play the flash examples.

                    :: without easing applied ::

                       :: with easing applied ::

We will make something more fun today. We will make a flash movie clip where a ball follow our mouse movement. Our final flash movie example will look something like this:

               :: ball movement flash easing example ::

1. Create a new flash movie and change the size to 350 x 200.

2. Create a small circle with Oval Tool with size of 10 x 10 and place it somewhere on the canvas.

3. Convert the circle you have just made to a Movie Clip instance by

> Double Click on it to select it
> Press F8 and choose "Movie Clip" under Behavior radio button
> Click OK

4. Give the movie an instance name "ball_mc".

Macromedia Flash Simple Ease

5. Ok, let's program our ball to move with the mouse movement. Click on first frame and open up action panel by pressing F9.

6. Paste these flash actionscript codes inside the action panel.

speed =5; // the higher the slower
ball_mc.onEnterFrame = function() {
xPos=ball_mc._x;
yPos=ball_mc._y;
ball_mc._x= xPos + (_xmouse-xPos)/speed;
ball_mc._y= yPos + (_ymouse-yPos)/speed;
}

7. Press Ctrl+Enter to test your movie.

And here is the full source code.



Author's URL: CambodiaXP.com
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website. More Flash Tutorials: Featured Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

No comments yet...
Add comments to "Macromedia Flash Simple Ease"

Captcha