home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- set the keyDownScript to "checkexit"
- set the exitLock to 1
- cursor(4)
- end
-
- on checkexit
- if the optionDown and (the key = "q") then
- quit()
- end if
- if the commandDown and ((the key = "q") or (the key = ".")) then
- go(1, "credits")
- end if
- if the optionDown and (the keyCode = 118) then
- go(1, "credits")
- end if
- if the keyCode = 53 then
- go(1, "credits")
- end if
- end
-
- on startsequence
- global hidepos, thetempo, hideplaces, hidelist, numtraps, dest, destframe, WhereAmI, mysndpath, mypuppet, myloops, mloc, trappos, thecdpath, gsounddrive, trapsdone
- cursor(4)
- if the machineType = 256 then
- set mysndpath to the pathName & "sounds\" & line 1 of field "movieinfo"
- else
- set mysndpath to the pathName & "sounds:" & line 1 of field "movieinfo"
- end if
- set myloops to value(line 2 of field "movieinfo")
- set mypuppet to value(line 3 of field "movieinfo")
- set mloc to line 4 of field "movieinfo"
- set trappos to line 5 of field "movieinfo"
- set WhereAmI to "bedroom"
- set the timeoutLength to 4800
- set the timeoutScript to "nothingatstart"
- set the timeoutMouse to 0
- puppetTempo(12)
- set hideplaces to the number of lines in field "hidelist"
- set hidepos to random(hideplaces)
- put hidepos
- set hidelist to field "hidelist"
- repeat with x = 1 to the number of lines in hidelist
- set y to offset(":", line x of hidelist)
- delete char 1 to y of line x of hidelist
- end repeat
- selectdest()
- if numtraps = 0 then
- puppetSprite(46, 1)
- set the type of sprite 46 to 0
- end if
- if numtraps = 5 then
- set trapsdone to EMPTY
- end if
- repeat with x = 41 to 45
- puppetSprite(x, 1)
- end repeat
- repeat while the soundBusy of 1
- end repeat
- end
-
- on readytogo
- global mypuppet, thismem
- randomit()
- puppetSprite(mypuppet, 1)
- cursor(-1)
- end
-
- on endOfRun
- global mypuppet
- set the mouseUpScript to EMPTY
- cursor(-1)
- newdest()
- puppetSprite(mypuppet, 0)
- randomit()
- updateStage()
- puppetSprite(mypuppet, 1)
- puppetTempo(12)
- end
-
- on caught
- global mypuppet, mh, mv, mymouse, mycount, trapset
- cursor(200)
- set the mouseUpScript to EMPTY
- puppetSound("squeak")
- if trapset then
- puppetSprite(46, 0)
- end if
- set mymouse to 0
- set mycount to 0
- puppetSprite(mypuppet, 0)
- go("caught")
- puppetSprite(39, 1)
- set the locH of sprite 39 to the mouseH
- set the locV of sprite 39 to the mouseV
- end
-
- on movetonet
- global mh, mv
- set mh to the mouseH
- set mv to the mouseV
- checkmove()
- end
-
- on positionit
- global mloc
- set the locH of sprite 39 to value(item 1 of mloc)
- set the locV of sprite 39 to value(item 2 of mloc)
- updateStage()
- set the timeoutLapsed to 0
- unLoad()
- end
-
- on hanging
- global mymouse, mycount
- set mycount to mycount + 1
- if mycount < 6 then
- if mymouse < 6 then
- set mymouse to mymouse + 1
- end if
- if mymouse = 6 then
- set mymouse to 1
- end if
- set the locH of sprite 39 to the mouseH
- set the locV of sprite 39 to the mouseV
- set the castNum of sprite 39 to the number of cast ("m" & mymouse)
- updateStage()
- go(the frame)
- else
- movetonet()
- set mycount to 0
- end if
- end
-
- on checkmove
- global mh, mv, mloc, moveh, movev
- set th to value(item 1 of mloc)
- set tv to value(item 2 of mloc)
- set moveh to (th - mh) / 5
- set movev to (tv - mv) / 5
- end
-
- on movemouse
- global moveh, movev, mycount, mymouse
- if not (the soundBusy of 1) then
- puppetSound("squeak")
- end if
- set mycount to mycount + 1
- if mycount < 6 then
- if mymouse < 6 then
- set mymouse to mymouse + 1
- end if
- if mymouse = 6 then
- set mymouse to 1
- end if
- set the castNum of sprite 39 to the number of cast ("m" & mymouse)
- set the locH of sprite 39 to the locH of sprite 39 + moveh
- set the locV of sprite 39 to the locV of sprite 39 + movev
- end if
- end
-
- on endofRoom
- global miceCaught, mytempo, WhereAmI, trapset, music, spritelist, theselsprite, thecdpath, thehdpath
- randomendsound()
- set trapset to 0
- set the timeoutScript to EMPTY
- set miceCaught to miceCaught + 1
- if miceCaught = 5 then
- set mytempo to mytempo + 2
- end if
- if miceCaught = 10 then
- set mytempo to mytempo + 2
- end if
- if miceCaught = 15 then
- set mytempo to mytempo + 2
- end if
- puppetSprite(39, 0)
- updateStage()
- set posnum to getPos(spritelist, theselsprite)
- deleteAt(spritelist, posnum)
- repeat with x = 41 to 45
- set the visible of sprite x to 1
- end repeat
- if music then
- set WhereAmI to "instrum"
- go(1, the pathName & "instrum")
- else
- set WhereAmI to "menu"
- play frame "Options" of movie the pathName & "demomenu"
- end if
- end
-
- on randomendsound
- global thecdpath, lastone
- if not integerp(lastone) then
- set lastone to 1
- end if
- set ram to lastone
- repeat while lastone = ram
- set ram to random(7)
- end repeat
- if the machineType = 256 then
- sound playFile 1, the pathName & "endsound\random" & ram & ".aif"
- else
- sound playFile 1, the pathName & "endsound:random" & ram & ".aif"
- end if
- set lastone to ram
- end
-
- on selectdest
- global hidelist, hidepos, dest, destframe
- set z to the number of items in line value(hidepos) of hidelist
- set dest to value(item random(z) of line value(hidepos) of hidelist)
- set destframe to "MA" & hidepos & ":" & dest
- end
-
- on newdest
- global hidepos, dest
- set hidepos to dest
- selectdest()
- end
-
- on nothingatstart
- global mysndpath, destframe, hidepos
- go(destframe)
- sound playFile 1, mysndpath & hidepos
- end
-
- on nothingafterawhile
- global mysndpath, destframe, hidepos
- go(destframe)
- sound playFile 1, mysndpath & hidepos
- end
-
- on endanim
- global mypuppet
- puppetSprite(mypuppet, 0)
- go("loop1")
- updateStage()
- puppetSprite(mypuppet, 1)
- end
-
- on clicked
- global hidepos, destframe, mytempo, mysndpath
- puppetSound(0)
- if (the clickOn - 29) = hidepos then
- puppetTempo(mytempo)
- set the timeoutLapsed to 0
- go(destframe)
- sound playFile 1, mysndpath & the clickOn - 29
- set the mouseUpScript to "miss"
- cursor([823, 824])
- else
- puppetTempo(12)
- go("A" & the clickOn - 29)
- sound playFile 1, mysndpath & the clickOn - 29
- end if
- end
-
- on miss
- puppetSound("miss.aif")
- end
-
- on randomit
- global theloop, mypuppet, myloops, lastloop, prevloop
- if lastloop <> prevloop then
- set theloop to random(myloops)
- else
- if lastloop = 1 then
- set theloop to 2
- else
- if lastloop <> 1 then
- set theloop to 1
- end if
- end if
- end if
- set prevloop to lastloop
- set lastloop to theloop
- puppetSprite(mypuppet, 0)
- go("loop" & theloop)
- puppetSprite(mypuppet, 1)
- set the castNum of sprite mypuppet to the number of cast ("loop" & theloop)
- end
-
- on selecttrap
- global numtraps, trapnum, trapsdone, trappos, mh, mv, moveh, movev, trapset
- set numtraps to numtraps - 1
- set trapnum to the clickOn - 40
- set mytrap to the clickOn
- puppetSprite(mytrap, 1)
- repeat with x = 41 to 45
- if x <> mytrap then
- set the puppet of sprite x to 1
- set the type of sprite x to 0
- end if
- end repeat
- cursor(200)
- set mh to the locH of sprite mytrap
- set mv to the locV of sprite mytrap
- set th to value(item 1 of trappos)
- set tv to value(item 2 of trappos) + 33
- set moveh to (th - mh) / 5
- set movev to (tv - mv) / 5
- repeat with x = 1 to 5
- set the locH of sprite mytrap to the locH of sprite mytrap + moveh
- set the locV of sprite mytrap to the locV of sprite mytrap + movev
- updateStage()
- wait(5)
- end repeat
- wait(30)
- puppetSprite(mytrap, 0)
- put trapnum & "," after trapsdone
- set trapset to 1
- cursor(-1)
- puppetSprite(46, 1)
- set the castNum of sprite 46 to the number of cast "trapmark"
- set the locH of sprite 46 to th
- set the locV of sprite 46 to tv - 33
- repeat with x = 41 to 45
- set the puppet of sprite x to 1
- set the type of sprite x to 0
- end repeat
- set the mouseUpScript to EMPTY
- updateStage()
- end
-
- on runtraps
- global trapsdone
- puppetSprite(46, 1)
- set the castNum of sprite 46 to the number of cast "traphilite"
- repeat with x = 41 to 45
- if not (trapsdone contains string(x - 40)) then
- puppetSprite(x, 0)
- end if
- end repeat
- go("loop1")
- set the mouseUpScript to "canceltrap"
- end
-
- on canceltrap
- if (the clickOn < 41) or (the clickOn > 45) then
- repeat with x = 41 to 45
- set the puppet of sprite x to 1
- set the type of sprite x to 0
- end repeat
- puppetSprite(46, 0)
- go("loop1")
- updateStage()
- set the mouseUpScript to EMPTY
- end if
- end
-
- on checktrap msprite
- global trapset, trapnum, wherefrom, trappos, thetrapsprite
- set thetrapsprite to msprite
- if the machineType = 256 then
- wait(10)
- end if
- if trapset = 1 then
- set the type of sprite 46 to 0
- puppetSprite(msprite, 1)
- set the stretch of sprite msprite to 0
- set the locH of sprite msprite to value(item 1 of trappos)
- set the locV of sprite msprite to value(item 2 of trappos)
- if trapnum = 1 then
- repeat with x = 1 to 10
- set the castNum of sprite msprite to the number of cast ("1." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- repeat with x = 8 to 10
- set the castNum of sprite msprite to the number of cast ("1." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- repeat with x = 8 to 10
- set the castNum of sprite msprite to the number of cast ("1." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- end if
- if trapnum = 2 then
- repeat with x = 1 to 11
- set the castNum of sprite msprite to the number of cast ("2." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- end if
- if trapnum = 3 then
- repeat with x = 1 to 5
- set the castNum of sprite msprite to the number of cast ("3." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- repeat with z = 1 to 4
- repeat with x = 3 to 5
- if the mouseDown then
- trapsoff()
- exit
- end if
- set the castNum of sprite msprite to the number of cast ("3." & x)
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- end repeat
- end if
- if trapnum = 4 then
- repeat with x = 1 to 4
- set the castNum of sprite msprite to the number of cast ("4." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- repeat with x = 2 to 4
- set the castNum of sprite msprite to the number of cast ("4." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- repeat with x = 2 to 4
- set the castNum of sprite msprite to the number of cast ("4." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- repeat with x = 2 to 6
- set the castNum of sprite msprite to the number of cast ("4." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- end if
- if trapnum = 5 then
- repeat with x = 1 to 9
- set the castNum of sprite msprite to the number of cast ("5." & x)
- if the mouseDown then
- trapsoff()
- exit
- end if
- updateStage()
- if the machineType = 256 then
- wait(10)
- end if
- end repeat
- end if
- puppetSprite(msprite, 0)
- go(the frame + 1)
- set trapset to 0
- end if
- end
-
- on trapsoff
- global thetrapsprite, trapset
- puppetSprite(thetrapsprite, 0)
- go(the frame + 1)
- set trapset to 0
- pass()
- end
-
- on canceltraps
- global trapsdone
- repeat with x = 1 to the number of items in trapsdone
- set mytrap to 34 + value(item x of trapsdone)
- puppetSprite(mytrap, 0)
- end repeat
- go("loop")
- end
-
- on wait n
- set waittime to the timer + n
- repeat while the timer < waittime
- end repeat
- end
-
- on help
- global WhereAmI, mypuppet, myhelpframe
- set the timeoutLapsed to 0
- if WhereAmI = "instrum" then
- set myhelpframe to the frame
- go("help")
- end if
- if WhereAmI = "bedroom" then
- puppetSound(0)
- puppetSprite(mypuppet, 0)
- updateStage()
- set the visible of sprite mypuppet to 0
- go("11")
- updateStage()
- puppetSprite(48, 1)
- set the stretch of sprite 48 to 0
- set the locH of sprite 48 to 480
- set the locV of sprite 48 to 345
- set the castNum of sprite 48 to the number of cast "cathelp7"
- updateStage()
- set the movieRate of sprite 48 to 1
- repeat while the movieRate of sprite 48 = 1
- updateStage()
- if the mouseDown then
- exit repeat
- end if
- end repeat
- set the castNum of sprite 48 to the number of cast "helpcover"
- updateStage()
- set the locH of sprite 48 to 800
- updateStage()
- puppetSprite(48, 0)
- set the visible of sprite mypuppet to 1
- go(the frame + 1)
- puppetSprite(mypuppet, 1)
- updateStage()
- end if
- if WhereAmI = "attic" then
- puppetSound(0)
- puppetSprite(48, 1)
- set the stretch of sprite 48 to 0
- set the locH of sprite 48 to 480
- set the locV of sprite 48 to 345
- set the castNum of sprite 48 to the number of cast "cathel10"
- updateStage()
- set the movieRate of sprite 48 to 1
- repeat while the movieRate of sprite 48 = 1
- updateStage()
- if the mouseDown then
- exit repeat
- end if
- end repeat
- set the castNum of sprite 48 to the number of cast "helpcover"
- updateStage()
- set the locH of sprite 48 to 800
- updateStage()
- puppetSprite(48, 0)
- set the visible of sprite mypuppet to 1
- puppetSprite(mypuppet, 1)
- updateStage()
- end if
- set the timeoutLapsed to 0
- end
-
- on exithelp
- set the castNum of sprite 48 to the number of cast "helpcover"
- set the ink of sprite 48 to 36
- updateStage()
- puppetSprite(48, 0)
- set the mouseDownScript to EMPTY
- set the timeoutLapsed to 0
- end
-
- on buildorchestra
- global instrument, theBuild, playList, buildList, miceCaught, sprNum
- set playList to []
- set miceCaught to 0
- set b1 to ["BASS", "DRUMS", "TRUMP1", "TRUMP2", "TROM1", "TROM2", "GUITAR", "FLUTE", "CLARIN1", "CLARIN2", "CONGAS", "PIANO", "TENOR1", "TENOR2", "TENOR3", "SAX1", "SAX2", "BARITONE", "VIBES"]
- set theBuild to "BUILD1"
- set buildList to b1
- end
-