Hello out there. Like the title says I can’t seem to get my combobox to allow the first item to be selected after loading.
If I select any other item in the list it works fine and I can immediately come back and select the first.
Seems like strange behavior but as this is my first project using the combobox I’m hoping it’s something I’ve overlooked or just didn’t realize I needed.
Here is the code I’m using
comboBox.getFocus();
// Create Listener Object.
var cbListener:Object = new Object();
// Assign function to Listener Object.
cbListener.change = function(evt_obj:Object) {
trace("Value changed to: "+event_obj.target.selectedItem.label);
};
// Add Listener Event.
var cbList = new Object();
cbList.change = function(eventObj) {
myVariable = (eventObj.target.value);
myFunction();
};
comboBox.addEventListener("change",cbList);
I’m basically just storing the value of the item and using it in a function.
If anyone can throw me a bone or a point in the right direction it’d be seriously appreciated.
Cheers