Particle « Animation « Flash Tutorials

Home
Flash Tutorials
1.Actionscript Programming
2.Animals
3.Animation
4.Colors
5.Design
6.Effects
7.Game Cartoon
8.Humans
9.Models
10.Nature
11.Operations
12.Shapes
Photoshop Tutorials
Maya Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
Flash Tutorials » Animation » Particle 

Now go to the filters panel and add these two filters as shown below.

Every time the object gets duped, the OnClipEvents are duped as well, thus, using the random() function I am able to give each particle a mind of it's own!!!

Draw a circle in the middle of the new symbol. It doesn't really matter what the size of the circle is, so it's up to you. This is how mine ended up looking like Fig 2 .

12 Free Online Quiz Creators for Teaching Online Last post by: Sunnyme Date: 01.10.2009 06:26:27

xMin, xMax, yMin, and yMax all define the bounds of the randomly selected area. No matter which random numbers the particles choose to jump to, they will stay within these limits. I picked the values 550 and 400 because that's the default size for a Flash movie (and I was too lazy to change it). The minSize and maxSize variable determine the bounds for both the width and height of the particle. Since it's a circle, and the width and height will always be the same, we only need to worry about one number. The easeFactor variable will determine how long each particle will take getting to its' destination. I'll explain this better later. I declared two variables, randomX and randomY and gave them the range of the Min's and Max's declared above, then generated a random size and stored it in the randomSize variable. The Random() function picks a random value between 0 and 1. You multiply that value by the maximum value that you want it to have (so in this case, the range would be between 0 and 550 - 0), then add the minimum value (which is 0 in this case). Let's look at another example: You want to generate a random value between 50 and 75 (so xMin = 50 and xMax = 75). Since the Random() function only generates a value between 0 and 1, we want to multiply this by the maximum minus the minimum, then add the minimum to it. So Random()*25+50 will do the job. (Since 50 + 25 = 75). Wow I really suck at explaining things ... go check out another Math tutorial if you are still confused. But I'm moving on.

w__ww_.j__a___v__a2___s.___c___om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.