Home Email Message Boards Help
  What are particles? Buy ElementalFX ElementalFX Settings ElementalFX Tutorials Other Stuff
"Tinkerbell" Mouse Chaser
 
1. In FlashMX 2004, open a new document (.fla file).
2. First lets get some particle artwork. Download the following two PNG files and make custom particles out of them (see the Using Custom Particles tutorial if you don't know how to do this).
Blurredsharp Blurredspiky

Note: These are PNG files with alpha transparency, so even
if they look funny in the browser, if you open them in
Fireworks or Flash you will see the correct transparency.
3. Now that your artwork is prepared, let's set up the large sparkles. Drag an ElementalFX component on the stage (it doesn't matter where), name it "tinkerbell", and use the following settings.
Emitter Type Point
Active True
Visible False
Prefix a
Level 100
Width 20
Height 20
Particle Type Custom
LinkageName Blurredsharp
Rate 1
Orientation Random
Arbitrary Angle N/A
Life 10
Life Variation 0
Gravity 1
Spread 360
Velocity 5
Velocity Variation 25
Spin 0
Spin Variation 0
Bubble 0
Bubble Variation 0
4. Now let's set up the tiny sparkles. Drag an ElementalFX component on the stage (it doesn't matter where), name it "tinkerbell2", and use the following settings.
Emitter Type Point
Active True
Visible False
Prefix b
Level 200
Width 20
Height 20
Particle Type Custom
LinkageName Blurredsharp
Rate 1
Orientation Random
Arbitrary Angle N/A
Life 30
Life Variation 0
Gravity 0
Spread 360
Velocity 1
Velocity Variation 25
Spin 0
Spin Variation 0
Bubble 0
Bubble Variation 0
5. Now let's set up the glow. Drag an ElementalFX component on the stage (it doesn't matter where), name it "tinkerbell3", and use the following settings.
Emitter Type Point
Active True
Visible False
Prefix c
Level 300
Width 20
Height 20
Particle Type Custom
LinkageName Blurredspiky
Rate 1
Orientation Random
Arbitrary Angle N/A
Life 7
Life Variation 0
Gravity 0
Spread 0
Velocity 0
Velocity Variation 0
Spin 0
Spin Variation 0
Bubble 0
Bubble Variation 0
6. If you test publish, you should have the flickering glow, the fat sparkles, and the small sparkles, each coming from their respective emitters. Now lets make them all follow the mouse. You can't tell each of them to startDrag(), because each new startDrag() call cancels the last one, so let's create a controller clip to drag, and have the components follow the controller. Create an empty movie clip called "tink". Drag a copy of it to the stage, select it, and give it the instance name "tink". In the ActionScript panel, type the following code:
onClipEvent(enterFrame){
     _parent.tinkerbell._x = _parent.tinkerbell2._x = _parent.tinkerbell3._x = this._x;
     _parent.tinkerbell._y = _parent.tinkerbell2._y = _parent.tinkerbell3._y = this._y;
}
7. Now if you test publish, you will see that all of the particles are coming form the same place (the x,y position of the controller clip, "tink"). All that's left now is to tell the controller to follow the mouse. In the first frame of the root timeline, type the following code:
tink.startDrag(true);
8. Publish. You should now have something closely resembling the sample below. (source)
©2003 HorseFish Productions