AS2: Unload movieclip problem

Hi guys,

Work bought this menu and asked me to edit it even though i’m no AS2 expert just so basic knowledge, I’ve come pretty far so far but now i ran into a problem (probably the final one)…

If anyone could help me i would greately appreciate it, the problem:

The menu uses XML to load in the menu, so all the options are dynamical.
If you click a button it loads a menu into the stage, but if i click an other it overlapse the old one…

So i figured i need to unload all the other movies on the stage, how do I do this?

This is what I got for onRelease functions:

//Release function..
        _parent.AccordionMenu["Menu"+a].onRelease = function() {
            if(type[this.getDepth()] == "gotoAndStop"){
                _parent[frameTarget[this.getDepth()]].gotoAndStop(frame[this.getDepth()]);
                _parent.InfoMC.submenuSelectiontxt.text = "menu title <"+title[this.getDepth()]+">";
                _parent.InfoMC.submenuItemtxt.text = "menu item type <"+type[this.getDepth()]+">";
                _parent.InfoMC.destinationtxt.text = "menu item destination <frame/label "+frame[this.getDepth()]+">";
                _parent.InfoMC.targettxt.text = "menu item target object <"+frameTarget[this.getDepth()]+">";
            }
            else{
                if(type[this.getDepth()] == "getURL"){
                    getURL(url[this.getDepth()], urlTarget[this.getDepth()]);
                    _parent.InfoMC.submenuSelectiontxt.text = "menu title <"+title[this.getDepth()]+">";
                    _parent.InfoMC.submenuItemtxt.text = "menu item type <"+type[this.getDepth()]+">";                    
                    _parent.InfoMC.destinationtxt.text = "menu item destination <"+url[this.getDepth()]+">";                
                    _parent.InfoMC.targettxt.text = "menu item target <"+urlTarget[this.getDepth()]+">";
                }
                else{
                    _parent.InfoMC.submenuSelectiontxt.text = "menu title <"+title[this.getDepth()]+">";
                    _parent.InfoMC.submenuItemtxt.text = "invalid command from xml-file <"+type[this.getDepth()]+"> check your code";
                    _parent.InfoMC.destinationtxt.text = "<none>";
                    _parent.InfoMC.targettxt.text = "<none>";
                }
            }
        }
        _parent.AccordionMenu["Menu"+a].onRollOver = function() {
            _parent.InfoMC.Selectiontxt.text = "title <"+title[this.getDepth()]+">";

for submenu’s:

//onRelease function for sub menus..
                if(this._ymouse >= (number(titleHeight[this.getDepth()])+subItemDistance)+(b*(number(titleHeight[this.getDepth()])+subItemDistance)) && this._ymouse < (number(titleHeight[this.getDepth()])+subItemDistance)+((b+1)*(number(titleHeight[this.getDepth()])+subItemDistance))){
                    if(subType[this.subMenus["subMenu"+b].getDepth()] == "gotoAndStop"){
                        _parent[subFrameTarget[this.subMenus["subMenu"+b].getDepth()]].gotoAndStop(frame[this.subMenus["subMenu"+b].getDepth()]);
                        _parent.InfoMC.submenuSelectiontxt.text = "sub menu title <"+subTitle[this.subMenus["subMenu"+b].getDepth()]+">";
                        _parent.InfoMC.submenuItemtxt.text = "sub menu item type <"+subType[this.subMenus["subMenu"+b].getDepth()]+">";
                        _parent.InfoMC.destinationtxt.text = "sub menu item destination <frame/label "+frame[this.subMenus["subMenu"+b].getDepth()]+">";
                        _parent.InfoMC.targettxt.text = "sub menu item target object <"+subFrameTarget[this.subMenus["subMenu"+b].getDepth()]+">";
                    }
                    else{
                        if(subType[this.subMenus["subMenu"+b].getDepth()] == "getURL"){
                            getURL(url[this.subMenus["subMenu"+b].getDepth()], subUrlTarget[this["subMenu"+b].getDepth()]);
                            _parent.InfoMC.submenuSelectiontxt.text = "sub menu title <"+subTitle[this.subMenus["subMenu"+b].getDepth()]+">";
                            _parent.InfoMC.submenuItemtxt.text = "sub menu item type <"+subType[this.subMenus["subMenu"+b].getDepth()]+">";
                            _parent.InfoMC.destinationtxt.text = "sub menu item destination <"+url[this.subMenus["subMenu"+b].getDepth()]+">";
                            _parent.InfoMC.targettxt.text = "sub menu item target <"+subUrlTarget[this.subMenus["subMenu"+b].getDepth()]+">";
                        }
                        else{
                            _parent.InfoMC.submenuSelectiontxt.text = "sub menu title <"+subTitle[this.subMenus["subMenu"+b].getDepth()]+">";
                            _parent.InfoMC.submenuItemtxt.text = "invalid command from xml-file <"+subType[this.subMenus["subMenu"+b].getDepth()]+"> check your code";
                            _parent.InfoMC.destinationtxt.text = "<none>";
                            _parent.InfoMC.targettxt.text = "<none>";
                        }
                    }
                }
            }    

If anyone could help me, it would be grately appreciated!!

Jay