Penner AS2 ProFMX: Snowstorm Example

Click image to view demo

Move around above and you will see the Snowstorm example using the classes from the Chapter 12 Penner AS2 post.

To replicate this example:

  1. Create a new Flash movie and then create a MovieClip at (0, 0).
  2. In this MovieClip, add a rectangle 400px wide by 300px high with the registration point at the top left of the rectangle.
  3. This will be the boundingBox of the snow component. Give the MovieClip an instance name of “boundingBox”.
  4. Select this MovieClip on the stage and convert it to another MovieClip. Name this clip “snow” and add the class linkage of “com.robertpenner.profmx.snow.Snow”. Also, give it an instance name of “snow”.
  5. You will now convert this MovieClip to a component. Right-click on it and select “Component Definition”. In the window that pops up add the same class to the area that says “AS 2.0 Class:”.
  6. Click on the Parameters tab to see the following component options: fallSpeed, friction, maxFlakes, and zDepth. Play around with these options.
  7. On the root timeline add the following code and compile:

About the author


View all posts


Leave a Reply

Your email address will not be published. Required fields are marked *