home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gMoovQty, gPreroll, gMovieLoc, gMoovRoot, gBkgdRoot, gIdeaPictSprite, gMovieSprite, gStopSprite, gPlaySprite, gRepeatSprite
- clearGlobals()
- cursor(0)
- cursor(4)
- set gMoovQty to 41
- set gMovieLoc to [138, 44]
- set gMoovRoot to "PYRMD"
- set gBkgdRoot to "PSIV"
- set gIdeaPictSprite to 2
- set gMovieSprite to 5
- set gStopSprite to 8
- set gPlaySprite to 9
- set gRepeatSprite to 10
- preLoadCast(42, 48)
- clearMoovPlayList()
- set the mouseDownScript to "lockMouseDownScript"
- set the mouseUpScript to "lockMouseUpScript"
- initializeQtMovies()
- end
-
- on keyDown
- dontPassEvent()
- end
-
- on keyUp
- dontPassEvent()
- end
-
- on mouseDown
- global gSpriteNumber, gStopSprite, gPlaySprite, gRepeatSprite
- set gSpriteNumber to the clickOn
- set UpcastNum to the castNum of sprite gSpriteNumber
- set downCastNum to UpcastNum + 1
- if (gSpriteNumber = gStopSprite) or (gSpriteNumber = gPlaySprite) or (gSpriteNumber = gRepeatSprite) then
- set the castNum of sprite gSpriteNumber to downCastNum
- updateStage()
- repeat while the mouseDown
- if not rollOver(gSpriteNumber) then
- set the castNum of sprite gSpriteNumber to UpcastNum
- updateStage()
- next repeat
- end if
- set the castNum of sprite gSpriteNumber to downCastNum
- updateStage()
- end repeat
- set the castNum of sprite gSpriteNumber to UpcastNum
- end if
- end
-
- on lockMouseUpscript
- set the mouseUpScript to EMPTY
- dontPassEvent()
- end
-
- on lockMousedownscript
- set the mouseDownScript to EMPTY
- dontPassEvent()
- end
-
- on mouseUp
- global gSpriteNumber, clicksprite, gJumpFlag, gIdeaPictSprite, gStopSprite, gPlaySprite, gRepeatSprite
- if the clickOn = 0 then
- dontPassEvent()
- exit
- end if
- set gSpriteNumber to the clickOn
- set UpcastNum to the castNum of sprite gSpriteNumber
- set downCastNum to UpcastNum + 1
- set the mouseDownScript to "lockMouseDownScript"
- set the mouseUpScript to "lockMouseUpScript"
- if (gSpriteNumber = gPlaySprite) and rollOver(gPlaySprite) then
- if the frameLabel = "wait" then
- go("random")
- end if
- else
- if (gSpriteNumber = gRepeatSprite) and rollOver(gRepeatSprite) then
- go("setup")
- else
- if (gSpriteNumber = gStopSprite) and rollOver(gStopSprite) then
- set the castNum of sprite gStopSprite to the number of cast "nstopu"
- puppetSprite(gIdeaPictSprite, 0)
- updateStage()
- go("stop")
- quit()
- else
- lockMousedownscript()
- lockMouseUpscript()
- end if
- end if
- end if
- updateStage()
- end
-
- on initializeQtMovies
- global gMoovQty, gMoovRoot
- cursor(0)
- cursor(4)
- repeat with x = 1 to gMoovQty
- set movieName to gMoovRoot & x
- set the directToStage of cast movieName to 1
- set the pausedAtStart of cast movieName to 1
- set the preLoad of cast movieName to 1
- end repeat
- end
-
- on randomSetup
- global gMoovNameNum, gMoovQty, gMoovPlayList, gMoovPlayListCounter, gFirstFrameNum, gLastFrameNum, bkgdname, gMoovRoot, gBkgdRoot
- cursor(4)
- set successFlag to 0
- repeat while successFlag = 0
- set newMoovNumber to random(gMoovQty)
- if getAt(gMoovPlayList, newMoovNumber) = 0 then
- setAt(gMoovPlayList, newMoovNumber, 1)
- set gMoovNameNum to the number of cast (gMoovRoot & newMoovNumber)
- set gMoovPlayListCounter to gMoovPlayListCounter + 1
- set successFlag to 1
- end if
- end repeat
- if gMoovPlayListCounter = gMoovQty then
- clearMoovPlayList()
- end if
- set bkgdname to gBkgdRoot & newMoovNumber
- end
-
- on moovSetup
- global gFirstFrameNum, gMoovNameNum, gPreroll, gMovielength
- cursor(0)
- cursor(4)
- updateStage()
- end
-
- on playMoov
- global gMoovNameNum, gMovieLoc, gMovieSprite
- set myMovieLoc to gMovieLoc
- set whichMovieCast to gMoovNameNum
- playMyMoov(gMovieSprite, myMovieLoc, whichMovieCast)
- end
-
- on playMyMoov whichsprite, movieLoc, whichMovieCast
- cursor(4)
- set dummyCast to 19
- go(the frame)
- puppetSprite(whichsprite, 1)
- set spriteWidth to the width of cast whichMovieCast
- set spriteHeight to the height of cast whichMovieCast
- set spriteLeft to getAt(movieLoc, 1) + value(spriteWidth / 2)
- set spriteTop to getAt(movieLoc, 1) + value(spriteHeight / 2)
- set spriteLeft to getAt(movieLoc, 1)
- set spriteTop to getAt(movieLoc, 2)
- set spriteRight to spriteLeft + spriteWidth
- set spriteBottom to spriteTop + spriteHeight
- spriteBox(whichsprite, -500, -500, -500 + 124, -500 + 120)
- updateStage()
- set the castNum of sprite whichsprite to whichMovieCast
- spriteBox(whichsprite, spriteLeft, spriteTop, spriteRight, spriteBottom)
- updateStage()
- set clickTest to 0
- set movieLen to the duration of cast whichMovieCast
- set the movieRate of sprite whichsprite to 1
- repeat while the movieTime of sprite whichsprite < movieLen
- if the mouseDown then
- set clickTest to 1
- exit repeat
- end if
- updateStage()
- end repeat
- set the movieRate of sprite whichsprite to 0
- unLoadCast(whichMovieCast)
- set the castNum of sprite whichsprite to dummyCast
- if clickTest = 0 then
- lockMousedownscript()
- lockMouseUpscript()
- end if
- spriteBox(whichsprite, 0, 0, 640, 480)
- updateStage()
- clearbkgnd()
- spriteBox(whichsprite, -200, -200, 100, 100)
- updateStage()
- puppetSprite(whichsprite, 0)
- cursor(0)
- go(the frame + 1)
- end
-
- on moovStatus
- global gMovielength, gLastFrameNum, gMoovNameNum, gMovieSprite
- set gJumpFlag to 1
- set the locH of sprite gMovieSprite to -200
- unLoadCast(gMoovNameNum)
- puppetSprite(gMovieSprite, 0)
- updateStage()
- end
-
- on stopMoov
- global gMovieSprite
- killSprite(gMovieSprite)
- clearbkgnd()
- updateStage()
- end
-
- on checkForJump
- global gJumpFlag
- if gJumpFlag = 1 then
- set gJumpFlag to 0
- go("random")
- end if
- end
-
- on clearMoovPlayList
- global gMoovPlayList, gMoovQty, gMoovPlayListCounter
- set gMoovPlayList to list(0)
- setAt(gMoovPlayList, gMoovQty, 0)
- set gMoovPlayListCounter to 0
- end
-
- on killSprite whichsprite
- set the locH of sprite whichsprite to -500
- set the locV of sprite whichsprite to -500
- puppetSprite(whichsprite, 0)
- updateStage()
- end
-
- on keepbkgd
- global bkgdname, gIdeaPictSprite
- puppetSprite(gIdeaPictSprite, 1)
- set the castNum of sprite gIdeaPictSprite to the number of cast bkgdname
- set the stretch of sprite gIdeaPictSprite to 1
- spriteBox(gIdeaPictSprite, 329, 0, 640, 273)
- updateStage()
- end
-
- on clearbkgnd
- global bkgdname, gIdeaPictSprite
- unLoadCast(2)
- set the castNum of sprite gIdeaPictSprite to 34
- set the stretch of sprite gIdeaPictSprite to 1
- spriteBox(gIdeaPictSprite, 329, 0, 640, 273)
- updateStage()
- end
-
- on mydelay numticks
- startTimer()
- repeat while the timer < numticks
- end repeat
- end
-