Tutorial Help, removing created movieclips

Hi all,

I’m implementin this tutorial: http://www.kirupa.com/developer/mx2004/thumbnails7.htm

I’ve managed to get it all working though am having trouble extending it more. Basically I’ve got it set up so that when the used click on another button it loads another xml, basically going to another gallery.

It works fine apart from the fact that when i change the gallery, if the previous one has more photos then they are left over in the thumbnails of the new one. So basically what i need to do is remove the created movie clips, when i click on a button then load the new xml file. I can get them using the following code, added onto the end of the tutorial:

image_mcl = new MovieClipLoader();
    remove = function (){
        for (i=0; i<15; i++) {
    remove ();

Obviously this isn’t what I want as it removes them just after they are created, i was just trying to figure out how to remove them! I’ve made this function global etc and had buttons use the function but it still wont remove them!

The Full path to the created clips is contentHold.content2.gallery.thumbnail_mc.t*, where i is the numer of photos in the gallery.

I created another movie clip within the thumbnail_mc clip and could manipulte that so i’m guessing it has something to do with them being created dynamically?

Any help is much appreciated, i can post the fla if it’s needed.