Clear a Movie,HELP!

im creating instances of a movie when i hit a button on screen. I want to hit another button to be able to clear these instances all at once. Does anyone know how to do this.



When you say you’re creating instances of a movie, do you mean
you’re duplicating it?


Yes im duplicating them

You can use a for loop to cycle through the names and remove them from the stage.

But I don’t know what code you are using to duplicate the clip (other than duplicateMovieClip()), so I can’t help you much unless you share the code or sample file :-\


If when duplicating you name them as "movieClip1, movieClip2, movieClip3, etc…
you can (as lost in beta says) use a for loop to delete them:

for(var i=0; i<numberOfClips; i++){
var clipsToDelete = eval("movieClip"+i);

If I was you I would store the duplications in an array so you can access them at any time and do whatever you want to all or of any of them.

Hope it helps