home *** CD-ROM | disk | FTP | other *** search
/ The World of Don & Mike / DMCDROM.iso / gamedata / button.dir / 00001_MovieScript.ls next >
Encoding:
Text File  |  1995-12-12  |  7.2 KB  |  262 lines

  1. on startMovie
  2.   global masterList, roomList, visibleList, pvCount, butvidflag, ondeckObject, onDeckInk
  3.   duplicate(cast ondeckObject, cast 176)
  4.   set the keyDownScript to "KEYWATCH"
  5.   if getaProp(masterList, #boomBox) = 2 then
  6.     duplicate(cast "boomBox", cast 299)
  7.   end if
  8. end
  9.  
  10. on exitRoom
  11.   global roomList, masterList, ondeckObject, onDeckInk
  12.   set ondeckObject to the name of cast 176
  13.   set onDeckInk to the ink of sprite 47
  14.   set listCounter to count(roomList)
  15.   repeat with x = 1 to listCounter
  16.     set the visible of sprite (19 + x) to 1
  17.   end repeat
  18.   unLoad()
  19. end
  20.  
  21. on keyWatch
  22.   global forward, left, right
  23.   if the keyCode = 126 then
  24.     if forward = EMPTY then
  25.       randomRude()
  26.     else
  27.       go(forward)
  28.     end if
  29.   end if
  30.   if the keyCode = 123 then
  31.     puppetTransition(12, 4, 40)
  32.     go(left)
  33.   end if
  34.   if the keyCode = 124 then
  35.     puppetTransition(11, 4, 40)
  36.     go(right)
  37.   end if
  38. end
  39.  
  40. on initRoom
  41.   global roomList, masterList
  42.   set listCounter to count(roomList)
  43.   repeat with x = 1 to listCounter
  44.     set whichItem to getAt(roomList, x)
  45.     if getProp(masterList, whichItem) > 0 then
  46.       set the visible of sprite (29 + x) to 0
  47.     end if
  48.   end repeat
  49. end
  50.  
  51. on enterBriefcase
  52.   global masterList, visibleList
  53.   set whichItem to count(masterList)
  54.   repeat with x = 1 to whichItem
  55.     set whichChannel to 1 + x
  56.     set whatPiece to getPropAt(masterList, x)
  57.     if getaProp(masterList, whatPiece) <> 1 then
  58.       if the visible of sprite whichChannel = 1 then
  59.         append(visibleList, whichChannel)
  60.         set the visible of sprite whichChannel to 0
  61.       end if
  62.       next repeat
  63.     end if
  64.     set the visible of sprite whichChannel to 1
  65.   end repeat
  66. end
  67.  
  68. on exitBriefcase
  69.   global visibleList
  70.   repeat with x = 1 to count(visibleList)
  71.     set the visible of sprite getAt(visibleList, x) to 1
  72.   end repeat
  73. end
  74.  
  75. on foreButton
  76.   set the castNum of sprite the clickOn to the number of cast "fore lit"
  77.   updateStage()
  78.   repeat while the mouseDown
  79.     nothing()
  80.   end repeat
  81.   set the castNum of sprite the clickOn to the number of cast "fore arrow"
  82.   updateStage()
  83. end
  84.  
  85. on rightButton
  86.   set the castNum of sprite the clickOn to the number of cast "right lit"
  87.   updateStage()
  88.   repeat while the mouseDown
  89.     nothing()
  90.   end repeat
  91.   set the castNum of sprite the clickOn to the number of cast "right arrow"
  92.   updateStage()
  93. end
  94.  
  95. on leftButton
  96.   set the castNum of sprite the clickOn to the number of cast "left lit"
  97.   updateStage()
  98.   repeat while the mouseDown
  99.     nothing()
  100.   end repeat
  101.   set the castNum of sprite the clickOn to the number of cast "left arrow"
  102.   updateStage()
  103. end
  104.  
  105. on followMouse
  106.   if the name of cast 176 <> "mask" then
  107.     repeat while the mouseDown
  108.       set the locV of sprite 47 to the mouseV
  109.       set the locH of sprite 47 to the mouseH
  110.       updateStage()
  111.     end repeat
  112.   end if
  113. end
  114.  
  115. on grabIcon whichIcon, whatChannel, whatProp
  116.   global dragProp
  117.   set dragProp to whatProp
  118.   set the visible of sprite whatChannel to 0
  119.   set the visible of sprite 48 to 0
  120.   duplicate(cast whichIcon, cast 300)
  121.   set the locV of sprite 48 to the mouseV
  122.   set the locH of sprite 48 to the mouseH
  123.   updateStage()
  124.   set the visible of sprite 48 to 1
  125.   repeat while the mouseDown
  126.     set the locV of sprite 48 to the mouseV
  127.     set the locH of sprite 48 to the mouseH
  128.     updateStage()
  129.   end repeat
  130. end
  131.  
  132. on checkTool whichReward
  133.   global ToolList, MatchList, frameList, masterList, tapeList, tapeFileList, tapeFlagList, seperator
  134.   set trueMatch to 0
  135.   if sprite 47 intersects 45 and (the name of cast 299 = "boomBox") then
  136.     repeat with x = 1 to count(tapeList)
  137.       if the name of cast 176 = getAt(tapeList, x) then
  138.         set tapeMatch to 1
  139.         exit repeat
  140.       end if
  141.     end repeat
  142.     if tapeMatch = 1 then
  143.       set the locV of sprite 47 to 420
  144.       set the locH of sprite 47 to 258
  145.       duplicate(cast "mask", cast 176)
  146.       updateStage()
  147.       sound playFile 2, the pathName & "sounds" & seperator & getAt(tapeFileList, x)
  148.       repeat while soundBusy(2)
  149.         nothing()
  150.       end repeat
  151.       duplicate(cast getAt(tapeList, x), cast 176)
  152.       updateStage()
  153.       setAt(tapeFlagList, x, 1)
  154.     else
  155.       set the locV of sprite 47 to 420
  156.       set the locH of sprite 47 to 258
  157.       updateStage()
  158.       randomRude()
  159.     end if
  160.   else
  161.     repeat with x = 1 to count(ToolList)
  162.       set whichSprite to getAt(MatchList, x)
  163.       set whichTool to getAt(ToolList, x)
  164.       set whichIcon to the name of cast 176
  165.       if sprite 47 intersects whichSprite and (whichIcon = whichTool) then
  166.         set trueMatch to 1
  167.         setProp(masterList, getAt(frameList, x), 2)
  168.         set the visible of sprite whichSprite to 1
  169.         set the visible of sprite 47 to 0
  170.         set the locV of sprite 47 to 420
  171.         set the locH of sprite 47 to 258
  172.         duplicate(cast "mask", cast 176)
  173.         set the visible of sprite 47 to 1
  174.         updateStage()
  175.         go(whichReward)
  176.         randomWooHoo()
  177.         exit repeat
  178.       end if
  179.     end repeat
  180.     if trueMatch = 0 then
  181.       set the locV of sprite 47 to 420
  182.       set the locH of sprite 47 to 258
  183.       updateStage()
  184.       randomRude()
  185.     end if
  186.   end if
  187. end
  188.  
  189. on dropIcon
  190.   global masterList, dragProp, tapeList, tapeFileList, tapeFlagList, seperator
  191.   if sprite 48 intersects 45 and (the name of cast 299 = "boomBox") then
  192.     set tapeMatch to 0
  193.     repeat with x = 1 to count(tapeList)
  194.       if the name of cast 300 = getAt(tapeList, x) then
  195.         set tapeMatch to 1
  196.         exit repeat
  197.       end if
  198.     end repeat
  199.     if tapeMatch = 1 then
  200.       set the locV of sprite 48 to 441
  201.       set the locH of sprite 48 to 17
  202.       duplicate(cast "mask2", cast 300)
  203.       updateStage()
  204.       sound playFile 2, the pathName & "sounds" & seperator & getAt(tapeFileList, x)
  205.       repeat while soundBusy(2)
  206.         nothing()
  207.       end repeat
  208.       duplicate(cast getAt(tapeList, x), cast 176)
  209.       updateStage()
  210.       setAt(tapeFlagList, x, 1)
  211.       setaProp(masterList, dragProp, 1)
  212.     else
  213.       set the visible of sprite 48 to 0
  214.       set the visible of sprite the clickOn to 1
  215.       duplicate(cast "mask2", cast 300)
  216.       set the locV of sprite 48 to 441
  217.       set the locH of sprite 48 to 17
  218.       updateStage()
  219.       set the visible of sprite 48 to 1
  220.       randomRude()
  221.     end if
  222.   else
  223.     if sprite 48 intersects 46 then
  224.       set the visible of sprite 48 to 0
  225.       duplicate(cast "mask2", cast 300)
  226.       set the locV of sprite 48 to 441
  227.       set the locH of sprite 48 to 17
  228.       updateStage()
  229.       set the visible of sprite 48 to 1
  230.       setaProp(masterList, dragProp, 1)
  231.       randomWooHoo()
  232.     else
  233.       set the visible of sprite 48 to 0
  234.       set the visible of sprite the clickOn to 1
  235.       duplicate(cast "mask2", cast 300)
  236.       set the locV of sprite 48 to 441
  237.       set the locH of sprite 48 to 17
  238.       updateStage()
  239.       set the visible of sprite 48 to 1
  240.       randomRude()
  241.     end if
  242.   end if
  243. end
  244.  
  245. on randomRude
  246.   global rude1, rude2, rude3, rude4, rude5, rude6, rude7, rude8, rude9, rude10, rude11, rude12, rude13, rude14, rude15, rude16, rude17, rude18, rudeList
  247.   if soundBusy(2) then
  248.     nothing()
  249.   else
  250.     sound playFile 2, getAt(rudeList, random(18))
  251.   end if
  252. end
  253.  
  254. on randomWooHoo
  255.   global woohoo1, woohoo2, woohoo3, woohoo4, woohoo5, woohoo6, woohoo7, woohoo8, woohoo9, wooHooList
  256.   if soundBusy(2) then
  257.     nothing()
  258.   else
  259.     sound playFile 2, getAt(wooHooList, random(8))
  260.   end if
  261. end
  262.