Move around above and you will see the Aurora Borealis example using the classes from the Chapter 11 Penner AS2 post.
To replicate this example:
- Create a new Flash movie and then create a MovieClip.
- In this MovieClip, add a rectangle 2.5px wide by 100px high with the registration point at the top center of the rectangle.
- Fill the rectangle with a gradient 50% white alpha at the top and 0% white alpha at the bottom. This will be the Aurora Borealis particle.
- Remove this MovieClip from the stage so that it is only in the library and then name it “auroraParticle” and add a class linkage of “com.robertpenner.profmx.auroraBorealis.AuroraParticle” to it.
- Now add another blank MovieClip to the library and name it “auroraBorealis” and add the class linkage of “com.robertpenner.profmx.auroraBorealis.AuroraBorealis” to it.
- 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:”.
- Now drag this component to the stage and place it at the top center.
- Add an instance name of “auroraBorealis” to the component MovieClip and then click on the Parameters tab to see the component options. Play around with these options.
-
On the root timeline add the following code and compile:
this.auroraBorealis.init();


Chapter 12 of Robert Penner’s Programming Flash MX is the second of the final four chapters of the book. This chapter includes classes to develop a 3d snowstorm particle system with user controlled wind.
This chapter contains three classes: Snowflake, Snowstorm and Snow, which will be included in the com.robertpenner.profmx.snow namespace.
Documentation:
com.robertpenner.profmx.snow.Snowflake
com.robertpenner.profmx.snow.Snowstorm
com.robertpenner.profmx.snow.Snow
Source:
Penner AS2 ProFMX: Chapter 12 Classes
Dependencies:
Penner AS2 ProFMX: Chapter 5 Classes
Penner AS2 ProFMX: Chapter 3 Classes
mx.transitions.OnEnterFrameBeacon