home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global masterList, roomList, visibleList, pvCount, GavinCounter, ondeckObject
- duplicate(cast ondeckObject, cast 176)
- set the keyDownScript to "keyWatch"
- if getaProp(masterList, #boomBox) = 2 then
- duplicate(cast "boomBox", cast 299)
- end if
- end
-
- on exitRoom
- global roomList, masterList, ondeckObject
- set ondeckObject to the name of cast 176
- set listCounter to count(roomList)
- repeat with x = 1 to listCounter
- set the visible of sprite (19 + x) to 1
- end repeat
- unLoad()
- end
-
- on keyWatch
- global forward, left, right
- if the keyCode = 126 then
- if forward = EMPTY then
- randomRude()
- else
- go(forward)
- end if
- end if
- if the keyCode = 123 then
- puppetTransition(12, 4, 40)
- go(left)
- end if
- if the keyCode = 124 then
- puppetTransition(11, 4, 40)
- go(right)
- end if
- end
-
- on initRoom
- global roomList, masterList
- set listCounter to count(roomList)
- repeat with x = 1 to listCounter
- set whichItem to getAt(roomList, x)
- if getProp(masterList, whichItem) > 0 then
- set the visible of sprite (29 + x) to 0
- end if
- end repeat
- end
-
- on enterBriefcase
- global masterList, visibleList
- set whichItem to count(masterList)
- repeat with x = 1 to whichItem
- set whichChannel to 1 + x
- set whatPiece to getPropAt(masterList, x)
- if getaProp(masterList, whatPiece) <> 1 then
- if the visible of sprite whichChannel = 1 then
- append(visibleList, whichChannel)
- set the visible of sprite whichChannel to 0
- end if
- next repeat
- end if
- set the visible of sprite whichChannel to 1
- end repeat
- end
-
- on exitBriefcase
- global visibleList
- repeat with x = 1 to count(visibleList)
- set the visible of sprite getAt(visibleList, x) to 1
- end repeat
- end
-
- on initGAVIN
- global masterList, visibleListPV
- set visibleListPV to []
- if getProp(masterList, #TOclue) < 2 then
- set the visible of sprite 7 to 0
- else
- set the visible of sprite 7 to 1
- end if
- if getProp(masterList, #M1clue) < 2 then
- set the visible of sprite 8 to 0
- else
- set the visible of sprite 8 to 1
- end if
- if getProp(masterList, #M2clue) < 2 then
- set the visible of sprite 9 to 0
- else
- set the visible of sprite 9 to 1
- end if
- if getProp(masterList, #Gclue) < 2 then
- set the visible of sprite 10 to 0
- else
- set the visible of sprite 10 to 1
- end if
- if getProp(masterList, #AVclue) < 2 then
- set the visible of sprite 11 to 0
- else
- set the visible of sprite 11 to 1
- end if
- if getProp(masterList, #ONclue) < 2 then
- set the visible of sprite 12 to 0
- else
- set the visible of sprite 12 to 1
- end if
- if getProp(masterList, #Eclue) < 2 then
- set the visible of sprite 13 to 0
- else
- set the visible of sprite 13 to 1
- end if
- end
-
- on foreButton
- set the castNum of sprite the clickOn to the number of cast "fore lit"
- updateStage()
- repeat while the mouseDown
- nothing()
- end repeat
- set the castNum of sprite the clickOn to the number of cast "fore arrow"
- updateStage()
- end
-
- on rightButton
- set the castNum of sprite the clickOn to the number of cast "right lit"
- updateStage()
- repeat while the mouseDown
- nothing()
- end repeat
- set the castNum of sprite the clickOn to the number of cast "right arrow"
- updateStage()
- end
-
- on leftButton
- set the castNum of sprite the clickOn to the number of cast "left lit"
- updateStage()
- repeat while the mouseDown
- nothing()
- end repeat
- set the castNum of sprite the clickOn to the number of cast "left arrow"
- updateStage()
- end
-
- on followMouse
- if the name of cast 176 <> "mask" then
- repeat while the mouseDown
- set the locV of sprite 47 to the mouseV
- set the locH of sprite 47 to the mouseH
- updateStage()
- end repeat
- end if
- end
-
- on grabIcon whichIcon, whatChannel, whatProp
- global dragProp
- set dragProp to whatProp
- set the visible of sprite whatChannel to 0
- set the visible of sprite 48 to 0
- duplicate(cast whichIcon, cast 300)
- set the locV of sprite 48 to the mouseV
- set the locH of sprite 48 to the mouseH
- updateStage()
- set the visible of sprite 48 to 1
- repeat while the mouseDown
- set the locV of sprite 48 to the mouseV
- set the locH of sprite 48 to the mouseH
- updateStage()
- end repeat
- end
-
- on checkTool whichReward
- global ToolList, MatchList, frameList, masterList, tapeList, tapeFileList, tapeFlagList, seperator
- set trueMatch to 0
- if sprite 47 intersects 45 and (the name of cast 299 = "boomBox") then
- repeat with x = 1 to count(tapeList)
- if the name of cast 176 = getAt(tapeList, x) then
- set tapeMatch to 1
- exit repeat
- end if
- end repeat
- if tapeMatch = 1 then
- set the locV of sprite 47 to 420
- set the locH of sprite 47 to 258
- duplicate(cast "mask", cast 176)
- updateStage()
- sound playFile 2, the pathName & "sounds" & seperator & getAt(tapeFileList, x)
- repeat while soundBusy(2)
- nothing()
- end repeat
- duplicate(cast getAt(tapeList, x), cast 176)
- updateStage()
- setAt(tapeFlagList, x, 1)
- else
- set the locV of sprite 47 to 420
- set the locH of sprite 47 to 258
- updateStage()
- randomRude()
- end if
- else
- repeat with x = 1 to count(ToolList)
- set whichSprite to getAt(MatchList, x)
- set whichTool to getAt(ToolList, x)
- set whichIcon to the name of cast 176
- if sprite 47 intersects whichSprite and (whichIcon = whichTool) then
- set trueMatch to 1
- setProp(masterList, getAt(frameList, x), 2)
- set the visible of sprite whichSprite to 1
- set the visible of sprite 47 to 0
- set the locV of sprite 47 to 420
- set the locH of sprite 47 to 258
- duplicate(cast "mask", cast 176)
- set the visible of sprite 47 to 1
- updateStage()
- randomWooHoo()
- judgeGavin()
- exit repeat
- end if
- end repeat
- if trueMatch = 0 then
- set the locV of sprite 47 to 420
- set the locH of sprite 47 to 258
- updateStage()
- randomRude()
- end if
- end if
- end
-
- on dropIcon
- global masterList, dragProp, tapeList, tapeFileList, tapeFlagList, seperator
- if sprite 48 intersects 45 and (the name of cast 299 = "boomBox") then
- set tapeMatch to 0
- repeat with x = 1 to count(tapeList)
- if the name of cast 300 = getAt(tapeList, x) then
- set tapeMatch to 1
- exit repeat
- end if
- end repeat
- if tapeMatch = 1 then
- set the locV of sprite 48 to 441
- set the locH of sprite 48 to 17
- duplicate(cast "mask2", cast 300)
- updateStage()
- sound playFile 2, the pathName & "sounds" & seperator & getAt(tapeFileList, x)
- repeat while soundBusy(2)
- nothing()
- end repeat
- duplicate(cast getAt(tapeList, x), cast 176)
- updateStage()
- setAt(tapeFlagList, x, 1)
- setaProp(masterList, dragProp, 1)
- else
- set the visible of sprite 48 to 0
- set the visible of sprite the clickOn to 1
- duplicate(cast "mask2", cast 300)
- set the locV of sprite 48 to 441
- set the locH of sprite 48 to 17
- updateStage()
- set the visible of sprite 48 to 1
- randomRude()
- end if
- else
- if sprite 48 intersects 46 then
- set the visible of sprite 48 to 0
- duplicate(cast "mask2", cast 300)
- set the locV of sprite 48 to 441
- set the locH of sprite 48 to 17
- updateStage()
- set the visible of sprite 48 to 1
- setaProp(masterList, dragProp, 1)
- randomWooHoo()
- else
- set the visible of sprite 48 to 0
- set the visible of sprite the clickOn to 1
- duplicate(cast "mask2", cast 300)
- set the locV of sprite 48 to 441
- set the locH of sprite 48 to 17
- updateStage()
- set the visible of sprite 48 to 1
- randomRude()
- end if
- end if
- end
-
- on randomRude
- global rude1, rude2, rude3, rude4, rude5, rude6, rude7, rude8, rude9, rude10, rude11, rude12, rude13, rude14, rude15, rude16, rude17, rude18, rudeList
- if soundBusy(2) then
- nothing()
- else
- sound playFile 2, getAt(rudeList, random(18))
- end if
- end
-
- on randomWooHoo
- global woohoo1, woohoo2, woohoo3, woohoo4, woohoo5, woohoo6, woohoo7, woohoo8, woohoo9, wooHooList
- if soundBusy(2) then
- nothing()
- else
- sound playFile 2, getAt(wooHooList, random(8))
- end if
- end
-
- on judgeGavin
- global masterList
- set GavinCounter to 0
- if getaProp(masterList, #TOclue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if getaProp(masterList, #M1clue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if getaProp(masterList, #M2clue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if getaProp(masterList, #Gclue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if getaProp(masterList, #AVclue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if getaProp(masterList, #ONclue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if getaProp(masterList, #Eclue) = 2 then
- set GavinCounter to GavinCounter + 1
- end if
- if GavinCounter = 7 then
- go("tapeGive")
- end if
- end
-