Clear thumbnails

Hi all,

I have a xml file that supplies two sets of thumbnails called by two different buttons. The problem is when one btn is pressed the images load in, but then when the second button is pressed the thumbnails are loaded over the top of the first set. So what I need is a way to remove the first set of thumbs

Here is the code and fla if anyone can help.

[AS]//-- Variables ----
_global.whichImg = null;
var gutter = 5;
var line = 12;
plane_arr = new Array();
car_arr = new Array();
//
//–Set Up xml ----
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
searchXML();
} else {
trace(“xml not loaded”);
}
};
//
//–Search xml / Fill planes_arr----
my_xml.load(“images.xml”);
function searchXML() {
var start = my_xml.firstChild.childNodes;
for (var i = 0; i<start.length; i++) {
if (start*.nodeName == “plane”) {
var plane = start*.childNodes;
for (var n = 0; n<plane.length; n++) {
plane_arr.push(plane[n].childNodes);
}
}
if (start*.nodeName == “car”) {
var car = start*.childNodes;
for (var v = 0; v<car.length; v++) {
car_arr.push(car[v].childNodes);
}
}
}
}
one_btn.onRelease = function() {
_global.whichImg = plane_arr;
holder_mc.SequentailImages(_global.whichImg);
};
two_btn.onRelease = function() {
_global.whichImg = car_arr;
holder_mc.SequentailImages(_global.whichImg);
};
//
//–Place Thumbnails ----
MovieClip.prototype.SequentailImages = function(photo) {
this.curImage = 0;
this.photo = photo;
this.ImageFromSequence();
this.onEnterFrame = function() {
var clipLoaded = this.imageClip.getBytesLoaded();
var clipTotal = this.imageClip.getBytesTotal();
if (clipLoaded/clipTotal == 1) {
this.imageClip.onRollOver = function() {
this._alpha = 100;
};
this.imageClip.onRollOut = this.imageClip.onDragOut=function () {
this._alpha = 60;
};
this.imageClip.onRelease = function() {
image_mc.loadMovie(_global.whichImg[this.idx]+".jpg");
};
this.imageClip._alpha = 60;
this.imageClip.id = this;
this.imageClip.idx = this.curImage;
if (this.curImage != 0) {
this.imageClipPrev = this[“thumb”+(this.curImage-1)+"_mc"];
this.imageClip._x = (this.imageClipPrev._x+this.imageClipPrev._width)+gutter;
this.imageClip._y = 0;
if (this.curImage>=line) {
this.imageClip._y = 52;
if (this.curImage>=line+1) {
this.imageClip._x = (this.imageClipPrev._x+this.imageClipPrev._width)+gutter;
} else {
this.imageClip._x = 0;
}
}
}
this.curImage++;
if (this.curImage>=this.photo.length) {
this.onEnterFrame = null;
} else {
this.ImageFromSequence();
}
}
};
};
//
//–Load thumbnail image ----
MovieClip.prototype.ImageFromSequence = function() {
this.imageClip = this.createEmptyMovieClip(“thumb”+this.curImage+"_mc", this.curImage);
this.imageClip.loadMovie(this.photo[this.curImage]+"_th.jpg");
};
[/AS]