home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 June / Personal_Computer_World_Jun_97.iso / dxrs / mgipcw06.dxr / 00021_MGIButtonRoll.ls < prev    next >
Encoding:
Text File  |  1997-03-25  |  5.3 KB  |  149 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 s
  6.     end if
  7.   end repeat
  8.   if rollOver(9) then
  9.     set MGIstarRoll to 6
  10.   end if
  11.   if rollOver(12) then
  12.     set MGIstarRoll to 12
  13.   end if
  14.   repeat with t = 4 to 6
  15.     if (the mouseCast = the castNum of sprite t) or (MGIstarRoll <> 0) then
  16.       if MGIstarRoll <> 0 then
  17.         set t to MGIstarRoll
  18.       end if
  19.       set the castNum of sprite t to the castNum of sprite t + 1
  20.       updateStage()
  21.       repeat while (the castNum of sprite 7 <> the number of member "endStar") and (the castNum of sprite 8 <> the number of member "endStar")
  22.         if the castNum of sprite 7 <> the number of member "endStar" then
  23.           set the castNum of sprite 7 to the castNum of sprite 7 + 1
  24.           updateStage()
  25.         end if
  26.         if the castNum of sprite 8 <> the number of member "StartStar" then
  27.           set the castNum of sprite 8 to the castNum of sprite 8 - 1
  28.           updateStage()
  29.         else
  30.           set the castNum of sprite 8 to the number of member "endStar"
  31.           updateStage()
  32.         end if
  33.         if the castNum of sprite 9 <> the number of member "EndR" then
  34.           set the castNum of sprite 9 to the castNum of sprite 9 + 1
  35.           updateStage()
  36.         else
  37.           set the castNum of sprite 9 to the number of member "StartR"
  38.           updateStage()
  39.         end if
  40.         if MGISTONEON = 1 then
  41.           if the locH of sprite 12 < 870 then
  42.             set the locH of sprite 12 to the locH of sprite 12 + 2
  43.             updateStage()
  44.             next repeat
  45.           end if
  46.           set the locH of sprite 12 to -292
  47.           updateStage()
  48.         end if
  49.       end repeat
  50.       case t of
  51.         4:
  52.           set the castNum of sprite 7 to the number of member "pinkStar"
  53.         5:
  54.           set the castNum of sprite 8 to the number of member "pinkStar"
  55.       end case
  56.       repeat while (the mouseCast = the castNum of sprite t) or ((rollOver(9) or rollOver(4) or rollOver(5) or rollOver(6)) and (MGILaunch <> 2))
  57.         if (rollOver(4) or rollOver(7)) and the mouseDown then
  58.           set the ink of sprite 10 to 0
  59.           set the castNum of sprite 10 to the number of member "ExplainRoom"
  60.           set the loc of sprite 10 to point(336, 408)
  61.           updateStage()
  62.           repeat while the mouseDown
  63.           end repeat
  64.         end if
  65.         if (rollOver(5) or rollOver(8)) and the mouseDown then
  66.           set the ink of sprite 10 to 0
  67.           set the castNum of sprite 10 to the number of member "ExplainBrowser"
  68.           set the loc of sprite 10 to point(336, 408)
  69.           updateStage()
  70.           repeat while the mouseDown
  71.           end repeat
  72.         end if
  73.         if (MGISTONEON <> 3) and (MGIRadioON <> 3) then
  74.           if rollOver(6) and the mouseDown then
  75.             set the castNum of sprite 6 to the number of member "MGIChooseLaunch"
  76.             set the castNum of sprite 11 to the number of member "NetYesNoOne"
  77.             set the loc of sprite 11 to point(481, 241)
  78.             set the locH of sprite 9 to 376
  79.             set MGILaunch to 1
  80.             updateStage()
  81.             repeat while the mouseDown
  82.             end repeat
  83.           end if
  84.           if MGILaunch = 1 then
  85.             MGILaunchWWW()
  86.           end if
  87.         else
  88.           if rollOver(6) then
  89.             exit repeat
  90.           end if
  91.         end if
  92.         if MGILaunch = 3 then
  93.           exit repeat
  94.         end if
  95.         case MGIRotateRCounter of
  96.           30:
  97.             if the castNum of sprite 9 <> the number of member "EndR" then
  98.               set the castNum of sprite 9 to the castNum of sprite 9 + 1
  99.               updateStage()
  100.             else
  101.               set the castNum of sprite 9 to the number of member "StartR"
  102.               updateStage()
  103.             end if
  104.             set MGIRotateRCounter to 0
  105.         end case
  106.         set MGIRotateRCounter to 1 + MGIRotateRCounter
  107.         if MGISTONEON = 1 then
  108.           case MGIStoneyCounter of
  109.             5:
  110.               set MGIStoneyCounter to 0
  111.               if the locH of sprite 12 < 870 then
  112.                 set the locH of sprite 12 to the locH of sprite 12 + 2
  113.                 updateStage()
  114.               else
  115.                 set the locH of sprite 12 to -300
  116.                 updateStage()
  117.               end if
  118.           end case
  119.         end if
  120.         set MGIStoneyCounter to 1 + MGIStoneyCounter
  121.         if rollOver(12) and the mouseDown then
  122.           set the locH of sprite 12 to 2000
  123.           set MGISTONEON to 0
  124.           updateStage()
  125.         end if
  126.       end repeat
  127.       set MGIStoneyCounter to 0
  128.       set MGIRotateRCounter to 0
  129.       set MGIstarRoll to 0
  130.       if MGILaunch <> 3 then
  131.         set the castNum of sprite t to the castNum of sprite t - 1
  132.         set the castNum of sprite 6 to the number of member "MGIEnterroomOne"
  133.         set the locH of sprite 9 to 435
  134.         set the locH of sprite 10 to 2000
  135.         set the locH of sprite 11 to 2000
  136.         set MGILaunch to 0
  137.       end if
  138.       case t of
  139.         4:
  140.           set the castNum of sprite 7 to the number of member "endStar"
  141.         5:
  142.           set the castNum of sprite 8 to the number of member "endStar"
  143.       end case
  144.       updateStage()
  145.       updateStage()
  146.     end if
  147.   end repeat
  148. end
  149.