-
Removing a movie clip -
Code:
I have the following code:
for (var i = 0; i<amount; i++) {
thisFlake = this.attachMovie("snowflake1", "snowflake1"+i, i);
It places the movie snowflake1 on the stage in my Pre-Load Scene.
Then when I play the movie the snoflakes work right, but when the pre-loading is done there are falling snowflakes on my next scene, even though there is no code for the snowflakes in that scene.
I have tried numerous ways to remove the clip:
this.removeMovieclip("snowflake1")
delete "snowflake1"
this.removeAll
Please help as I am getting tired of flakes where they don't belong. Thanks.
Sincerely,
Greg
-
Change the first code to this:
Code:
for (var i = 0; i<amount; i++) {
this.attachMovie("snowflake1", "snowflake1"+i+"_mc", i);
}
Then to remove it:
Code:
for (var i = 0; i<amount; i++) {
this["snowflake1"+i+"_mc"].removeMovieClip();
}
-
am i seeing double :)
or wasn't this question asked and resolved yesterday in the Actionscript forum ?
http://board.flashkit.com/board/showthread.php?t=741791
-
Oh, I see what happened... gregwhitworth made this thread, then when nobody responded, he made a new one in the Actionscript forum. I think it says somewhere in the directions NOT to post duplicate questions. gregwhitworth, in the future, try to mark questions as "Resolved," so people don't waste their time re-answering an answered question (not to be harsh ;))