home *** CD-ROM | disk | FTP | other *** search
- --on ButtonDown doWhat
- -- put the clickon into MySprite
- --
- -- puppetSprite MySprite, False
- -- go the frame
- --
- -- put "interface 50%" into UpSound
- -- put "interface 6 25%" into DownSound
- --
- -- UpdateStage
- -- put the castnum of sprite MySprite into UpCast
- -- put UpCast + 10 into DownCast
- --
- -- PuppetSprite MySprite, True
- --
- -- put True into OnMe
- -- put True into isUp
- --
- -- repeat while the stillDown
- -- Idle
- -- put RollOver(MySprite) into OnMe
- --
- -- if OnMe then
- -- set the castNum of sprite MySprite to DownCast
- -- if isUp then
- -- PlayAsync(DownSound)
- -- put False into isUp
- -- end if
- --
- -- else
- -- set the castNum of sprite MySprite to UpCast
- -- if not isUp then
- -- --PlaySync(UpSound)
- -- put True into isUp
- -- end if
- --
- -- end if
- --
- -- UpdateStage
- -- end repeat
- --
- -- puppetSprite MySprite, False
- -- UpdateStage
- --
- -- if OnMe and not VoidP(doWhat) then do doWhat
- --
- -- if not isUp then
- -- -- PlaySync(UpSound)
- -- put True into isUp
- -- end if
- --
- --
- --end
- --
- --on PlayAsync WhatSound
- -- if not VoidP( WhatSound) then
- -- PuppetSound WhatSound
- -- UpdateStage
- -- end if
- --end
- --
- --On PlaySync WhatSound
- -- PuppetSound WhatSound
- -- UpdateStage
- -- repeat while soundbusy(1)
- -- UpdateStage
- -- end repeat
- -- PuppetSound 0
- --end
- --
- --on goHome
- -- ResetAudio
- -- EndPlay
- --end
- --
- --on SetVisit Where
- -- Global gSections
- -- CheckSectionHits
- -- SetProp(gSections, Where, 1)
- --end
- --
- --on CheckSectionHits
- -- global gSections
- -- if voidP(gSections) then set gSections = [#context:0,#resell:0, #invest:0, #partner:0, #program:0 ]
- --end
- --
- --on UpdateSectionHits
- -- Global gSections
- -- repeat with i = 1 to 5
- -- set visited = getAt(gSections,i )
- -- if visited then
- -- put i + 22 into MySprite
- -- PuppetSprite MySprite, True
- -- set the castNum of sprite MySprite to (i + 70)
- -- end if
- -- end repeat
- --end
- --
- --on GoSection WhatSection
- -- put marker( WhatSection) into LoadFrom
- --
- -- cursor 4
- -- Preload LoadFrom, LoadFrom + 6
- -- cursor -1
- --
- -- go WhatSection
- --end
- --
- --on ZeroSync
- -- ClearMovieSync
- --end
- --
- --on WaitForSecondsToRound
- -- cursor 4
- -- put GetSeconds() into StartSecs
- -- repeat while GetSeconds() = StartSecs
- -- UpdateStage
- -- end repeat
- -- cursor -1
- --end
- --
- --on StartSync FPS
- -- Global gHardSync, gStartDev, gFPS, gStartFrame, gStartTime, gLastTime, gSyncableMovie
- -- Global gLoopNeedsStarting
- --
- -- put true into gSyncableMovie
- -- put float(FPS) into gFPS
- -- resetAudio
- -- put GetSeconds() into gStartDev
- -- put gStartDev into gHardSync
- -- put gStartDev into gLastTime
- --
- -- put the frame + 1 into gStartFrame
- -- put the ticks into gStartTime
- --
- -- WaitForSecondsToRound
- --
- -- CheckHardSync
- -- SyncTicksToFrame
- --
- -- put true into gLoopNeedsStarting
- --
- --end
- --
- --on SyncTicksToFrame
- -- Global gStartTime, gFPS
- -- put the ticks - ((the frame / gFPS) * 60.0) into gStartTime
- --end
- --
- --on SyncFrametoTicks
- -- Global gStartTime, gFPS, gStartFrame, gSyncableMovie
- -- if gSyncableMovie then
- -- CheckHardSync
- -- CheckRollover
- --
- -- put integer((((the ticks - gStartTime)/60.0) * gFPS) + gStartFrame) into requestedFrame
- -- go frame requestedFrame
- -- end if
- --end
- --
- --on CheckHardSync
- -- Global gStartTime, gHardSync, gLastTime, gFPS, gStartDev, gStartFrame
- --
- -- put GetSeconds() into MySeconds
- --
- -- put MySeconds - gLastTime into Deviation
- --
- -- if Deviation < 0 then put Deviation + 60 into Deviation
- -- put deviation + gHardSync into gHardSync
- --
- -- if Deviation <> 0 then
- -- put (gHardSync - gStartDev) * gFPS into NewFrame
- -- put (NewFrame + gStartFrame - gFPS) into requestedFrame
- -- put abs(the frame - requestedFrame) into FrameDiff
- -- if FrameDiff > 12 then
- -- go frame requestedFrame
- -- SyncTicksToFrame
- -- Put "Needed Sync!" && FrameDiff
- -- end if
- -- end if
- --
- -- put MySeconds into gLastTime
- --end
- --
- --on GetSeconds
- -- put the long time into MyTime
- -- set the itemDelimiter to ":"
- -- put value(word 1 of item 3 of MyTime) into MySeconds
- -- return MySeconds
- --end
- --
- --on CheckRollover
- -- CheckRoll(32)
- -- CheckRoll(33)
- -- CheckRoll(34)
- -- CheckRoll(35)
- --end
- --
- --on CheckRoll WhichSprite
- -- if rollover(WhichSprite) then
- -- SetCast(WhichSprite, 939 + WhichSprite)
- -- else
- -- SetCast(WhichSprite, 919 + WhichSprite)
- -- PuppetSprite WhichSprite, False
- -- end if
- --end
- --
- --on SetCast WhichSprite, WhatCast
- -- PuppetSprite WhichSprite, True
- -- set the castNum of sprite WhichSprite to WhatCast
- --end
- --
- --on PauseMovie
- -- cursor 4
- -- if MovieIsPresent() then set the movieRate of sprite 48 to False
- -- cursor -1
- --end
- --
- --on unPauseMovie
- -- cursor 4
- -- if MovieIsPresent() then set the movieRate of sprite 48 to True
- -- cursor -1
- --end
- --
- --on TogglePause
- -- if MovieIsPresent() then set the movieRate of sprite 48 to not the movieRate of sprite 48
- --end
- --
- --on MovieIsPresent
- -- return the castNum of sprite 48
- --end
- --
- --on ResetAudio
- -- sound stop 0
- -- sound stop 1
- -- sound stop 2
- -- PuppetSound 1, 0
- -- PuppetSound 2, 0
- -- PuppetSound 0
- -- UpdateStage
- --end