I’m building a simple matching game (still really early on) and I’m running into an odd situation where I’m making a simple function call and getting not action what-so-ever. Not even an error.
Here’s the function
//correct answer
function correctAnswer(evt:MouseEvent):void {
question++;
trace ("jump to question frame");
trace ("frame # "+((q_rand [question])+10));
//trace ("answers_jump");
//trace (((q_rand [question])+1)*10);
trace ("question # "+question);
//trace (question);
if (question == 10) {
gotoAndStop("score");
}
//answers.gotoAndStop(((q_rand [question])+1)*10);
gotoAndStop((q_rand [question])+10);
trace ("----end-q----");
}
and my listener
correctButton.addEventListener(MouseEvent.MOUSE_UP, correctAnswer);
This same chunk of code works fine in initiating the first question, when not in a function. Any idea why it’s going dull?