Penner AS2 ProFMX: Snowstorm Example

Snow

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:
    this.snow.init();
    
This entry was posted in Flash. Bookmark the permalink. Trackbacks are closed, but you can post a comment.

3 Comments

  1. Rien
    Posted July 11, 2007 at 8:45 am | Permalink

    It says:
    1017: The definition of base class MovieClip was not found.

    when i try to make a component from my snow movieclip which contains my boundingBox movieclip on the stage (in flash CS3)

  2. Posted July 11, 2007 at 11:00 am | Permalink

    These classes were written for AS2 and only support AS2. If I have time, I will update these classes for AS3 support.

  3. Posted August 13, 2009 at 6:28 pm | Permalink

    wow, great snow effect!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting

  • Pages

  • Categories

  • Archives