Unable to unload content in XML gallery - AS3
- by Dimitree
I have an XML gallery and I want in the next button function to "unload" all content and load new XML file.
So far I use this code:
function navigateToRight(evt:MouseEvent):void{
if (thumbsHolder.numChildren > 0){
while (thumbsHolder.numChildren) {
thumbsHolder.removeChildAt(0);
}
removeloaded();}
loadXml("2.xml");
}
Where removeloaded function is loader.unload();
Unfortunately when i press next button I can see the new xml file is loaded but the items are from the previous xml file.