# Can't Unload Movie Clip :(

**URL:** https://forum.kirupa.com/t/cant-unload-movie-clip/79617
**Category:** flash
**Created:** [February 15, 2005, 6:50pm UTC](https://forum.kirupa.com/t/cant-unload-movie-clip/79617 "2005-02-15T18:50:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![denrou](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@denrou](https://forum.kirupa.com/u/denrou)
#### Post date: [February 15, 2005, 6:50pm UTC](https://forum.kirupa.com/t/cant-unload-movie-clip/79617/1 "2005-02-15T18:50:02Z")

</div>

Hi,

I have xml which is loaded in a movie clip but i can’t seem to be able to unload that movie clip when i need to. I tried everything and the code seems right. I’m guessing it’s because of some kinda path issue.  
Could someone take a look and help me out. Maybe someone else might see something i’m missing.

This is the code i am using to load the xml in the movie clip:

```auto
var r = _root;

r.clipArr = new Array();

r.menuXml = new XML();
r.menuXml.ignoreWhite = true;
r.menuXml.onLoad = function() {
 menuItem = this.firstChild.childNodes;
 for (var i=0; i<menuItem.length; i++) {
  item = _root.attachMovie("itemClip", "itemClip" + i, i);
  
  r.clipArr.push(item);

  item._x = 30;
  item._y = 30*i;
  item.itemLabel.text = menuItem*.attributes.name;
  item.myUrl = menuItem*.attributes.url;
  item.onRelease = function() {
   getURL(this.myUrl,"_blank");
  }
 }
}
r.menuXml.load("pdf_menu.xml");
stop();

// new stuff--------------------------
deleteClips = function(){
  for(var i = 0; i<r.clipArr.length; i++){
	r.clipArr*.removeMovieClip();
  }
  r.menuXml = null;
};
// new stuff--------------------------

```

This is what i am using to unload the movie clip:

```auto
_root.deleteClips()

```

Here is the file that i am working on. Just download it from my server and take a look:

[http://216.194.72.230/~denis/Unload\_Movie4.zip](http://216.194.72.230/~denis/Unload_Movie4.zip)

Thank you, I appreciate it!
