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

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