hey all,
my code and listenersEvents won’t work on my button but when i put them in the frame they work?? why would this be??
here is my code:
var oListener:Object = new Object();
oListener.click = function(oEvent:Object):Void {
trace(oEvent.target.selectedData);
//q2_answer = oEvent.target.selectedData;
if(oEvent.target.selectedData == "A snail"){
q2_answer = "Q1 is correct"
} else {
q2_answer = "Q1 is incorrect"
}
};
q1.addEventListener("click", oListener);