Books & Music
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
News & Politics
Religion & Spirituality
Travel & Culture
TV & Movies
Archive by Date | Archive by Article Title
Flash CS3 ActionScript 3 Particle System
Now that we have the Flash CS3 particle system snowfall animation working exactly like we want, itīs time to optimize the program code.
More Math.random() Method in Particle System
We have completed the snowfall animation for our Flash CS3 particle system. But the snowflakes seem to be missing from the bottom left corner of the stage. What can we do to adjust our animation? Will the Math.random() method save us?
Event Listeners, Functions and Flash Particles
It is time to make it snow in our Flash CS3 particle system animation. We will create more snowflakes just like the one we have been working on for the last few tutorials.
Alpha and Scale Particle Properties - Flash CS3
Letīs add interest to the animation by varying the size and transparency of the snowflake particle. After all, not all snowflakes are the same size. Also, by varying the transparency of some flakes, it will give the illusion that some of the snowflakes are farther away in the snow scene.
Creating a Particle System Wind Effect with Flash CS3 and Math.random()
In our Flash particle system snow scene, our flake just falls straight down. But, unless there is absolutely no wind, most flakes travel down at a slant. Letīs use some math to add more realism to our snowfall animation.
Controlling Flash Animation with If and Else Conditional Statements
Now that our snowflake movie clip falls down the stage for our particle system snow scene animation, what happens when it falls below the stage? As we have it programmed now, the flake will just keep falling. We could stop the animation after the flake gets beyond the display area of the stage.
The ENTER_FRAME Event Listener to Animate Particles
In this Flash CS3 tutorial, we will continue to improve our particle system. We will program a snowflake to fall down the stage by progressively increasing the value of the Y position for this snowflake movie clip and we will do this with a new event listener called the ENTER_FRAME event listener.
Generating Random Numbers and the ActionScript Math.random() Method
At this point in our snow scene tutorial, we will generate a random number for the Y position for each snow flake using the Math.random() method. The built-in ActionScript Math class contains methods that perform common math functions such as generating random numbers and rounding numbers.
ActionScript For Loop Code and Multiple Instances of Movie Clips
When you want your code to repeat the same task many times, you can use a code loop in ActionScript. Basically, this is code that uses an incremental counter to count the number of times the loop is performed. We then tell Flash to repeat the loop until a certain number is reached.
ActionScript For Loop Code and Multiple Instances of Movie Clips - The Code
In our first Flash snow scene tutorial, we learned how to use a modular function and ActionScript to animate more than one instance of the same movie clip. In this second tutorial, we will take a look at code loops for our particle system.
Pages of Results:
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.