home *** CD-ROM | disk | FTP | other *** search
- --on StartMovie
- -- Global gNeedsStarting, gSyncToFrame,gpausetime, gDwnSnd
- -- clearglobals
- --
- -- put true into gNeedsStarting
- -- put true into gSyncToFrame
- -- put 2000 into gpausetime
- --
- -- set the cursor of sprite 5 to [1,2]
- -- set the cursor of sprite 6 to [1,2]
- -- set the cursor of sprite 7 to [1,2]
- --
- -- set the volume of sound 2 to 200
- -- set the volume of sound 3 to 150
- -- set the volume of sound 1 to 255
- --
- -- repeat with i = 11 to 16
- -- set the cursor of sprite i to [1,2]
- -- end repeat
- --
- -- preLoadMember member "button.aif"
- -- put the number of member "button.aif" into gDwnSnd
- --
- -- set the exitLock to TRUE
- --end
- --
- --on keyDown
- -- if the optionDown and the key = "Q" and the exitLock = TRUE then
- -- clearSprites
- -- if the castNum of sprite 48 then pauseMovie
- -- go "quitFrame"
- -- end if
- --end
- ----------------------------------------------------------------
- --
- --on ButtonDown DoWhat
- -- global gFrame
- -- put the clickon into MySprite
- -- put mysprite + 6 into flashsprite
- -- put the castNum of sprite MySprite into rollstate
- -- put the castNum of sprite flashsprite into flashupstate
- -- put rollstate + 1 into DownState
- -- put downstate - 2 into upState
- -- if not(the name of member flashupstate contains ".on") then
- -- put flashupstate + 1 into flashdownstate -- the green lights
- -- --put "buttondown"
- -- else
- -- put flashupstate into flashdownstate
- -- end if
- --
- -- PuppetSprite MySprite, True
- -- puppetsprite flashsprite, True
- -- put True into DoMe
- -- repeat while the stillDown
- -- put Rollover(MySprite) into DoMe
- -- if DoMe then
- -- set the castNum of sprite MySprite to DownState
- -- set the castnum of sprite flashsprite to flashdownstate
- -- else
- -- set the castNum of sprite MySprite to rollstate
- -- set the castNum of sprite flashsprite to flashupstate
- -- end if
- -- UpdateStage
- -- end repeat
- --
- -- puppetsprite 10, false -- this turns off the rollover preview in QT area
- -- PuppetSprite MySprite, False
- -- puppetsprite flashsprite, false
- -- UpdateStage
- --
- -- -- repeat while soundBusy(1) or soundBusy(2)
- -- -- nothing
- -- -- end repeat
- --
- -- if DoMe then
- -- clearSprites
- -- if the castNum of sprite 48 then pauseMovie
- -- put the ticks into temp
- -- repeat while the ticks < temp + 60
- -- updateStage
- -- end repeat
- --
- -- if not VoidP(DoWhat) then do DoWhat
- --
- -- else
- -- if the castNum of sprite 48 then unpauseMovie
- -- end if
- --end ButtonDown
- --
- ----------------------------------------------------------------
- --on BulletDown DoWhat
- --
- -- put the clickon into MySprite
- --
- -- put the castNum of sprite MySprite into rollstate
- --
- -- --put the name of member rollstate
- -- put rollstate + 1 into DownState
- -- put rollstate - 1 into upState
- --
- -- if the clickon = 23 then -- special case for restart button
- -- put 65 into rollstate -- cast numbers for restart buttons
- -- put 67 into DownState
- -- put 66 into upState
- -- end if
- --
- -- PuppetSprite MySprite, True
- -- put True into DoMe
- -- repeat while the stillDown
- -- put Rollover(MySprite) into DoMe
- -- if DoMe then
- -- set the castNum of sprite MySprite to DownState
- -- else
- -- set the castNum of sprite MySprite to rollstate
- -- end if
- -- UpdateStage
- -- end repeat
- --
- -- puppetsprite 9, false
- -- puppetsprite 10, false -- this turns off the rollover preview in QT area
- -- PuppetSprite MySprite, False --turn off the clicked button
- --
- -- UpdateStage
- -- if DoMe then
- -- if the castnum of sprite 48 then
- -- pauseMovie
- -- puppetSound 1, "button.aif"
- -- updateStage
- -- end if
- --
- -- repeat while soundBusy(1)
- -- updateStage
- -- end repeat
- --
- -- if not VoidP(DoWhat) then do DoWhat
- -- end if
- --end BulletDown
- --
- ----------------------------------------------------------------
- --On PlayAsync TheCastName
- -- puppetSound TheCastName
- -- UpdateStage
- --end PlayAsync
- --
- ----------------------------------------------------------------
- --On PlaySync TheCastName
- -- PlayAsync TheCastName
- -- repeat while soundBusy(1)
- -- UpdateStage
- -- end repeat
- -- PuppetSound 0
- --end PlaySync
- --
- ----------------------------------------------------------------
- --on MoveTo WhichSprite, StartPoint, EndPoint, Steps
- -- PuppetSprite WhichSprite, True
- -- put getAt(StartPoint, 1) into startX
- -- put getAt(StartPoint, 2) into startY
- -- put getAt(EndPoint, 1) into endX
- -- put getAt(EndPoint, 2) into endY
- --
- -- put "Playing from original"
- --
- -- put (endX - startX)/float(steps) into PixPerStepX
- -- put (endy - startY)/float(steps) into PixPerStepY
- --
- -- repeat with n = 1 to Steps
- -- put StartX + (n * PixPerStepX) into NewX
- -- put StartY + (n * PixPerStepY) into NewY
- -- set the locH of sprite WhichSprite to NewX
- -- set the locV of sprite WhichSprite to NewY
- -- UpdateStage
- -- end repeat
- --end MoveTo
- --
- ----------------------------------------------------------------
- --on UpdateVolume
- -- put the SoundLevel into SL
- -- put the top of sprite 5 into TheTop
- -- put the Bottom of sprite 5 into TheBottom
- -- put TheBottom - TheTop into tDist
- -- put SL/7.0 into VDist
- -- put TheBottom - (VDist *tDist) into NewV
- -- PuppetSprite 8, True
- -- set the LocV of sprite 8 to NewV
- -- UpdateStage
- -- if the frame <> 1 then beep
- --end
- --
- --on PauseMovie
- -- Global gPause
- -- put True into gPause
- -- UpdatePause
- --end
- --
- --on UnPauseMovie
- -- Global gPause
- -- put False into gPause
- -- UpdatePause
- --end
- --
- --on VerifyFrame Where
- -- Global gSyncToFrame, gPause, gNeedsStarting, gFrameDir
- -- if the castnum of sprite 48 then
- -- put Marker(0) into MOffset
- -- put count(Where) into NoItems
- -- put the movieTime of sprite 48 into MyPoint
- -- put the movieRate of sprite 48 into AmRunning
- -- put the frame into MyFrame
- --
- -- if gSyncToFrame then
- --
- -- if MyPoint < 0 and gFrameDir = -1 then --? for CJ: why reset QT?
- -- -- pauseMovie
- -- -- go marker(-1)
- -- -- unpauseMovie
- -- else
- -- put gFrameDir into NewPos
- -- put MyFrame - MOffset + NewPos into MyRel
- -- if MyRel < 1 then put 1 into MyRel
- -- if MyRel > NoItems then put NoItems into MyRel
- --
- -- put GetAt(Where, MyRel) into NewTime
- -- put the duration of cast the castnum of sprite 48 into MaxTime
- -- if NewTime > MaxTime then put MaxTime- 3 into NewTime
- -- put "Point:" & MyRel && NewTime
- --
- -- PauseMovie
- -- set the movieTime of sprite 48 to NewTime
- -- unPauseMovie
- -- set gPause = 1
- -- end if
- -- put False into gSyncToFrame
- --
- -- else
- -- repeat with n = 1 to NoItems
- -- put GetAt(Where, n) into CheckTime
- -- if CheckTime >= MyPoint then exit repeat
- -- end repeat
- -- go (n + MOffset - 1)
- -- end if
- --
- -- if gPause then
- -- goto the frame
- -- else
- -- if the castnum of sprite 48 then
- -- put the duration of cast the castnum of sprite 48 into MyDur
- -- if MyPoint >= MyDur then
- -- go marker(1)
- -- abort
- -- else
- -- go the frame
- -- end if
- -- end if
- -- end if
- -- end if
- --end verifyFrame
- --
- ----------------------------------------------------------------
- --on isMovie WhatSprite
- -- put the castnum of sprite 48 into IsTrue
- -- return IsTrue
- --end
- ----------------------------------------------------------------
- --on doExit
- -- if isMovie(48) then PauseMovie
- -- quit
- --end
- ----------------------------------------------------------------
- --on doHelp
- -- Alert "Not available"
- --end
- ----------------------------------------------------------------
- --on doPrev
- -- Global gSyncToFrame, gNeedsStarting, gFrameDir
- -- put true into gNeedsStarting
- -- put true into gSyncToFrame
- -- PauseMovie
- -- put -1 into gFrameDir
- --end
- ----------------------------------------------------------------
- --on doNext
- -- Global gSyncToFrame, gNeedsStarting, gFrameDir
- -- put true into gNeedsStarting
- -- put true into gSyncToFrame
- -- PauseMovie
- -- put 1 into gFrameDir
- --end
- ----------------------------------------------------------------
- --on DoPause
- -- Global gPause
- -- put not gPause into gPause
- -- UpdatePause
- --end
- ----------------------------------------------------------------
- --on UpdatePause
- -- Global gPause
- -- if the castNum of sprite 48 then
- -- set the movieRate of sprite 48 to not gPause
- -- end if
- --end
- --
- ----------------------------------------------------------------
- --on UpVol
- -- put the soundlevel into SL
- -- put SL + 1 into SL
- -- set the soundLevel to SL
- -- UpdateVolume
- --end
- ----------------------------------------------------------------
- --on DownVol
- -- put the soundlevel into SL
- -- put SL - 1 into SL
- -- set the soundLevel to SL
- -- UpdateVolume
- --end
- --
- ----------------------------------------------------------------
- --on HandleKeys
- -- Global gMPointer
- -- if the Key = " " then
- -- if the movierate of sprite 48 then
- -- if not ListP(gMPointer) then put [] into gMPointer
- -- add(gMPointer, the movieTime of sprite 48)
- -- put gMPointer
- -- end if
- -- end if
- --end HandleKeys
- ----------------------------------------------------------------
- --on clearSprites
- -- repeat with i = 1 to 48
- -- if (i <> the clickOn) then puppetsprite i, false
- -- end repeat
- --end
- ----------------------------------------------------------------
- --on goto where
- -- --put "go:"&where
- -- go where
- --end
- --
-