matt_sh
10-12-2009, 09:45 AM
Hi,
I've got a two ComboBoxes set up and when a user clicks the first one it populates the second one and then after a user selects an item from the second one it add a MovieClip to the stage.
The problem I have is that when a user clicks itemA nothing happens. The only way to get itemA to load the MC to the stage is to click another item and then go back and click itemA.
Any idea how to get around this?
Thanks
cb1.addItem({label:"Item1"});
cb1.addItem({label:"Item2"});
cb1.addItem({label:"Item3"});
cb1.addEventListener(Event.CHANGE, cb1Handler);
function cb1Handler(event:Event):void {
if (cb1.selectedItem.label == "Item1"){
cb2.addItem({label:"ItemA"});
cb2.addItem({label:"ItemB"});
cb2.addItem({label:"ItemC"});
}
I've got a two ComboBoxes set up and when a user clicks the first one it populates the second one and then after a user selects an item from the second one it add a MovieClip to the stage.
The problem I have is that when a user clicks itemA nothing happens. The only way to get itemA to load the MC to the stage is to click another item and then go back and click itemA.
Any idea how to get around this?
Thanks
cb1.addItem({label:"Item1"});
cb1.addItem({label:"Item2"});
cb1.addItem({label:"Item3"});
cb1.addEventListener(Event.CHANGE, cb1Handler);
function cb1Handler(event:Event):void {
if (cb1.selectedItem.label == "Item1"){
cb2.addItem({label:"ItemA"});
cb2.addItem({label:"ItemB"});
cb2.addItem({label:"ItemC"});
}