ComboBox and event handlers
I think my question is two-fold:
How do I capture and/or refer to the current state of a ComboBox? or it's changed state?
Here is a slice of my code:
typefaceNamesCombo.dataProvider = fontMenuFiller_global;
typefaceNamesCombo.addEventListener("change",trace ('eventListner encountered'));
{
var index= typefaceNamesCombo.selectedIndex;
trace('change handler entered; index= ' + index);
myText.text=('Typographer: '+maker_global[index] + '\r'+bio_global[index]);
}
I want to have users choose an item from the drop down list and use that information to display items in another (dynamic) text box.
Using the code above, I get 'undefined' as the value of index. (I want to use that index to reference array's I have created from an XML file.)
|