home *** CD-ROM | disk | FTP | other *** search
/ Browser - Artopolis 97 / browser.iso / mac / artrope / artrope.dir / 00070_Script_creditsFrame < prev    next >
Text File  |  1997-10-08  |  6KB  |  213 lines

  1. global gIsMac
  2.  
  3. on exitFrame
  4.   if the frontWindow = the stage then
  5.     
  6.     if the mouseV < 0 then 
  7.       installmyMenu
  8.     else
  9.       installMenu 0
  10.     end if
  11.     
  12.     if rollover(3) then 
  13.       startArtropolisCredits
  14.     end if
  15.     
  16.     if rollover(4) then
  17.       startDNACredits
  18.     end if
  19.   end if
  20.   
  21.   go to the frame
  22. end
  23.  
  24. on mouseDown
  25.   puppetSound 3, "buttons.aif"
  26.   puppetSound 2, "solostep.aif"
  27.   deletePrefile 
  28.   cursor 200
  29.   if gIsMac then 
  30.     go to frame "MacEnd"
  31.   else
  32.     go to frame "PCEnd"
  33.   end if    
  34. end
  35.  
  36. on startArtropolisCredits
  37.   blendMe(5, #in)
  38.   puppetSprite 8,0
  39.   puppetsprite 9,0
  40.   set the visible of sprite(8) to true
  41.   set the visible of sprite(9) to true
  42.   set the visible of sprite(10) to false
  43.   set the visible of sprite(11) to false
  44.   if the puppet of sprite 8 = 0 then puppetSprite 8,1
  45.   if the puppet of sprite 9 = 0 then puppetSprite 9,1
  46.   updateStage
  47.   moverAtropolis(3,[8,9]) --artropolis credits
  48.   set the visible of sprite(8) to false
  49.   set the visible of sprite(9) to false
  50.   blendMe(5, #out)
  51.   
  52. end 
  53.  
  54. on startDNACredits
  55.   blendMe(6, #in)
  56.   puppetsprite 10,0
  57.   puppetsprite 11,0
  58.   set the visible of sprite(8) to false
  59.   set the visible of sprite(9) to false
  60.   set the visible of sprite(10) to true
  61.   set the visible of sprite(11) to true
  62.   if the puppet of sprite 10 = 0 then puppetSprite 10,1
  63.   if the puppet of sprite 11 = 0 then puppetSprite 11,1
  64.   updateStage
  65.   moverDNA(4,[10,11]) --dna credits
  66.   set the visible of sprite(10) to false
  67.   set the visible of sprite(11) to false
  68.   blendMe(6,#out)
  69. end
  70.  
  71. --=============================================================
  72. --atropolis credits mover, made two handlers to hard-code it in 
  73. --attempts to make it faster.
  74. ---------------------------------------------------------------
  75. on moverAtropolis xSprite, theWomb  
  76.   --xSprite = either the right quickdraw rect or the left one
  77.   repeat while the mouseV < 237 and the mouseV > 0
  78.     if the mouseH >320 then 
  79.       set the cursor of sprite(xSprite) to [93,94]
  80.       repeat while the mouseH > 320 and the mouseV < 237 and the mouseV > 0
  81.         if the mouseDown then exit
  82.         set speed = integer((the mouseH - 320)/100) 
  83.         repeat with i in theWomb    
  84.           if the mouseDown then exit
  85.           set the locH of sprite(i) to the locH of sprite(i) - speed
  86.           if the locH of sprite(i) <= -4481 then 
  87.             set the locH of sprite(i) to the locH of sprite(i) +(8762) 
  88.           end if  
  89.           if the locH of sprite(i) >= 4381  then 
  90.             set the locH of sprite(i) to the locH of sprite(i)  - 8762
  91.           end if  
  92.         end repeat
  93.         updateStage
  94.       end repeat
  95.     end if
  96.     
  97.     if the mouseH <= 320 then
  98.       set the cursor of sprite(xSprite) to [91,92]
  99.       repeat while the mouseH < 320 and the mouseV < 237 and the mouseV > 0
  100.         if the mouseDown then exit
  101.         set speed = -(integer((320 - the mouseH)/100))
  102.         repeat with i in theWomb
  103.           if the mouseDown then exit
  104.           set the locH of sprite(i) to the locH of sprite(i)  - speed
  105.           if the locH of sprite(i) <= -4481 then 
  106.             set the locH of sprite(i) to the locH of sprite(i) +(8762)
  107.           end if  
  108.           if the locH of sprite(i) >= 4381  then 
  109.             set the locH of sprite(i) to the locH of sprite(i)  -8762
  110.           end if  
  111.         end repeat
  112.         updateStage
  113.       end repeat
  114.     end if 
  115.   end repeat
  116.   set the cursor of sprite(xSprite) = -1
  117. end
  118.  
  119.  
  120.  
  121. --=============================================================
  122. --atropolis credits mover, made two handlers to hard-code it in 
  123. --attempts to make it faster.
  124. ---------------------------------------------------------------
  125. on moverDNA xSprite, theWomb  
  126.   --xSprite = either the right quickdraw rect or the left one
  127.   repeat while the mouseV >255
  128.     if the mouseH > 320 then
  129.       set the cursor of sprite(xSprite) to [93,94]
  130.       repeat while the mouseH > 320 and the mouseV > 255 
  131.         if the mouseDown then exit
  132.         set speed = integer((the mouseH - 320)/100) 
  133.         repeat with i in theWomb  
  134.           if the mouseDown then exit
  135.           set the locH of sprite(i) to the locH of sprite(i) - speed
  136.           if the locH of sprite(i) <= -2758 then 
  137.             set the locH of sprite(i) to the locH of sprite(i) +(5316) 
  138.           end if  
  139.           if the locH of sprite(i) >= 2658  then 
  140.             set the locH of sprite(i) to the locH of sprite(i)  - 5316
  141.           end if  
  142.         end repeat
  143.         updateStage
  144.       end repeat
  145.     end if
  146.     
  147.     if the mouseH <= 320 then
  148.       set the cursor of sprite(xSprite) to [91,92]
  149.       repeat while the mouseH < 320 and the mouseV > 255
  150.         if the mouseDown then exit
  151.         set speed = -(integer((320 - the mouseH)/100))
  152.         repeat with i in theWomb
  153.           if the mouseDown then exit
  154.           set the locH of sprite(i) to the locH of sprite(i)  - speed
  155.           if the locH of sprite(i) <= -2758 then 
  156.             set the locH of sprite(i) to the locH of sprite(i) +(5316)
  157.           end if  
  158.           if the locH of sprite(i) >= 2658  then 
  159.             set the locH of sprite(i) to the locH of sprite(i)  -5316
  160.           end if  
  161.         end repeat
  162.         updateStage
  163.       end repeat
  164.     end if 
  165.   end repeat
  166.   set the cursor of sprite(xSprite) = -1
  167. end
  168.  
  169.  
  170. --===================================
  171. --used to blend the titles for the credits
  172. -------------------------------------
  173. on blendMe xSprite, xState
  174.   case (xState) of
  175.       
  176.     #in:
  177.       set the blend of sprite xSprite = 0
  178.       set the visible of sprite xSprite = 1
  179.       updateStage
  180.       repeat with i = 1 to 20
  181.         set the blend of sprite xSprite = i*5
  182.         updateStage
  183.       end repeat
  184.       
  185.     #out:
  186.       repeat with i = 20 down to 1
  187.         set the blend of sprite xSprite = i*5
  188.         updateStage
  189.       end repeat
  190.       set the blend of sprite xSprite = 0
  191.       set the visible of sprite xSprite = 0
  192.       updateStage
  193.   end case
  194.   
  195. end
  196.  
  197.  
  198. on keyDown 
  199.   
  200.   if gIsMac then
  201.     if the commandDown and (the keycode = 12 or the keycode = 47) then
  202.       go to frame "MacEnd"
  203.     else
  204.       
  205.       if  (the commandDown and the keyCode = 12) or (the keycode = 112) or (the keycode = 12) then
  206.         go to frame "PCEnd"
  207.       end if
  208.     end if
  209.   end if
  210.   
  211. end 
  212.  
  213.