# Dependent Combo Box Woes

**URL:** <https://forum.kirupa.com/t/dependent-combo-box-woes/291600>\
**Category:** flash\
**Created:** [July 2, 2009, 2:34am UTC](https://forum.kirupa.com/t/dependent-combo-box-woes/291600 "2009-07-02T02:34:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joehann](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@joehann](https://forum.kirupa.com/u/joehann)\
**Post date:** [July 2, 2009, 2:34am UTC](https://forum.kirupa.com/t/dependent-combo-box-woes/291600/1 "2009-07-02T02:34:23Z")

</div>

Hello Fello AS Gurus,  
I encounter this problem on using a dependable combo box component within flash cs3. Below is a sample file that I got from the internet, its using flash mx and publish as flash player 6. Somehow this works when publish with FlashPlayer 6 but not when its any version higher.  
Pls assess the AS below:

// Combobox 1 is named main\_cb  
// Combobox 2 is named sub\_cb

carArray = new Array(“Chrysler”,“Porche”,“Mazda”,“Toyota”);  
foodArray = new Array(“Hamburger”,“Hotdog”,“Pizza”);  
drinkArray = new Array(“Water”,“Beer”,“Wine”,“Martini”);

function setSubCombo() {  
sub\_cb.removeAll();  
var subArray = eval(main\_cb.getSelectedItem().data);  
for(var i=0; i\<subArray.length; i++) {  
sub\_cb.addItem(subArray\*,subArray\*);   
}  
}

Along with the above AS, I’ve also attached the .fla file for your troubleshooting _Hope this helps further_

Pls help!!!  
Appreciate it!

- Joe Gui  
[www.greenimagination.com](http://www.greenimagination.com)
