# removeMovieClip not working well!

**URL:** https://forum.kirupa.com/t/removemovieclip-not-working-well/201935
**Category:** flash
**Created:** [September 26, 2006, 12:23pm UTC](https://forum.kirupa.com/t/removemovieclip-not-working-well/201935 "2006-09-26T12:23:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![the\_artdirector](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/the_artdirector/32/2771_2.png) [@the\_artdirector](https://forum.kirupa.com/u/the_artdirector)
#### Post date: [September 26, 2006, 12:23pm UTC](https://forum.kirupa.com/t/removemovieclip-not-working-well/201935/1 "2006-09-26T12:23:41Z")

</div>

[COLOR=#ffffff] **removeMovieClip not working well!** [/COLOR] Hello Guys!  
check this script please:

////////////////////////////////////////  
stop();  
[//this.removeMovieClip](https://this.removeMovieClip)(mm);  
var spacing:Number = 188;  
var JoKinG:Number = 3;  
// CHANGE THIS  
var count:Number = 0;  
// Inc X  
var count2:Number = 0;  
// Inc Y  
var arch:XML = new XML();  
var imgDataSmall:Array = new Array();  
var imgDataBig:Array = new Array();  
var id = \_root.mm.id;  
arch.ignoreWhite = true;  
arch.load(“[http://www.otvinvest.com/test/photosxml.php](http://www.otvinvest.com/test/photosxml.php)”);  
arch.onLoad = function() {  
var t:Number = this.firstChild.childNodes.length;  
for (var i:Number = 0; i\<t; i++) {  
var d:String = “[http://www.otvinvest.com/test/img/urls/](http://www.otvinvest.com/test/img/urls/)”+this.childNodes[0].childNodes\*.childNodes[2].firstChild.nodeValue;  
imgDataBig\* = “[http://www.otvinvest.com/test/img/urlb/](http://www.otvinvest.com/test/img/urlb/)”+this.childNodes[0].childNodes\*.childNodes[3].firstChild.nodeValue;  
var thisid = this.childNodes[0].childNodes\*.childNodes[4].firstChild.nodeValue;  
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

```
	duplicateMovieClip(empy, "pics"+i, i);
	m = eval("pics"+i);

```

i want to make a button that whenever i click on it, the duplicated movie clips diappear, what happens with me is that only the last one diappears.

How can i fix that?  
you can check it on this site:  
[http://www.otvinvest.com/test](http://www.otvinvest.com/test)

thanks!
