Hey Kirupa people :pleased:
I’ve been messing around with the comboBox component, trying to found a solution to my problem.
(simple setup)
//combo setup
var total:Number = 10;
combo.addItem({data:0, label:"Select"});
for (var l:Number = 0; l<total; l++) {
combo.addItem({data:(l+1), label:"page"+(l+1)});
};
// Create Listener Object.
var cbListener:Object = new Object();
// Assign function to Listener Object.
cbListener.change = function(event_obj:Object) {
info_txt.text = "Value changed to: "+event_obj.target.selectedItem.label;
};
// Add Listener.
combo.addEventListener("change", cbListener);
test1_btn.onRelease = function() {
combo.target.selectedItem.label = "page3"; // not working!!
};
As you can see, I’m trying to ‘access’ the combo from outside - does anyone know if this is possible? (I’m trying to make a back- and forward button)