# Remove movieclips

**URL:** https://forum.kirupa.com/t/remove-movieclips/216066
**Category:** Uncategorized
**Created:** [February 13, 2007, 2:23pm UTC](https://forum.kirupa.com/t/remove-movieclips/216066 "2007-02-13T14:23:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nameez](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@nameez](https://forum.kirupa.com/u/nameez)
#### Post date: [February 13, 2007, 2:23pm UTC](https://forum.kirupa.com/t/remove-movieclips/216066/1 "2007-02-13T14:23:29Z")

</div>

i have a color pallete where small mc loaded according the number of colors passes this is trhe funtion i use.noCols is a node of an XML object

function listColors(noCols) {  
eraseCol();  
for (i=1; i\<noCols.length; i++) {  
this.tempColBox = \_root.attachMovie(“mc\_colorBox”, “colorBox”+i, i+100);  
this.tempColBox.\_x = colBoxSpace\*i+60; //colBoxSpace has a initial value of 100  
this.tempColBox.\_y = 470;  
}  
if (eraser\<noCols.length) {  
eraser = noCols.length;  
trace("New Eraser "+eraser);  
}

and when again called i’m trying erase the mc and load new ones to refresh the color pallette.i’m tryin to erase the loaded mc using this function

}  
function eraseCol() {  
for (i=eraser; i\>0; i–) {  
i–;  
\_root.removeMovieClip(“colorBox”+i);  
}

it doesnt work…

can anyone help me

Thanks  
:snug:
