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
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.
Modular Functions in Flash CS3 and ActionScript 3.0 - Particle System Snow Scene Animation
In the next few tutorials we will create a particle system snow scene animation with ActionScript and Flash. There are many snowflakes falling and each flake is one instance of the same movie clip. So we need an ActionScript modular function to animate all of the snowflakes on the stage.
ActionScript 3.0 Event Listeners and Handlers
In this tutorial, we will introduce event listeners and event handlers for Flash and ActionScript 3.0. You will use this code if you want to run a function when an event occurs. We will draw a star in the center of the stage and then rotate the star.
Setting Movie Clip Properties with ActionScript 3.0
In this tutorial, we will explore the properties for a Movie Clip object in the Properties Inspector and then write ActionScript 3.0 code that will set values for these properties.
Flash ActionScript and Data Types
In this tutorial, we will learn how to declare a data type for a new variable.
Pages of Results:
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.