Penner AS2 ProFMX: Aurora Borealis Example
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:
1) Create a new Flash movie and then create a MovieClip.
2) In this MovieClip, add a rectangle 2.5px wide by 100px high with the registration point at the top center of the rectangle.
3) 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.
4) 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.
5) 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.
6) 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:".
7) Now drag this component to the stage and place it at the top center.
8) 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.
9) On the root timeline add the following code and compile:
this.auroraBorealis.init();
Leave a comment