Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Answer1(rndm:int):void
- {
- if(rndm == 1)
- {
- answer1_txt.text = String(addition.GetTotal());
- answer1_txt.addEventListener(MouseEvent.CLICK, correctQuestion);
- answer2_txt.text = String(addition.GetRandomNumber2());
- answer2_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
- answer3_txt.text = String(addition.GetRandomNumber3());
- answer3_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
- }
- else if (rndm == 2)
- {
- answer1_txt.text = String(addition.GetRandomNumber1());
- answer1_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
- answer2_txt.text = String(addition.GetTotal());
- answer2_txt.addEventListener(MouseEvent.CLICK, correctQuestion);
- answer3_txt.text = String(addition.GetRandomNumber3());
- answer3_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
- }
- else
- {
- answer1_txt.text = String(addition.GetRandomNumber1());
- answer1_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
- answer2_txt.text = String(addition.GetRandomNumber2());
- answer2_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
- answer3_txt.text = String(addition.GetTotal());
- answer3_txt.addEventListener(MouseEvent.CLICK, correctQuestion);
- }
- next_btn.addEventListener(MouseEvent.CLICK, nextQuestion);
- }
Add Comment
Please, Sign In to add comment