Google   Web www.flash-here.com
 

Looking for Flash Downloads / Tutorials, but can't find it here?

Give us suggestions and we will try to make it up for you!


We got 1000 visits per day! Contact us to exchange link with us!

Flash tutorial - Animation effects



Step 4

After the animatioin part, the rest are about actionscript programming.

On the main stage, create 3 frames. Put the "moving_ball_clip" on the first frame. Name it as "ball". Paste the following actionscripts on the 3 frames:

Frame 1

var c = 0;
var ball_num = 20;
var ball_degree = 30;

Frame 2

duplicateMovieClip(ball, "ball_"+c, c);
setProperty(ball, _rotation, random(ball_degree));

Frame 3

c = c+1;
if (c>ball_num) {
c = 0;
}
gotoAndPlay(2);

 

Basically, frame 1 set the max number of balls (particles) to be used and the max degree of rotation for each of the particles. Frame 2 and 3 is a loop, where the "moving_ball_clip" is kept being duplicated with random degree of rotation.

You can try different settings (ball_num & ball_degree) to achieve different animation effects.

 

< Previous Steps

 

< Tutorials Index - Download this tutorial - Post suggestions >