eHow launches Android app: Get the best of eHow on the go.

How To

How to Create a Particle Effect in Flash

Contributor
By eHow Contributing Writer
(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.

Difficulty: Challenging
Instructions
  1. Step 1

    Open a new document in Adobe Flash. Press "F9" on the keyboard and set the frame rate to 55 frames per second.

  2. Step 2

    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.

  3. Step 3

    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.

  4. Step 4

    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."

  5. Step 5

    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.

  6. Step 6

    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;

  7. Step 7

    Insert a frame. Choose the second frame from the timeline panel and press "F5."

  8. Step 8

    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);
    }

  9. Step 9

    Repeat the above step to create more particle to enhance the effect. Be sure to save the file.

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2010 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics