Guest User

Untitled

a guest
Aug 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Answer1(rndm:int):void
  2. {
  3.     if(rndm == 1)
  4.     {
  5.         answer1_txt.text = String(addition.GetTotal());
  6.         answer1_txt.addEventListener(MouseEvent.CLICK, correctQuestion);
  7.        
  8.         answer2_txt.text = String(addition.GetRandomNumber2());
  9.         answer2_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
  10.        
  11.         answer3_txt.text = String(addition.GetRandomNumber3());
  12.         answer3_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
  13.     }
  14.     else if (rndm == 2)
  15.     {
  16.         answer1_txt.text = String(addition.GetRandomNumber1());
  17.         answer1_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
  18.        
  19.         answer2_txt.text = String(addition.GetTotal());
  20.         answer2_txt.addEventListener(MouseEvent.CLICK, correctQuestion);
  21.        
  22.         answer3_txt.text = String(addition.GetRandomNumber3());
  23.         answer3_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
  24.     }
  25.     else
  26.     {
  27.         answer1_txt.text = String(addition.GetRandomNumber1());
  28.         answer1_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
  29.        
  30.         answer2_txt.text = String(addition.GetRandomNumber2());
  31.         answer2_txt.addEventListener(MouseEvent.CLICK, nextQuestion);
  32.        
  33.         answer3_txt.text = String(addition.GetTotal());
  34.         answer3_txt.addEventListener(MouseEvent.CLICK, correctQuestion);
  35.     }
  36.     next_btn.addEventListener(MouseEvent.CLICK, nextQuestion);
  37. }
Add Comment
Please, Sign In to add comment