Anonymous wrote:heres the script :
while (i<40) {
duplicateMovieClip("rain", i, i);
setProperty(i, _x, random(1000)-100);
setProperty(i, _y, 0);
setProperty(i, _alpha, 500-random(50));
scale = random(100);
setProperty(i, _xscale, scale);
setProperty(i, _yscale, scale);
i = i+1;
}
hmmm... you could enter an if loop.
if (raining) {
while (i<40) {
duplicateMovieClip("rain", i, i);
setProperty(i, _x, random(1000)-100);
setProperty(i, _y, 0);
setProperty(i, _alpha, 500-random(50));
scale = random(100);
setProperty(i, _xscale, scale);
setProperty(i, _yscale, scale);
i = i+1;
}
}
in the first frame where the rain starts you have to set raining to true:
raining = true;
at the frame where you want it to stop you set it to false and the script stops generating rain:
raining = false;
got any other scripts in your rain movieclips?