Move around above and you will see the Snowstorm example using the classes from the Chapter 12 Penner AS2 post.
To replicate this example:
- Create a new Flash movie and then create a MovieClip at (0, 0).
- In this MovieClip, add a rectangle 400px wide by 300px high with the registration point at the top left of the rectangle.
- This will be the boundingBox of the snow component. Give the MovieClip an instance name of “boundingBox”.
- 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”.
- 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:”.
- Click on the Parameters tab to see the following component options: fallSpeed, friction, maxFlakes, and zDepth. Play around with these options.
- On the root timeline add the following code and compile:
1this.snow.init();
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)
These classes were written for AS2 and only support AS2. If I have time, I will update these classes for AS3 support.
wow, great snow effect!