home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 December / WPCDEC97.ISO / DXRS / MGIWDEC.DXR / 00021_MGIButtonRoll.ls < prev    next >
Encoding:
Text File  |  1997-10-13  |  4.7 KB  |  132 lines

  1. on MGIButtonRoll
  2.   global MGIRotateRCounter, MGIstarRoll, MGILaunch, MGIRadioON, MGIStoneyCounter, MGISTONEON
  3.   repeat with s = 4 to 5
  4.     if rollOver(s) then
  5.       set MGIstarRoll to 4
  6.     end if
  7.   end repeat
  8.   if rollOver(12) then
  9.     set MGIstarRoll to 12
  10.   end if
  11.   repeat with t = 4 to 6
  12.     if (the mouseCast = the castNum of sprite t) or (MGIstarRoll <> 0) then
  13.       if MGIstarRoll <> 0 then
  14.         set t to MGIstarRoll
  15.       end if
  16.       set the castNum of sprite t to the castNum of sprite t + 1
  17.       updateStage()
  18.       repeat while (the castNum of sprite 7 <> the number of member "endStar") and (the castNum of sprite 8 <> the number of member "endStar")
  19.         if the castNum of sprite 7 <> the number of member "endStar" then
  20.           set the castNum of sprite 7 to the castNum of sprite 7 + 1
  21.           updateStage()
  22.         end if
  23.         if the castNum of sprite 8 <> the number of member "StartStar" then
  24.           set the castNum of sprite 8 to the castNum of sprite 8 - 1
  25.           updateStage()
  26.         else
  27.           set the castNum of sprite 8 to the number of member "endStar"
  28.           updateStage()
  29.         end if
  30.         if the castNum of sprite 9 <> the number of member "EndR" then
  31.           set the castNum of sprite 9 to the castNum of sprite 9 + 1
  32.           updateStage()
  33.         else
  34.           set the castNum of sprite 9 to the number of member "StartR"
  35.           updateStage()
  36.         end if
  37.         if MGISTONEON = 1 then
  38.           if the locH of sprite 12 < 870 then
  39.             set the locH of sprite 12 to the locH of sprite 12 + 2
  40.             updateStage()
  41.             next repeat
  42.           end if
  43.           set the locH of sprite 12 to -292
  44.           updateStage()
  45.         end if
  46.       end repeat
  47.       case t of
  48.         4:
  49.           set the castNum of sprite 7 to the number of member "pinkStar"
  50.         5:
  51.           set the castNum of sprite 8 to the number of member "pinkStar"
  52.       end case
  53.       repeat while (the mouseCast = the castNum of sprite t) or ((rollOver(9) or rollOver(4) or rollOver(5) or rollOver(6)) and (MGILaunch <> 2))
  54.         if (rollOver(4) or rollOver(7)) and the mouseDown then
  55.           set the ink of sprite 10 to 0
  56.           set the castNum of sprite 10 to the number of member "ExplainRoom"
  57.           set the loc of sprite 10 to point(336, 408)
  58.           updateStage()
  59.           repeat while the mouseDown
  60.           end repeat
  61.         end if
  62.         if (rollOver(5) or rollOver(8)) and the mouseDown then
  63.           set the ink of sprite 10 to 0
  64.           set the castNum of sprite 10 to the number of member "ExplainBrowser"
  65.           set the loc of sprite 10 to point(336, 408)
  66.           updateStage()
  67.           repeat while the mouseDown
  68.           end repeat
  69.         end if
  70.         if (MGISTONEON <> 3) and (MGIRadioON <> 3) then
  71.           if rollOver(6) then
  72.             exit repeat
  73.           end if
  74.         end if
  75.         if MGILaunch = 3 then
  76.           exit repeat
  77.         end if
  78.         case MGIRotateRCounter of
  79.           30:
  80.             if the castNum of sprite 9 <> the number of member "EndR" then
  81.               set the castNum of sprite 9 to the castNum of sprite 9 + 1
  82.               updateStage()
  83.             else
  84.               set the castNum of sprite 9 to the number of member "StartR"
  85.               updateStage()
  86.             end if
  87.             set MGIRotateRCounter to 0
  88.         end case
  89.         set MGIRotateRCounter to 1 + MGIRotateRCounter
  90.         if MGISTONEON = 1 then
  91.           case MGIStoneyCounter of
  92.             5:
  93.               set MGIStoneyCounter to 0
  94.               if the locH of sprite 12 < 870 then
  95.                 set the locH of sprite 12 to the locH of sprite 12 + 2
  96.                 updateStage()
  97.               else
  98.                 set the locH of sprite 12 to -300
  99.                 updateStage()
  100.               end if
  101.           end case
  102.         end if
  103.         set MGIStoneyCounter to 1 + MGIStoneyCounter
  104.         if rollOver(12) and the mouseDown then
  105.           set the locH of sprite 12 to 2000
  106.           set MGISTONEON to 0
  107.           updateStage()
  108.         end if
  109.       end repeat
  110.       set MGIStoneyCounter to 0
  111.       set MGIRotateRCounter to 0
  112.       set MGIstarRoll to 0
  113.       if MGILaunch <> 3 then
  114.         set the castNum of sprite t to the castNum of sprite t - 1
  115.         set the castNum of sprite 6 to the number of member "MGIEnterroomOne"
  116.         set the locH of sprite 9 to 435
  117.         set the locH of sprite 10 to 2000
  118.         set the locH of sprite 11 to 2000
  119.         set MGILaunch to 0
  120.       end if
  121.       case t of
  122.         4:
  123.           set the castNum of sprite 7 to the number of member "endStar"
  124.         5:
  125.           set the castNum of sprite 8 to the number of member "endStar"
  126.       end case
  127.       updateStage()
  128.       updateStage()
  129.     end if
  130.   end repeat
  131. end
  132.