This might be a helpful source file for those of you trying to learn AS2. Remember to keep the .as files in the same folder as the .fla, and the files are case-sensitive (so make sure those capital S’s are on the .as files!)
It’s adapted from Kirupa’s tutorial found here.
Here are the class files: Snowflake.as and [URL=http://www.smoothhabitat.com/blog/as/snow/Snow.as]Snow.as.
So, download those files and open up a new FLA. Make yourself a little snowflake MovieClip, set the identifier to “*snowflake” (the * is my little method of keeping track of which library objects are pulled in dynamically) and the AS2.0 class to “Snowflake”.
Next, on frame 1 (or where ever you want it to start snowing) put in the following line:
var s:Snow=new Snow(100,_root,200,100,1);
The parameters are as follows: number of flakes, the MovieClip you want these flakes to sit in, the width, height, and wind.
For that mouse over effect:
this.onEnterFrame=function() { s.setWind((_xmouse/20)-4); }
Good times.