# removeMovieClip Help!

**URL:** https://forum.kirupa.com/t/removemovieclip-help/188708
**Category:** flash
**Created:** [May 10, 2006, 8:40am UTC](https://forum.kirupa.com/t/removemovieclip-help/188708 "2006-05-10T08:40:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![darkstyle](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@darkstyle](https://forum.kirupa.com/u/darkstyle)
#### Post date: [May 10, 2006, 8:40am UTC](https://forum.kirupa.com/t/removemovieclip-help/188708/1 "2006-05-10T08:40:03Z")

</div>

Hi friend  
Please help with removeMovieClip,

i am using this script in the 1st frame to load external XML file

```php
this.createEmptyMovieClip("container", this.getNextHighestDepth());

var myXML:XML = new XML();
var links:Array = new Array();
myXML.load("myMenu.xml");
myXML.ignoreWhite = true;
myXML.onLoad = function (success:Boolean){
    if(success){

        loadMenu(this.firstChild.childNodes);
    
    }
}

function loadMenu(menuItem:Array) {
//Loading mainmenu from XML
        for (var i = 0; i<menuItem.length; i++) {
             item = loadHere.attachMovie("itemClip", "itemClip"+i, i);
            item._x = 0;
            item._y = 20*i;
            item.itemLabel.text = menuItem*.attributes.name;
            item.movieUrl = menuItem*.attributes.movieUrl;
     item.onRelease = function() {
          _root.container.loadMovie(this.movieUrl);
                };
        }
//Loading submenu tag in XML file
        
        for (var j = 0; j<menuSub.length; j++) {
            sub = loadHere.attachMovie("subClip", "subClip"+j, j);
            sub._x = 0;
            sub._y = 20*j;
            sub.subLabel.text = menuSub[j].attributes.name;
            sub.movieUrl = menuSub[j].attributes.movieUrl;
     sub.onRelease = function() {
      _root.container.loadMovie(this.movieUrl);
                };
        }
}
stop();

```

in the same frame i have another button , on release i want the actionscript to unload this menu , please help how??

i tried using

```php
_root.myXML.removeMovieClip();

```

but seems not working out , please help.
