I got the True False on the first question to work then after that I couldn't get it to work. Here's the code that I currently have. I'm getting an error that I'm using a duplicate function definition. I assume this is because I've used the code in the previous frame. I'm just not sure how to make this modular so I can use it on all of my questions. Any help is appreciated!
true_btn.addEventListener(MouseEvent.CLICK, trueAns);
function trueAns(event:MouseEvent)
{
feedback.text = "Correct answer!";
event.target.alpha = 1;
}
false_btn.addEventListener(MouseEvent.CLICK, falseAns);
function falseAns(event:MouseEvent)
{
feedback.text = "Sorry, that's wrong.";
event.target.alpha = .5;
}

New Topic/Question
Reply



MultiQuote



|