# Attach/remove with combo box

**URL:** <https://forum.kirupa.com/t/attach-remove-with-combo-box/164051>\
**Category:** Uncategorized\
**Created:** [September 28, 2005, 6:46am UTC](https://forum.kirupa.com/t/attach-remove-with-combo-box/164051 "2005-09-28T06:46:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deathBydsgn](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@deathBydsgn](https://forum.kirupa.com/u/deathBydsgn)\
**Post date:** [September 28, 2005, 6:46am UTC](https://forum.kirupa.com/t/attach-remove-with-combo-box/164051/1 "2005-09-28T06:46:53Z")

</div>

So I have a combobox…it’s called tableColorBox, with two labels and data- transparent and color. The initially selected label is transparent, but when the user changes to color, I have an attachMovie that calls on a color picker. That part works like a charm. But for some reason, I can’t get rid of the color picker when I change back to transparent…any ideas?

```auto
tableColorBox.changeHandler = function() {
	if (tableColorBox.selectedItem.data == transparent) {
		tablecolor = tableColorBox.selectedItem.data;
		pickerContainer1.removeMovieClip();
		trace(tablecolor);
	}
	else {
	    pickerContainer1.attachMovie("HoloPicker", "picker2", pickerContainer1.getNextHighestDepth(), {paletteSize:"Medium", palettePosition:"Left", initialHex:bgcolor});
		tablecolor = pickerContainer1.picker2.hex.split("0x").join("");
		trace(tablecolor);
		pickerContainer1.picker2.onColorChange = function() {
			tablecolor = pickerContainer1.picker2.hex.split("0x").join("");
			trace(tablecolor);
		};
	}
};

```
