PDA

View Full Version : Data from Combobox


kenkim
10-12-2005, 12:21 PM
COMOBOX PROBLEM:
Basically, my intention is that when user chooses an option labelled "exit" (which i attached value of 6 in the corresponding data),
the application shuts down via ssScore.App.quit().
However, whatever user chooses, it shuts down. I figured it ignored the IF condition.

var listenerObject:Object = new Object();
listenerObject.change = function(eventObject:Object) {
if (_level0.straight._selected=6){
trace (straight.value);
ssCore.App.quit();
}
gotoAndStop(straight.value);
};
straight.addEventListener("change", listenerObject)

I think my problem is I can't reference to the data of the combobox.
HELP PLEASE...... :(

Sunny13
10-12-2005, 12:46 PM
first of all use == instead of = in "if"