Step 1Create a new flash document, press Ctrl+J on the keyboard (Document Properties) and set Width to 300 and Height to 200px. Frame rate set to 65fps.
Step 2Take the Oval Tool (O), Stroke Color must be switched off, under Fill Color choose any color and draw a "circle" like it is shown on the picture below.
Step 3Open the Color Mixer Panel (Shift+F9), and set the options from the picture below.
Step 4Select the "Particle" and Press F8 on the keyboard to convert it into a Movie Clip.
Step 5Double click on a new made Movie Clip ("Particle) to go in its inside.
Step 6While your "Particle" is still selected press again F8 on the keyboard to convert it into a Graphic.
Step 7Click on the first frame, open the Action Script Panel (F9), and paste this script:
xMin = 0;
xMax = 300;
yMin = 0;
yMax = 200;
minSize = 10;
maxSize = 50;
easeFactor = 10;
randomX = Math.random () * ( xMax - xMin ) + xMin;
randomY = Math.random () * ( yMax - yMin ) + yMin;
randomSize = Math.random () * ( maxSize - minSize ) + minSize;
Step 8Click on the second frame and press F5.
Step 9Click on the third frame and press F6. After that open the Action Script Panel (F9), and paste this script:
distance = Math.sqrt(Math.pow(this._x-randomX, 2)+Math.pow(this._y-randomY, 2));
if (Math.abs(this._width-maxSize)>1) {
this._width += (randomSize-this._width)/2;
this._height += (randomSize-this._height)/2;
}
if (distance>1) {
this._x += (randomX-this._x)/easeFactor;
this._y += (randomY-this._y)/easeFactor;
gotoAndPlay(2);
} else {
gotoAndPlay(1);
}
We're done!Test your Movie (Ctrl+Enter).