home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / makers / power / globe.dir / 00013.ls < prev    next >
Encoding:
Text File  |  1996-06-12  |  4.5 KB  |  181 lines

  1. on startMovie
  2.   global LandSighn, ToGo, StartCast, LoopQt, fixpal, CurrRoll, prevMovie
  3.   set prevMovie to "power"
  4.   set CurrRoll to 0
  5.   if the machineType <> 256 then
  6.     openXLib("FIXPAL.OBJ")
  7.     set fixpal to FixPalette(mnew, the stageLeft, the stageTop, the stageRight, the stageTop)
  8.     patchpal()
  9.   end if
  10.   sound stop 1
  11.   sound stop 2
  12.   repeat with i = 4 to 14
  13.     puppetSprite(i, 1)
  14.   end repeat
  15.   set StartCast to the number of cast "rolette0"
  16.   set the itemDelimiter to ","
  17.   set LoopQt to 1
  18. end
  19.  
  20. on patchpal
  21.   global fixpal
  22.   fixpal(mPatchIt)
  23. end
  24.  
  25. on stopMovie
  26.   global fixpal
  27.   if the machineType <> 256 then
  28.     fixpal(mdispose)
  29.     closeXLib("FIXPAL.OBJ")
  30.   end if
  31. end
  32.  
  33. on rollOvers
  34.   global CurrRoll
  35.   set CurrRoll to 1
  36.   if rollOver(6) then
  37.     hilite(6)
  38.   else
  39.     if rollOver(9) then
  40.       check10()
  41.     else
  42.       if the mouseCast = 28 then
  43.         changeCast(28, 11)
  44.       else
  45.         if the mouseCast = 30 then
  46.           changeCast(30, 13)
  47.         else
  48.           if rollOver(14) then
  49.             roll(14)
  50.           end if
  51.         end if
  52.       end if
  53.     end if
  54.   end if
  55.   updateStage()
  56. end
  57.  
  58. on changeCast theRoll, theSprite
  59.   if not (the name of cast the castNum of sprite theSprite contains "down") then
  60.     set the castNum of sprite theSprite to the castNum of sprite theSprite + 1
  61.     updateStage()
  62.     repeat while (the mouseCast = (theRoll + 1)) and not (the mouseDown)
  63.       CheckQT()
  64.       updateStage()
  65.     end repeat
  66.     set the castNum of sprite theSprite to the castNum of sprite theSprite - 1
  67.   end if
  68. end
  69.  
  70. on roll theRoll
  71.   if not (the name of cast the castNum of sprite theRoll contains "down") then
  72.     set the castNum of sprite theRoll to the castNum of sprite theRoll + 1
  73.     updateStage()
  74.     repeat while rollOver(theRoll) and not (the mouseDown)
  75.       CheckQT()
  76.       updateStage()
  77.     end repeat
  78.     set the castNum of sprite theRoll to the castNum of sprite theRoll - 1
  79.   end if
  80. end
  81.  
  82. on unRoll theRoll
  83.   if the name of cast the castNum of sprite theRoll contains "down" then
  84.     set the castNum of sprite theRoll to the castNum of sprite theRoll - 1
  85.     updateStage()
  86.   end if
  87. end
  88.  
  89. on hilite theRoll
  90.   global LoopQt
  91.   if LoopQt then
  92.     if not (the name of cast the castNum of sprite theRoll contains "down") then
  93.       set the castNum of sprite theRoll to the castNum of sprite theRoll + 1
  94.       updateStage()
  95.       repeat while rollOver(theRoll) and not (the mouseDown)
  96.         CheckQT()
  97.         updateStage()
  98.         go(the frame)
  99.       end repeat
  100.       set the castNum of sprite theRoll to the castNum of sprite theRoll - 1
  101.       updateStage()
  102.     end if
  103.   end if
  104. end
  105.  
  106. on check10
  107.   global StartCast
  108.   set the locH of sprite 19 to -210
  109.   updateStage()
  110.   set the castNum of sprite 9 to the castNum of sprite 9 + 1
  111.   set endcast to StartCast + 30
  112.   set Stime to the ticks
  113.   repeat while rollOver(9) and not (the mouseDown)
  114.     if (the ticks - Stime) > 2 then
  115.       if the castNum of sprite 10 < endcast then
  116.         set the castNum of sprite 10 to the castNum of sprite 10 + 1
  117.       else
  118.         set the castNum of sprite 10 to StartCast + 1
  119.       end if
  120.       CheckQT()
  121.       updateStage()
  122.       set Stime to the ticks
  123.     end if
  124.   end repeat
  125.   set the castNum of sprite 9 to the castNum of sprite 9 - 1
  126.   set the castNum of sprite 10 to StartCast
  127. end
  128.  
  129. on CheckQT
  130.   global LoopQt
  131.   if LoopQt then
  132.     if the movieTime of sprite 2 > 1200 then
  133.       set the movieTime of sprite 2 to 0
  134.       updateStage()
  135.     end if
  136.   end if
  137. end
  138.  
  139. on rollQt toFRame
  140.   global LoopQt, ToGo
  141.   set LoopQt to 0
  142.   set ToFile to the name of cast the castNum of sprite the clickOn
  143.   if (toFRame = 110) and (the clickOn <> 7) then
  144.     set the movieTime of sprite 2 to 1450
  145.     set the movieRate of sprite 2 to 1
  146.     moveToFrame(1560)
  147.   else
  148.     if toFRame = 110 then
  149.       set the movieTime of sprite 2 to 1335
  150.       set the movieRate of sprite 2 to 1
  151.       moveToFrame(1440)
  152.     else
  153.       if toFRame = 230 then
  154.         set the movieTime of sprite 2 to 1575
  155.         set the movieRate of sprite 2 to 1
  156.         moveToFrame(1680)
  157.       else
  158.         if toFRame = 380 then
  159.           set the movieTime of sprite 2 to 1210
  160.           set the movieRate of sprite 2 to 1
  161.           moveToFrame(1320)
  162.         else
  163.           if toFRame = 925 then
  164.             set the movieTime of sprite 2 to 1690
  165.             set the movieRate of sprite 2 to 1
  166.             moveToFrame(1805)
  167.           end if
  168.         end if
  169.       end if
  170.     end if
  171.   end if
  172.   set ToGo to "open"
  173.   go("fade", string(ToFile & "E.dir"))
  174. end
  175.  
  176. on moveToFrame toFRame
  177.   repeat while the movieTime of sprite 2 < toFRame
  178.     updateStage()
  179.   end repeat
  180. end
  181.