PDA

View Full Version : getting values


leandrosalem
09-25-2002, 05:09 AM
I'm using a variable called "return" to show the value clicked on the ComboBox.
The script is the following:
onClipEvent (enterFrame) {
_root.return.getSelectedItem();
}
But it don't work. How can i show the value of the clicked item in a text variable?

tg
09-25-2002, 03:24 PM
first, don't name anything return in as, return is a keyword.
second use change handlers to find out what is selected.

// combobox named pick_cb
pick_cb.setChangeHandler=function("getPick");

function getPick(pick_cb){
//to show the label:
trace(pick_cb.getSelectedItem().label;
//to show the data:
trace(pick_cb.getSelectedItem().data;
}


this is all on the fly here, so i may have mangled parts of this.