home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / Democd3 / oasquiz.dxr / 00106.ls < prev    next >
Encoding:
Text File  |  1997-06-04  |  1.9 KB  |  75 lines

  1. on mouseDown
  2.   global ans2, true_answer, Rand_Quest, guess, counter, n, scored, Rand_Sound
  3.   set the visible of sprite 12 to 0
  4.   set the blend of sprite 16 to 50
  5.   set the blend of sprite 37 to 45
  6.   set the blend of sprite 39 to 45
  7.   set the soundEnabled to 1
  8.   set Rand_Sound to random(5)
  9.   if true_answer = "2" then
  10.     set the soundEnabled to 1
  11.     if Rand_Sound = 1 then
  12.       puppetSound("yesm")
  13.     end if
  14.     if Rand_Sound = 2 then
  15.       puppetSound("vfexllnt.wav")
  16.     end if
  17.     if Rand_Sound = 3 then
  18.       puppetSound("vfyes.wav")
  19.     end if
  20.     if Rand_Sound = 4 then
  21.       puppetSound("vmcorrct.wav")
  22.     end if
  23.     if Rand_Sound = 5 then
  24.       puppetSound("clapwoop.wav")
  25.     end if
  26.     set scored to scored + 1
  27.     set the visible of sprite 20 to 1
  28.   end if
  29.   if true_answer <> "2" then
  30.     set the soundEnabled to 1
  31.     if Rand_Sound = 1 then
  32.       puppetSound("hateitm")
  33.     end if
  34.     if Rand_Sound = 2 then
  35.       puppetSound("shutup.wav")
  36.     end if
  37.     if Rand_Sound = 3 then
  38.       puppetSound("uhoh2.wav")
  39.     end if
  40.     if Rand_Sound = 4 then
  41.       puppetSound("vfdsilly.wav")
  42.     end if
  43.     if Rand_Sound = 5 then
  44.       puppetSound("laughm04.wav")
  45.     end if
  46.     set the visible of sprite 21 to 1
  47.   end if
  48.   set the visible of sprite 4 to 0
  49.   set the visible of sprite 6 to 0
  50.   updateStage()
  51.   startTimer()
  52.   repeat with n = 1 to 5
  53.     startTimer()
  54.     set the visible of sprite 5 to 1
  55.     updateStage()
  56.     repeat while the timer < 20
  57.     end repeat
  58.     startTimer()
  59.     set the visible of sprite 5 to 0
  60.     updateStage()
  61.     repeat while the timer < 20
  62.     end repeat
  63.   end repeat
  64.   set the blend of sprite 16 to 0
  65.   set the visible of sprite 20 to 0
  66.   set the visible of sprite 21 to 0
  67.   set the visible of sprite 5 to 0
  68.   updateStage()
  69.   set counter to counter + 1
  70.   puppetSound(0)
  71.   set the blend of sprite 37 to 0
  72.   set the blend of sprite 39 to 0
  73.   go("start")
  74. end
  75.