How to Create a Particle Effect in Flash

By eHow Computers Editor

Rate: (0 Ratings)

Most websites today somehow incorporate Flash into their design. Flash makes the complicated seem simple. One example of this design is the particle effect. In just minutes a user can have a artistic effect to use in web design projects with little effort. Read on to learn how to create a particle effect in Flash.

Instructions

Difficulty: Challenging

Step1
Open a new document in Adobe Flash. Press "F9" on the keyboard and set the frame rate to 55 frames per second.
Step2
Pick the oval tool from left menu panel. Draw the oval in the open document. Turn off the color stroke option on the left menu panel.
Step3
Color the oval. Select the oval and press "Shift and F9." From the color panel change the type to "Radial." Make sure the stroke color option is turned off. There is trail and error here to get the correct color. Select the preferred color and move the slide color options until the desired color and look is achieved.
Step4
Click on the oval and press "F8." In the box select the "Movie Clip" option. The naming of the movie is up to the user. Choose "OK."
Step5
Make sure the oval is still selected. Then double click the oval to open the movie clip. With particle or oval still selected, choose "F8" from the keyboard. Change the symbol type to graphic and click "OK." Again the naming of the file is up the user.
Step6
Choose the first frame in the timeline menu. Then Press "F9" to access the script panel. Paste the following script inside the script panel:
xMin = 0;
xMax = 400;
yMin = 0;
yMax = 200;
minSize = 15;
maxSize = 50;
easeFactor = 10;

randomX = Math.random () * ( xMax - xMin ) + xMin;
randomY = Math.random () * ( yMax - yMin ) + yMin;
randomSize = Math.random () * ( maxSize - minSize ) + minSize;
Step7
Insert a frame. Choose the second frame from the timeline panel and press "F5."
Step8
Select the third frame from the timeline menu panel and press "F6" on the keyboard. Next press "F9" to open the script panel. In the script panel copy and paste the following text:
distance = Math.sqrt(Math.pow(this._x-randomX, 4)+Math.pow(this._y-randomY, 4));

if (Math.abs(this._width-maxSize)>2) {
this._width += (randomSize-this._width)/4;
this._height += (randomSize-this._height)/4;
}

if (distance>1) {
this._x += (randomX-this._x)/easeFactor;
this._y += (randomY-this._y)/easeFactor;
gotoAndPlay(4);
} else {
gotoAndPlay(2);
}
Step9
Repeat the above step to create more particle to enhance the effect. Be sure to save the file.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Create a Particle Effect in Flash

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads