# Duplicating comboxes

**URL:** <https://forum.kirupa.com/t/duplicating-comboxes/234453>\
**Category:** Uncategorized\
**Created:** [August 2, 2007, 10:10am UTC](https://forum.kirupa.com/t/duplicating-comboxes/234453 "2007-08-02T10:10:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rororo](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@rororo](https://forum.kirupa.com/u/rororo)\
**Post date:** [August 2, 2007, 10:10am UTC](https://forum.kirupa.com/t/duplicating-comboxes/234453/1 "2007-08-02T10:10:06Z")

</div>

Hi everyone,

i’m trying to duplicate comboboxes in a for loop. the comboboxes are populated with data using the additem function from an array of information.

the first combobox is in place at runtime and populated with the data and then, after a user selects how many comboxes he wants, i run a function to duplicate it. this is the easy part…  
everything is duplicated as expected, but as for the data in the duplicated comboboxes, there is no data inside of them!  
i’ve tried everything and i’ve done this so many times before!

here is part of the code:

```auto

var carFieldsArray:Array = new Array (allCars.carMC);
for (var q=0; q<_root.howManyCars;q++) {
     if (q>0) {
         temp = carFieldsArray[q-1].duplicateMovieClip("carMC"+q, allCars.getNextHighestDepth());
                temp._y += 55;                
                carFieldsArray.push (temp);
                carFieldsArray[q].cNum.text = (q+1) + " car";                
            }
            for (i=0;i<_parent.mainXML.childNodes.length;i++) {    
                carFieldsArray[q].carMan.addItem(_parent.carArray*[0][0][0]);
            }

```

the carArray is the array with the data  
the carfields array is an array that i created for easy access to the comboboxes  
carMan is the combobox.

thanks!
