home *** CD-ROM | disk | FTP | other *** search
/ LAUNCH 2 / LAUNCH.BIN / mac / TOYOTA / TOYOTA.DIR / 00254_Script_254 < prev    next >
Text File  |  1995-01-01  |  6KB  |  234 lines

  1. on showModel whichModel
  2.   go "lineup"
  3.   puppetSprite 45, 1
  4.   puppetSprite 46, 1
  5.   set the locH of sprite 45 = 250
  6.   set the stretch of sprite 46 = 0
  7.   puppetTransition 05, 2, 2, 1
  8.   set the castNum of sprite 46 = the number of cast (whichModel & ".pict")
  9.   updateStage
  10.   --set the mouseDownScript = "hideModel"
  11. end
  12.  
  13. on hideModel
  14.   set the mouseDownScript = EMPTY
  15.   if rollover(26) or rollover(27) or rollover(28) then
  16.     nothing
  17.   else
  18.     dontpassevent
  19.   end if
  20.   puppetTransition 06, 2, 2, 1
  21.   set the castNum of sprite 46 = 0
  22.   updateStage
  23.   puppetSprite 46, 0
  24.   go frame "tm"
  25. end
  26.  
  27.  
  28.  
  29. on airplaneRollover
  30.   global gLastRollover
  31.   if rollover(gLastRollover) then exit
  32.   
  33.   repeat with n = 6 to 13
  34.     if rollover(n) then
  35.       set the castNum of sprite 5 = the number of cast "compass.text" + (n - 6)
  36.       updateStage
  37.       set gLastRollover = n
  38.       exit Repeat
  39.     else
  40.       set the castNum of sprite 5 = 0
  41.       updateStage
  42.     end if
  43.   end repeat
  44.   
  45.   
  46. end
  47.  
  48. on eyesRollover
  49.   if the mouseV > 370 then 
  50.     set the locV of sprite 6 = 314
  51.   else if the mouseV < 370 and the mouseV > 250 then
  52.     set the locV of sprite 6 = 312
  53.   else if the mouseV < 250 then
  54.     set the locV of sprite 6 = 310
  55.   end if
  56.   
  57.   if the mouseH > 380 then 
  58.     set the locH of sprite 6 = 312
  59.   else if the mouseH < 380 and the mouseH > 300 then
  60.     set the locH of sprite 6 = 310
  61.   else if the mouseH < 300 then
  62.     set the locH of sprite 6 = 308
  63.   end if
  64.   
  65.   if the mouseH > 288 and the mouseH < 328 and the mouseV > 307 and the mouseV < 318 then
  66.     set the width of sprite 6 = 60
  67.   else
  68.     set the width of sprite 6 = the width of cast "eyes"
  69.   end if
  70.   
  71.   updateStage
  72. end
  73.  
  74. on quitScript
  75.   repeat with n = 1 to 48
  76.     puppetSprite n, 0
  77.   end repeat
  78.   sound stop 1
  79.   sound stop 2
  80.   puppetTransition 0
  81.   updateStage
  82.   go frame "disclaimer"
  83. end
  84.  
  85. on setScore whichCategory
  86.   global scaleScore
  87.   set theBox = the clickon - 10
  88.   --move Box horizontally
  89.   set origin = the locH of sprite 14
  90.   repeat while the mouseDown
  91.     if the mouseH > origin and the mouseH < (origin + 80) then
  92.       set value = (integer((the mouseH - origin)/20) + 1)
  93.       set the locH of sprite theBox = ((value-1) * 20) + origin
  94.       updateStage
  95.     else if the mouseH < origin then
  96.       set the locH of sprite theBox = origin
  97.       updateStage
  98.     else if the mouseH > origin + 80 then
  99.       set the locH of sprite theBox = origin + 80
  100.       updateStage
  101.     end if
  102.   end repeat
  103. end
  104.  
  105. on checkScale
  106.   global gScore
  107.   set gScore = 0
  108.   set origin = the locH of sprite 14
  109.   repeat with n = 5 to 13
  110.     set value = ((the locH of sprite n - origin)/20) + 1
  111.     set gScore = gScore + value
  112.   end repeat
  113.   if gScore < 9 then 
  114.     set the castNum of sprite 4 = the number of cast "s-4"
  115.   else if gScore > 8 and gScore < 13 then 
  116.     set the castNum of sprite 4 = the number of cast "s-3"
  117.   else if gScore > 12 and gScore < 17 then 
  118.     set the castNum of sprite 4 = the number of cast "s-2"
  119.   else if gScore > 16 and gScore < 26 then 
  120.     set the castNum of sprite 4 = the number of cast "s-1"
  121.   else if gScore > 25 and gScore < 29 then 
  122.     set the castNum of sprite 4 = the number of cast "s0"
  123.   else if gScore > 28 and gScore < 32 then 
  124.     set the castNum of sprite 4 = the number of cast "s1"
  125.   else if gScore > 31 and gScore < 36 then 
  126.     set the castNum of sprite 4 = the number of cast "s2"
  127.   else if gScore > 35 and gScore < 40 then 
  128.     set the castNum of sprite 4 = the number of cast "s3"
  129.   else if gScore > 39 then 
  130.     set the castNum of sprite 4 = the number of cast "s4"
  131.   end if
  132.   if gScore > 25 and gScore < 29 then 
  133.     set the forecolor of sprite 24 = 255
  134.     set the forecolor of sprite 25 = 255
  135.   else if gScore < 26 then
  136.     set the forecolor of sprite 24 = 255
  137.     set the forecolor of sprite 25 = 35
  138.   else if gScore > 28 then
  139.     set the forecolor of sprite 24 = 197
  140.     set the forecolor of sprite 25 = 255
  141.   end if
  142.   updateStage
  143.   --put gScore
  144. end
  145.  
  146. on mySound whichSoundFile
  147.   global gCurrentSoundFile
  148.   set gCurrentSoundFile = whichSoundFile
  149.   puppetSound 0
  150.   puppetSound whichSoundFile
  151.   --  if the machineType = 256 then
  152.   --    sound playFile 1, the pathname & "sound\" & whichSoundFile
  153.   --  else
  154.   --    sound playFile 1, the pathname & "sound:" & whichSoundFile
  155.   --  end if
  156.   set the timeoutlapsed = 0
  157. end
  158.  
  159. on sfx whichSoundFile
  160.   if the machineType = 256 then
  161.     sound playFile 2, the pathname & "sfx\" & whichSoundFile
  162.   else
  163.     sound playFile 2, the pathname & "sfx:" & whichSoundFile
  164.   end if
  165.   set the timeoutlapsed = 0
  166. end
  167.  
  168. on idleBoy
  169.   global gSoundID
  170.   if gsoundID = 0 then
  171.     mySound "idle01.aif"
  172.     set gSoundID = gSoundID + 1
  173.   else if gsoundID = 1 then
  174.     mySound "idle02.aif"
  175.     set gSoundID = gSoundID + 1
  176.   else if gsoundID = 2 then
  177.     mySound "idle03.aif"
  178.     set gSoundID = 0
  179.   end if
  180.   if marker(0) = 14 then
  181.     puppetSprite 6, 1
  182.     set the castNum of sprite 6 = the number of cast "MAN LOOP"
  183.     updateStage
  184.     set the timer = 0
  185.     repeat while the timer < 120
  186.       go the frame
  187.     end repeat
  188.     --puppetSprite 6,0
  189.   end if
  190.   
  191. end
  192.  
  193. on rollCheck
  194.   global gPreviousRollover
  195.   if rollover(gPreviousRollover) = FALSE then
  196.     if rollover(5) then
  197.       set gPreviousRollover = 5
  198.       sfx "hammer.aif"
  199.     else if rollover(6) then
  200.       set gPreviousRollover = 6
  201.       sfx "ratchet.aif"
  202.     else if rollover(7) then
  203.       set gPreviousRollover = 7
  204.       sfx "tip01.aif"
  205.     else if rollover(8) then
  206.       set gPreviousRollover = 8
  207.       sfx "chisel.aif"
  208.     else if rollover(9) then
  209.       set gPreviousRollover = 9
  210.       sfx "tip02.aif"
  211.     else if rollover(10) then
  212.       set gPreviousRollover = 10
  213.       sfx "ratchet.aif"
  214.     else if rollover(11) then
  215.       set gPreviousRollover = 11
  216.       sound stop 2
  217.       sfx "handsaw.aif"
  218.     else if rollover(12) then
  219.       set gPreviousRollover = 12
  220.       sfx "tip01.aif"
  221.     end if
  222.   end if
  223.   
  224. end
  225.  
  226.  
  227. on idleCD
  228.   mySound "deal03.aif"
  229. end
  230.  
  231.  
  232.  
  233.  
  234.