jacobdesch
08-31-2007, 02:23 PM
I found this really great tutorial on how to make really nice looking flash snow here:
http://www.kirupa.com/developer/mx/snow.htm
It uses the duplicateMovieClip method to create about 50 pieces of falling snow. Works great. The only problem is that I can't get it to stop snowing! I only need it to snow for a portion of my movie and then go away. I've done a little reading and found that to do it, you use the removeMovieClip command, but I don't know exactly the duplicateMovieClip function names its created instances, so I'm having trouble making them go away. Essentially, this is the code that creates the movie clips of the snow to fall:
on (release) {
for (k=0; k<50; k++) {
duplicateMovieClip(this.snow, "snow"+k, k);
}
}
I thought of doing it this way, but it doesn't seem to work:
removeMovieClip(this.snow1);
removeMovieClip(this.snow2);
removeMovieClip(this.snow3);
removeMovieClip(this.snow4);
removeMovieClip(this.snow5); etc...etc....up to 50 (the maximum number of Movie Clips created)
or this way:
this.snow1removeMovieClip;
this.snow2removeMovieClip;
this.snow3removeMovieClip;
this.snow4removeMovieClip;
this.snow5removeMovieClip;etc...etc....
I'm fairly unfamiliar with both of these functions, so I'm pretty sure I'm just missing something simple when it comes to instance names. Does anyone have any suggestions? Thanks in advance.
http://www.kirupa.com/developer/mx/snow.htm
It uses the duplicateMovieClip method to create about 50 pieces of falling snow. Works great. The only problem is that I can't get it to stop snowing! I only need it to snow for a portion of my movie and then go away. I've done a little reading and found that to do it, you use the removeMovieClip command, but I don't know exactly the duplicateMovieClip function names its created instances, so I'm having trouble making them go away. Essentially, this is the code that creates the movie clips of the snow to fall:
on (release) {
for (k=0; k<50; k++) {
duplicateMovieClip(this.snow, "snow"+k, k);
}
}
I thought of doing it this way, but it doesn't seem to work:
removeMovieClip(this.snow1);
removeMovieClip(this.snow2);
removeMovieClip(this.snow3);
removeMovieClip(this.snow4);
removeMovieClip(this.snow5); etc...etc....up to 50 (the maximum number of Movie Clips created)
or this way:
this.snow1removeMovieClip;
this.snow2removeMovieClip;
this.snow3removeMovieClip;
this.snow4removeMovieClip;
this.snow5removeMovieClip;etc...etc....
I'm fairly unfamiliar with both of these functions, so I'm pretty sure I'm just missing something simple when it comes to instance names. Does anyone have any suggestions? Thanks in advance.