Need help with changing text with combobox state change
- by Mirage
I have one text box and one combobox.
I want it such that when someone changes the combobox value, the text should change in the text field.
priceText is the name of text box
My code is below; it's not working:
var comboFar:ComboBox = new ComboBox();
addChild(comboFar);
var items2:Array = [
{label:"Arizona", data:"87.97"},
{label:"Colorado", data:"91.97"},
];
comboFar.dataProvider = new DataProvider(items2);
comboFar.addEventListener("change",testFar());
function testFar(event):void {
priceText.text =event_obj.target.selectedItem.data;
}