I’m a super action script novice. I used the script in the tutorial at the address below to create a snow effect, but I can’t figure out how to make it stop!
http://www.kirupa.com/developer/mx/snow.htm
Here’s the script I applied:
Copy and paste the following code into your Actions dialog box:
onClipEvent (load) {
//specifies the size of the movie stage
movieWidth = 300;
movieHeight = 200;
//variables that will modify the falling snow
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
//giving each snowflake unique characteristics
this._xscale = this._yscale=50+Math.random()*100;
this._alpha = 75+Math.random()*100;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
//putting it all together
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) || (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
Copy and paste the following code into the Actions dialog box:
for (k=0; k<50; k++) {
duplicateMovieClip(this.snow, “snow”+k, k);
}