PDA

View Full Version : issue with ListenerObject.change


Sir_Scrunchalot
04-23-2008, 03:24 AM
i have been having an issue creating a listener object and having it activate a function when the combo box YearCB's focus changes from user interaction.

the code i have that i have been using in order to test out the change event is:

var lo = new Object();
lo.change = function(evt){
Output.text = "Hello";
};
YearCB.addEventListener("change", lo);

this is copied almost verbatium from multiple web sites and for some reason, it doesn't work. no matter what i do with the combobox, the Output just stays blank. Output is a label. YearCB is a combobox and lo is what i'm using for the listener event. any suggestions would be very appreciated.

Bowie
04-23-2008, 03:34 AM
Are you compiling to as2 or as3?

Sir_Scrunchalot
04-23-2008, 04:20 AM
didn't realize it but i'm using actionscript 2.