Hi, need some help here.
I’m using the code from a tutorial on this site but instead of snowflakes it’s raining blood.
Th thing is that i want it only to rain in frame one, but it’s continues to the next scene even:(
Can someone help? I’m quite new to action script.
Thanks
I’m using this code for the Moive clip:
onClipEvent (load) {
movieWidth = 800;
movieHeight = 600;
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
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) {
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;
}
}
And this for frame one:
stop();
for (k=0; k<25; k++) {
duplicateMovieClip(this.blodregn, "blodregn"+k, k);
}