The first thing you need is a Ball, so you can do it with a circle shape. Once you get the draw, select and press F8 to create a MoveClip symbol. Select "export for actionscript", and fill the identifier textfield with "circle". Finally press OK and remove your movie from the scene.

We are going to attach each ball from the library.

Since we created a new Math class, we are going to import it before we can do anything with that file, so in the first frame in the root, put this line of code:

import Math2;

Now, is time to add the balls. We are going to use a function for that, and it will be called "init". The code:

function init() { balls = 20; reductionMultiplier = 1; for (i=1; i<=balls; i++) { this.attachMovie("circle","mc"+i,_root.getNextHighestDepth(),{_x:30*i, _y:200}); } } init();

"balls" is the number that we are going to attach, you can use whatever you want if the performance is good for you. "reductionMultiplier" is just a multiplier to define how fast each movie will follow the other one. So, if you use a number higher than 1, it will become slowly and elastic.

After the variables, we have a simple loop for balls creation (attachMovie). Initial position is up to you.

Finally, we call the function by using the "init()" line.