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

  1. on mouseDown
  2.   global ans3, true_answer, Rand_Quest, guess, counter, checkcounter, n, level, m, scored, Rand_Sound, oldlevel, leveldiff, vert
  3.   set checkcounter to 1
  4.   set the visible of sprite 20 to 0
  5.   puppetSound("click")
  6.   set the blend of sprite 5 to 100
  7.   updateStage()
  8.   startTimer()
  9.   repeat while the timer < 15
  10.   end repeat
  11.   set the blend of sprite 5 to 65
  12.   updateStage()
  13.   set the blend of sprite 46 to 60
  14.   set the blend of sprite 38 to 45
  15.   set the blend of sprite 39 to 45
  16.   set the visible of sprite 12 to 0
  17.   set the soundEnabled to 1
  18.   puppetSound(0)
  19.   updateStage()
  20.   set the visible of sprite 8 to 1
  21.   set the locV of sprite 8 to 250
  22.   repeat with n = 1 to 100
  23.     set the locH of sprite 8 to n
  24.     updateStage()
  25.   end repeat
  26.   set Rand_Sound to random(5)
  27.   if true_answer = "3" then
  28.     if Rand_Sound = 1 then
  29.       puppetSound("jazzbit2")
  30.     end if
  31.     if Rand_Sound = 2 then
  32.       puppetSound("rockbit2")
  33.     end if
  34.     if Rand_Sound = 3 then
  35.       puppetSound("funkbit4")
  36.     end if
  37.     if Rand_Sound = 4 then
  38.       puppetSound("funkbit3")
  39.     end if
  40.     if Rand_Sound = 5 then
  41.       puppetSound("funkbit2")
  42.     end if
  43.     set the castNum of sprite 8 to 173
  44.     updateStage()
  45.     repeat with n = 1 to 50
  46.       set vert to the locV of sprite 8
  47.       set the locV of sprite 8 to vert - n
  48.       startTimer()
  49.       repeat while the timer < 2
  50.         nothing()
  51.       end repeat
  52.       updateStage()
  53.     end repeat
  54.     set the visible of sprite 8 to 0
  55.     set oldlevel to level
  56.     set level to level + 1
  57.     set leveldiff to oldlevel - level
  58.     set the soundEnabled to 1
  59.     set scored to scored + 1
  60.     set the visible of sprite 20 to 1
  61.   end if
  62.   if true_answer <> "3" then
  63.     if Rand_Sound = 1 then
  64.       puppetSound("rockbit3")
  65.     end if
  66.     if Rand_Sound = 2 then
  67.       puppetSound("bluebit9.wav")
  68.     end if
  69.     if Rand_Sound = 3 then
  70.       puppetSound("bluebit7.wav")
  71.     end if
  72.     if Rand_Sound = 4 then
  73.       puppetSound("bluebit6.wav")
  74.     end if
  75.     if Rand_Sound = 5 then
  76.       puppetSound("bluebit3.wav")
  77.     end if
  78.     set the castNum of sprite 8 to 174
  79.     updateStage()
  80.     repeat with n = 1 to 50
  81.       set vert to the locV of sprite 8
  82.       set the locV of sprite 8 to vert + n
  83.       startTimer()
  84.       repeat while the timer < 2
  85.         nothing()
  86.       end repeat
  87.       updateStage()
  88.     end repeat
  89.     set oldlevel to level
  90.     set level to level - random(level - 1)
  91.     set leveldiff to oldlevel - level
  92.     set the soundEnabled to 1
  93.     set the visible of sprite 21 to 1
  94.   end if
  95.   set the visible of sprite 4 to 0
  96.   set the visible of sprite 5 to 0
  97.   updateStage()
  98.   startTimer()
  99.   set true_answer to 0
  100.   set the visible of sprite 4 to 1
  101.   set the visible of sprite 5 to 1
  102.   set the visible of sprite 21 to 0
  103.   set the visible of sprite 20 to 0
  104.   set the visible of sprite 6 to 1
  105.   set the visible of sprite 32 to 0
  106.   set the blend of sprite 15 to 0
  107.   set checkcounter to 1
  108.   set counter to counter + 1
  109.   updateStage()
  110.   puppetSound(0)
  111.   set the blend of sprite 38 to 0
  112.   set the blend of sprite 39 to 0
  113.   set the blend of sprite 46 to 0
  114.   if level < 0 then
  115.     set level to 0
  116.   end if
  117.   if level = 0 then
  118.     go("lose")
  119.   end if
  120.   if level = 3 then
  121.     go("win")
  122.   end if
  123.   if level = 0 then
  124.     set the locV of sprite 14 to 300
  125.   else
  126.     set vert to the locV of sprite 14
  127.     repeat with n = 1 to 15
  128.       set the locV of sprite 14 to vert - n
  129.       startTimer()
  130.       repeat while the timer < 3
  131.       end repeat
  132.       updateStage()
  133.     end repeat
  134.   end if
  135.   updateStage()
  136.   go("s")
  137.   set soundEnabled to 0
  138.   set Rand_Sound to 10
  139. end
  140.