home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gvBackSprite, gvAlphabetStripSprite, gvAlphaHiliteBoxSprite, gvQuitButtonSprite, gvPicSignSprite, gvRhySignSprite, gvFrogSprite, gvParrotSprite, gvVelmaSprite, gvRedLetterSprite, gvBonkHeadSprite, gvBonkBodySprite, gvHelpSignSprite, gvBonkRightArmSprite, gvBonkLeftArmSprite, gvCurLetter, gvfRhymeTrack, gvfFromIntro, MOV_EXT, SFX_EXT, DIR_SYM, gvfRealQuit, gvEntranceTime, gvIntroSyncheTime, gvBackDrop, IBM
- setUpTop20()
- set gvCurLetter to "X"
- set gvfFromIntro to 1
- set gvfRhymeTrack to 1
- set gvfRealQuit to 0
- set gvIntroSyncheTime to 3 * 60
- if voidp(SFX_EXT) then
- set SFX_EXT to ".aif"
- end if
- if voidp(MOV_EXT) then
- set MOV_EXT to ".dxr"
- end if
- if voidp(DIR_SYM) then
- if the machineType = IBM then
- set DIR_SYM to "\"
- else
- set DIR_SYM to ":"
- end if
- end if
- set gvBackSprite to 1
- set gvBonkBodySprite to 5
- set gvBonkHeadSprite to 6
- set gvBonkRightArmSprite to 7
- set gvPicSignSprite to 9
- set gvBonkLeftArmSprite to 10
- set gvVelmaSprite to 11
- set gvFrogSprite to 13
- set gvParrotSprite to 15
- set gvAlphabetStripSprite to 17
- set gvAlphaHiliteBoxSprite to 18
- set gvQuitButtonSprite to 20
- set gvRhySignSprite to 22
- set gvHelpSignSprite to 23
- set gvRedLetterSprite to 25
- set the visible of sprite gvAlphaHiliteBoxSprite to 0
- set the visible of sprite gvRedLetterSprite to 0
- set the mouseDownScript to EMPTY
- cursor(200)
- set the keyDownScript to "checkKeyForQuit"
- set the exitLock to 1
- end
-
- on stopMovie
- set the keyDownScript to EMPTY
- set the mouseDownScript to EMPTY
- set the timeoutScript to EMPTY
- end
-
- on idle
- if not checkForTop20() then
- if the frame < label("pause") then
- set the mouseDownScript to "mouseDownPrePause"
- cursor(0)
- else
- set the mouseDownScript to "mouseDownHandler"
- cursor(0)
- end if
- end if
- end
-
- on wait vTicks
- if vTicks > 0 then
- set vOrigTime to the timer
- repeat while the timer < (vOrigTime + vTicks)
- nothing()
- end repeat
- end if
- end
-
- on puppetsOn
- global gvAlphaHiliteBoxSprite, gvQuitButtonSprite, gvPicSignSprite, gvRhySignSprite, gvAlphabetStripSprite
- set the puppet of sprite gvAlphabetStripSprite to 1
- set the puppet of sprite gvAlphaHiliteBoxSprite to 1
- set the puppet of sprite gvQuitButtonSprite to 1
- set the puppet of sprite gvPicSignSprite to 1
- set the puppet of sprite gvRhySignSprite to 1
- set the immediate of sprite gvAlphabetStripSprite to 1
- updateStage()
- end
-
- on puppetsOff
- global gvAlphabetStripSprite
- repeat with viSprite = 1 to 48
- set the puppet of sprite viSprite to 0
- end repeat
- set the immediate of sprite gvAlphabetStripSprite to 0
- updateStage()
- end
-
- on mouseDownHandler
- global gvBackSprite, gvAlphabetStripSprite, gvQuitButtonSprite, gvHelpSignSprite
- setUpTop20()
- set the mouseDownScript to EMPTY
- cursor(200)
- set vSprite to the clickOn
- set vClickPoint to the clickLoc
- if vSprite = gvBackSprite then
- handleClickOnOtherStuff()
- else
- if vSprite = gvAlphabetStripSprite then
- handleClickInAlphabetStrip(the locH of vClickPoint, the locV of vClickPoint)
- else
- if vSprite = gvQuitButtonSprite then
- handleClickQuit()
- else
- if vSprite = gvHelpSignSprite then
- handleClickHelp()
- end if
- end if
- end if
- end if
- end
-
- on mouseDownPrePause
- global gvQuitButtonSprite, gvHelpSignSprite
- setUpTop20()
- set the mouseDownScript to EMPTY
- cursor(200)
- set vSprite to the clickOn
- if vSprite = gvQuitButtonSprite then
- handleClickQuit()
- else
- if vSprite = gvHelpSignSprite then
- handleClickHelp()
- end if
- end if
- end
-
- on checkForMouseDownOnSTOP
- global gvQuitButtonSprite
- set vfSTOP to 0
- if the mouseDown then
- if the mouseCast = the castNum of sprite gvQuitButtonSprite then
- set vfSTOP to 1
- end if
- end if
- return vfSTOP
- end
-
- on handleClickInAlphabetStrip vMouseH, vMouseV
- global gvCurLetter, gvAlphabetStrip, gvAlphaHiliteBoxSprite, gvBonkHeadSprite, SFX_EXT
- set vfOtherLetter to 0
- set vLetter to (vMouseH - 16) / 21
- if vLetter < 23 then
- set vfOtherLetter to 1
- set vLetter to 23
- else
- if vLetter > 25 then
- set vLetter to 25
- end if
- end if
- set the locH of sprite gvAlphaHiliteBoxSprite to (vLetter * 21) + 30
- updateStage()
- repeat while the stillDown
- set vLetter to (the mouseH - 16) / 21
- if vLetter < 23 then
- set vLetter to 23
- end if
- if vLetter > 25 then
- set vLetter to 25
- end if
- set the locH of sprite gvAlphaHiliteBoxSprite to (vLetter * 21) + 30
- updateStage()
- end repeat
- set vLetter to numToChar(charToNum("A") + vLetter)
- set gvCurLetter to vLetter
- if vfOtherLetter then
- puppetSound("1letter.aif")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- else
- flashRedLetter(gvCurLetter)
- puppetSound("1start.aif")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- fadeAway()
- end if
- end
-
- on flashRedLetter vLetter
- global gvRedLetterSprite
- set the castNum of sprite gvRedLetterSprite to the number of cast ("red" & vLetter)
- set the visible of sprite gvRedLetterSprite to 1
- updateStage()
- wait(15)
- set the visible of sprite gvRedLetterSprite to 0
- updateStage()
- end
-
- on animateChar vSprite, vWaitTime
- set vCharCast to the castNum of sprite vSprite
- set vCast to 1
- set vfBlink to 0
- repeat while soundBusy(1)
- if vCast < 3 then
- set the castNum of sprite vSprite to vCharCast + vCast
- updateStage()
- wait(vWaitTime)
- set the castNum of sprite vSprite to vCharCast
- updateStage()
- wait(vWaitTime)
- set vCast to vCast + 1
- else
- if vfBlink = 0 then
- set the castNum of sprite vSprite to vCharCast + vCast
- updateStage()
- wait(vWaitTime)
- set vfBlink to 1
- else
- set vfBlink to 0
- end if
- set vCast to 1
- end if
- if checkForMouseDownOnSTOP() then
- set the mouseDownScript to EMPTY
- cursor(200)
- handleClickQuit()
- abort()
- end if
- end repeat
- set the castNum of sprite vSprite to vCharCast
- updateStage()
- set the timeoutLapsed to 0
- end
-
- on doBlinkChar vSprite
- set vOrigCast to the castNum of sprite vSprite
- set the castNum of sprite vSprite to vOrigCast + 3
- updateStage()
- wait(10)
- set the castNum of sprite vSprite to vOrigCast
- updateStage()
- end
-
- on doFarmerPoint vPoint
- global gvBonkLeftArmSprite
- if vPoint then
- set the castNum of sprite gvBonkLeftArmSprite to the number of cast "Point1.pic"
- else
- set the castNum of sprite gvBonkLeftArmSprite to the number of cast "LeftArm.pic"
- end if
- updateStage()
- end
-
- on doFrogJump vHowHigh
- global gvFrogSprite
- set vOrigV to the locV of sprite gvFrogSprite
- set vOrigCast to the castNum of sprite gvFrogSprite
- set the castNum of sprite gvFrogSprite to the number of cast "FrogJump.pic"
- updateStage()
- wait(2)
- set the locV of sprite gvFrogSprite to vOrigV - vHowHigh
- updateStage()
- wait(10)
- set the locV of sprite gvFrogSprite to vOrigV
- set the castNum of sprite gvFrogSprite to vOrigCast
- updateStage()
- end
-
- on doParrotFlap
- global gvParrotSprite
- set vOrigCast to the castNum of sprite gvParrotSprite
- set the castNum of sprite gvParrotSprite to the number of cast "WingFlap.pic"
- updateStage()
- wait(20)
- set the castNum of sprite gvParrotSprite to vOrigCast
- updateStage()
- end
-
- on doVelmaArm vfArm
- global gvVelmaSprite
- if vfArm then
- set the castNum of sprite gvVelmaSprite to the number of cast "VelmaArm.pic"
- else
- set the castNum of sprite gvVelmaSprite to the number of cast "Velma1.pic"
- end if
- updateStage()
- end
-
- on doFarmerArm vfArm
- global gvBonkRightArmSprite
- if vfArm then
- set the castNum of sprite gvBonkRightArmSprite to the number of cast "FarmArm.pic"
- else
- set the castNum of sprite gvBonkRightArmSprite to the number of cast "RightArm.pic"
- end if
- updateStage()
- end
-
- on doVelmaPose
- global gvVelmaSprite
- set vOrigH to the locH of sprite gvVelmaSprite
- set vOrigCast to the castNum of sprite gvVelmaSprite
- set the castNum of sprite gvVelmaSprite to the number of cast "SveltVel.pic"
- set the locH of sprite gvVelmaSprite to vOrigH + 20
- updateStage()
- wait(40)
- set the locH of sprite gvVelmaSprite to vOrigH
- set the castNum of sprite gvVelmaSprite to vOrigCast
- updateStage()
- end
-
- on doFarmerWipe
- global gvBonkRightArmSprite
- set the castNum of sprite gvBonkRightArmSprite to the number of cast "WipeArm1.pic"
- updateStage()
- wait(5)
- set the castNum of sprite gvBonkRightArmSprite to the number of cast "WipeArm2.pic"
- updateStage()
- wait(20)
- set the castNum of sprite gvBonkRightArmSprite to the number of cast "WipeArm1.pic"
- updateStage()
- wait(5)
- set the castNum of sprite gvBonkRightArmSprite to the number of cast "RightArm.pic"
- updateStage()
- end
-
- on doIntroSpeech
- global SFX_EXT, gvBonkHeadSprite
- puppetSound("1intro1" & SFX_EXT)
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- darkenAlphaStrip()
- doFarmerPoint(1)
- puppetSound("1intro2" & SFX_EXT)
- moveAlphaBoxToLetter("X")
- flashRedLetter("X")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- puppetSound("1intro3" & SFX_EXT)
- moveAlphaBoxToLetter("Y")
- flashRedLetter("Y")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- puppetSound("1intro4" & SFX_EXT)
- moveAlphaBoxToLetter("Z")
- flashRedLetter("Z")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- doFarmerPoint(0)
- puppetSound("1intro5" & SFX_EXT)
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- moveAlphaBoxToLetter("X")
- updateStage()
- end
-
- on moveAlphaBoxToLetter vLetter
- global gvAlphaHiliteBoxSprite
- if (vLetter = "Z") or (vLetter = "z") then
- set vLetter to 25
- else
- if (vLetter = "Y") or (vLetter = "y") then
- set vLetter to 24
- else
- set vLetter to 23
- end if
- end if
- set the visible of sprite gvAlphaHiliteBoxSprite to 1
- set the locH of sprite gvAlphaHiliteBoxSprite to (vLetter * 21) + 30
- end
-
- on darkenAlphaStrip
- global gvAlphabetStripSprite
- set the castNum of sprite gvAlphabetStripSprite to the number of cast "AlphaStripDark"
- updateStage()
- end
-
- on handleClickQuit
- global gvQuitButtonSprite
- cursor(0)
- set the castNum of sprite gvQuitButtonSprite to the number of cast "quitButtonOn"
- updateStage()
- repeat while the stillDown
- nothing()
- end repeat
- set the castNum of sprite gvQuitButtonSprite to the number of cast "quitButton"
- updateStage()
- cursor(200)
- repeat with viSprite = 1 to 48
- set the puppet of sprite viSprite to 0
- updateStage()
- end repeat
- puppetSound(0)
- go("quit")
- end
-
- on handleClickHelp
- global gvHelpSignSprite, gvBonkHeadSprite, gvCurLetter, gvAlphaHiliteBoxSprite
- cursor(0)
- set the castNum of sprite gvHelpSignSprite to the number of cast "helpButtonOn"
- updateStage()
- repeat while the stillDown
- nothing()
- end repeat
- set the castNum of sprite gvHelpSignSprite to the number of cast "helpButton"
- updateStage()
- cursor(200)
- if the frame <> label("pause") then
- darkenAlphaStrip()
- moveAlphaBoxToLetter("X")
- go("pause")
- end if
- puppetSound("1ihelp.aif")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- end
-
- on handleClickOnOtherStuff
- global gvBonkHeadSprite, gvCurLetter
- puppetSound("1non.aif")
- updateStage()
- animateChar(gvBonkHeadSprite, 10)
- set gvCurLetter to "X"
- fadeAway()
- end
-