onClipEvent (load) {
this._x=0 + Math.random()*575;
this._y=-50 + Math.random()*425;
this._alpha=Math.random()*100;
var size;
size=Math.random()*100;
if (size>=50 && size<=100) {
this._xscale=size;
this._yscale=size;
}
else {
this._xscale=90;
this._yscale=90;
}
}
Now lets analyze what this enormous chunk of code does.
The lines dealing with _x and _y control the starting position of the snowflake when the movie loads; we dont want all of the snowflakes to come from the same place, but we do want them to start above the top edge of the stage. To that end the function defines the horizontal (x) position at the 0 point (left corner) of the stage, before adding a random number between 0.0 and 0.1 thats been multiplied by slightly more than the width of the stage so that snowflakes can fall in not just from the top, but from the side.


