home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (BR) Volume 2 #6 / CDRTV2N6.iso / makers / power / globe.dir / 00013_Script_13 < prev    next >
Text File  |  1996-03-11  |  5KB  |  175 lines

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