hayored
12-10-2002, 04:20 PM
Hi,
I created a rain effect using loop:
function make_rain() {
c = c + 1;
duplicateMovieClip ("_root.drop", c, c);
setProperty (c, _x, Math.random() * 200);
setProperty (c, _y, 300 + Math.random() * 10);
}
After a while a rain becames too heavy, so I tried to delete some instances, by adding statement:
if (c > 5) {
delete "_level0." + (c - 5);
}
Using debbug I verified that the instances have a name: "_level0.n", where "n" is a running numer, but delete statement is not working.
Any idea how to delete those instances?
Thanks,
YH
I created a rain effect using loop:
function make_rain() {
c = c + 1;
duplicateMovieClip ("_root.drop", c, c);
setProperty (c, _x, Math.random() * 200);
setProperty (c, _y, 300 + Math.random() * 10);
}
After a while a rain becames too heavy, so I tried to delete some instances, by adding statement:
if (c > 5) {
delete "_level0." + (c - 5);
}
Using debbug I verified that the instances have a name: "_level0.n", where "n" is a running numer, but delete statement is not working.
Any idea how to delete those instances?
Thanks,
YH