hello,
i’m loading external images from xml file.
this happens when the xml file is loaded
xmlPics.onLoad = function(success:Boolean) {
if (success)
{
nPics = xmlPics.firstChild.childNodes.length;
thumbs_mc.thumbs_bg._height = 200 + nPics*(THUMB_H + VMARGIN);
if (thumbs_mc.thumbs_bg._height < CAREA_H)
{
thumbs_mc.thumbs_bg._height = CAREA_H;
}
// create clips
for (var i:Number = 0; i < nPics; i++)
{
var mc:MovieClip = thumbs_mc.createEmptyMovieClip("pic"+i,iDepth++);
mc._x = HMARGIN;
mc._y = 25 + i*(THUMB_H + VMARGIN);
mc.beginFill(0x444444);
mc.moveTo(0, 0);
mc.lineTo(THUMB_W, 0);
mc.lineTo(THUMB_W, THUMB_H);
mc.lineTo(0, THUMB_H);
mc.lineTo(0, 0);
mc.endFill();
mc.beginFill(0x000000);
mc.moveTo(1, 1);
mc.lineTo(THUMB_W-1, 1);
mc.lineTo(THUMB_W-1, THUMB_H-1);
mc.lineTo(1, THUMB_H-1);
mc.lineTo(1, 1);
mc.endFill();
// create actual picholder
mc.createEmptyMovieClip("pic",mc.getNextHighestDepth());
}
iLoader.loadClip(xmlPics.firstChild.childNodes[0].firstChild.nodeValue,thumbs_mc.pic0.pic);
}
}
// setup buttons
port_nav.mc_W.bW.onRelease = function()
{
// load xml
xmlPics.load("xml/portfolio_w.xml");
port_nav.mc_W.gotoAndStop(2);
port_nav.mc_P.gotoAndStop(1);
};
port_nav.mc_P.bP.onRelease = function()
{
// load xml
xmlPics.load("xml/portfolio_p.xml");
port_nav.mc_P.gotoAndStop(2);
port_nav.mc_W.gotoAndStop(1);
};
problem is once i load another xml file the images aren’t reset. plus empty filled movieclips cover the original ones.
how can i delete all previous thumbnails and reset the whole process?
i tried using removeMovieClip() but that doesnt help.
if you could help
thank you