home *** CD-ROM | disk | FTP | other *** search
- on MediaControl
- global gMediaType
- if gMediaType = "Moov" then
- set the visible of sprite 46 to 0
- QTControl()
- else
- if gMediaType = "AIFF" then
- set the visible of sprite 46 to 1
- SoundControl()
- else
- alert("Sorry er is niets te zien of te horen")
- end if
- end if
- end
-
- on QTControl
- global ToParse, Chars1and2, Chars1to3, Char3, Chars4and5, gMedConOffsetH, gMedConOffsetV, gSpecNav, gHelper, QTVolume, CurMoovSprite, volSliderMin, volSliderScale
- set H to the mouseH - gMedConOffsetH
- set V to the mouseV - gMedConOffsetV
- if (the movieName <> "ZP.DIR") and (the movieName <> "KL.DIR") and (the movieName <> "MD.DIR") then
- gettheMarker()
- end if
- set gHelper to 0
- if V < 30 then
- if H < 30 then
- playMoovFW()
- exit
- end if
- if (H > 30) and (H < 50) then
- pauseMoov()
- exit
- end if
- if H > 50 then
- ToggleQTLoop()
- exit
- end if
- else
- if (V > 30) and (V < 60) then
- if H < 22 then
- PlayMoovBWFast()
- exit
- end if
- if (H > 22) and (H < 40) then
- stepMoovBW()
- exit
- end if
- if (H > 40) and (H < 58) then
- stepMoovFW()
- exit
- end if
- if H > 58 then
- playMoovFF()
- exit
- end if
- else
- UpdateVolume()
- end if
- end if
- end
-
- on InitQTcontrol
- global moovLength, sliderStart, sliderEnd, moovSliderScale, VolSliderMax, volSliderMin, QTVolume, volSliderScale, CurMoovSprite, gMediaType
- set gMediaType to "Moov"
- set moovLength to the duration of cast the castNum of sprite integer(CurMoovSprite)
- set sliderStart to the left of sprite 44 + 2
- set sliderEnd to the right of sprite 44 - 5
- set moovSliderScale to moovLength / (sliderEnd - sliderStart)
- set VolSliderMax to the right of sprite 44 - 3
- set volSliderMin to the left of sprite 44 + 4
- set volSliderScale to 255.0 / (VolSliderMax - volSliderMin)
- set the constraint of sprite 45 to 44
- set the locV of sprite 45 to 472
- set the locH of sprite 45 to VolSliderMax - 3
- set QTVolume to the locH of sprite 45
- updateStage()
- end
-
- on QTEnterFrameScript
- global moovLength, QTVolume, gMediaType
- puppetSprite(45, 1)
- DispQTControls()
- set the constraint of sprite 45 to 44
- if not (the controlDown) then
- set the locH of sprite 45 to QTVolume
- else
- updateVidShuttle()
- end if
- if moovLength = EMPTY then
- InitQTcontrol()
- end if
- end
-
- on QTFaderScriptMouseDown
- repeat while the stillDown
- if the controlDown then
- ShuttleSlider()
- next repeat
- end if
- VolumeControl()
- end repeat
- end
-
- on QTFaderScriptMouseUp
- global CurMoovSprite, volSliderMin, volSliderScale
- if not (the controlDown) then
- set the volume of sprite integer(CurMoovSprite) to (the locH of sprite 45 - volSliderMin) * volSliderScale
- end if
- end
-
- on UpdateVolume
- global QTVolume, CurMoovSprite, volSliderMin, volSliderScale
- if the mouseH > 637 then
- set the locH of sprite 45 to 637
- else
- if the mouseH < 565 then
- set the locH of sprite 45 to 564
- else
- set the locH of sprite 45 to the mouseH
- end if
- end if
- set QTVolume to the locH of sprite 45
- set the locV of sprite 45 to 472
- updateStage()
- set the volume of sprite integer(CurMoovSprite) to (the locH of sprite 45 - volSliderMin) * volSliderScale
- end
-
- on updateVidShuttle
- global moovLength, sliderStart, moovSliderScale, CurMoovSprite
- set sliderMover to (the movieTime of sprite integer(CurMoovSprite) / moovSliderScale) + sliderStart
- if sliderMover > 637 then
- set sliderMover to 637
- else
- set the locH of sprite 45 to sliderMover
- end if
- set the locV of sprite 45 to 472
- updateStage()
- end
-
- on stepMoovBW
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set the movieRate of sprite integer(CurMoovSprite) to 0
- set the movieTime of sprite integer(CurMoovSprite) to the movieTime of sprite integer(CurMoovSprite) - 10
- end
-
- on playMoovBW
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set the movieRate of sprite integer(CurMoovSprite) to -1
- end
-
- on PlayMoovBWFast
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set the movieRate of sprite integer(CurMoovSprite) to -2
- end
-
- on pauseMoov
- global CurMoovSprite
- if (the castNum of sprite integer(CurMoovSprite) <> 0) and (the castNum of sprite integer(CurMoovSprite) <> -1) then
- if the castType of cast the castNum of sprite integer(CurMoovSprite) = #digitalVideo then
- set the movieRate of sprite integer(CurMoovSprite) to 0
- end if
- end if
- end
-
- on playMoovFW
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set CurMoovSprite to integer(CurMoovSprite)
- if (the castNum of sprite CurMoovSprite <> 0) and (the castNum of sprite CurMoovSprite <> -1) then
- if the castType of cast the castNum of sprite CurMoovSprite = #digitalVideo then
- if the movieTime of sprite CurMoovSprite = the stopTime of sprite CurMoovSprite then
- set the movieTime of sprite CurMoovSprite to the startTime of sprite CurMoovSprite
- end if
- if chars(the movieName, 1, 2) = "JG" then
- set the volume of sprite 30 to 255
- end if
- if the movieRate of sprite CurMoovSprite <> 1 then
- set the movieRate of sprite CurMoovSprite to 1
- end if
- end if
- end if
- end
-
- on playMoovFF
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set the movieRate of sprite integer(CurMoovSprite) to 2
- end
-
- on stepMoovFW
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set the movieRate of sprite integer(CurMoovSprite) to 0
- set the movieTime of sprite integer(CurMoovSprite) to the movieTime of sprite integer(CurMoovSprite) + 12
- end
-
- on ToggleQTLoop
- global CurMoovSprite
- if voidp(CurMoovSprite) or (CurMoovSprite = EMPTY) then
- set CurMoovSprite to 30
- end if
- set the loop of cast the castNum of sprite integer(CurMoovSprite) to not (the loop of cast the castNum of sprite integer(CurMoovSprite))
- end
-
- on ShuttleSlider
- global moovLength, sliderStart, sliderEnd, moovSliderScale, CurMoovSprite
- repeat while the mouseDown and the controlDown
- set originalMovieRate to the movieRate of sprite integer(CurMoovSprite)
- set the movieRate of sprite integer(CurMoovSprite) to 0
- repeat while the stillDown
- if the mouseH > 637 then
- set the locH of sprite 45 to 637
- else
- if the mouseH < 565 then
- set the locH of sprite 45 to 564
- else
- set the locH of sprite 45 to the mouseH
- end if
- end if
- set the movieTime of sprite integer(CurMoovSprite) to (the locH of sprite 45 - sliderStart) * moovSliderScale
- updateStage()
- end repeat
- end repeat
- set the movieRate of sprite integer(CurMoovSprite) to originalMovieRate
- end
-
- on VolumeControl
- global volSliderScale, volSliderMin, QTVolume, CurMoovSprite
- puppetSprite(45, 1)
- set the castNum of sprite 45 to the number of cast "fader"
- set the locH of sprite 45 to QTVolume
- updateStage()
- repeat while the stillDown
- UpdateVolume()
- end repeat
- updateStage()
- set QTVolume to the locH of sprite 45
- end
-
- on SoundControl
- global curSoundName, SoundVolume, gMediaType, gMedConOffsetH, gMedConOffsetV, gSpecNav, volSliderMin, volSliderScale, gSoundLoop
- set H to the mouseH - gMedConOffsetH
- set V to the mouseV - gMedConOffsetV
- set gHelper to 0
- if V < 30 then
- if H < 30 then
- if the number of cast curSoundName = -1 then
- sound playFile 1, curSoundName
- exit
- else
- puppetSound(curSoundName)
- exit
- end if
- end if
- if (H > 30) and (H < 50) then
- if soundBusy(1) then
- sound stop 1
- end if
- puppetSound(0)
- set gSoundLoop to 0
- exit
- end if
- if H > 50 then
- ToggleSoundLoop()
- exit
- end if
- else
- UpdateSoundLevel()
- end if
- end
-
- on InitSoundControl
- global sliderStart, sliderEnd, VolSliderMax, volSliderMin, SoundVolume, volSliderScale, curSoundName, gMediaType
- set gMediaType to "AIFF"
- set VolSliderMax to the right of sprite 44 - 3
- set volSliderMin to the left of sprite 44 + 4
- set volSliderScale to 255.0 / (VolSliderMax - volSliderMin)
- set the constraint of sprite 45 to 44
- set the locV of sprite 45 to 472
- set the locH of sprite 45 to VolSliderMax - 3
- set SoundVolume to the locH of sprite 45
- set the visible of sprite 46 to 1
- puppetSprite(45, 1)
- updateStage()
- end
-
- on SoundEnterFrameScript
- global curSoundName, SoundVolume, gMediaType, gSoundLoop
- set gMediaType to "AIFF"
- puppetSprite(45, 1)
- set the constraint of sprite 45 to 44
- set the locH of sprite 45 to SoundVolume
- set the locV of sprite 45 to 472
- DispAudioControls()
- if (gSoundLoop = 1) and (soundBusy(1) = 0) then
- if the number of cast curSoundName = -1 then
- sound playFile 1, curSoundName
- exit
- else
- puppetSound(curSoundName)
- exit
- end if
- end if
- if voidp(curSoundName) then
- InitSoundControl()
- end if
- end
-
- on SoundFaderMouseDown
- repeat while the stillDown
- SoundLevelControl()
- end repeat
- end
-
- on SoundFaderMouseUp
- global curSoundName, volSliderMin, volSliderScale
- set the volume of sound 1 to (the locH of sprite 45 - volSliderMin) * volSliderScale
- end
-
- on SoundLevelControl
- global volSliderScale, volSliderMin, curSoundName, SoundVolume, FaderCastNum
- puppetSprite(45, 1)
- set the castNum of sprite 45 to FaderCastNum
- set the locH of sprite 45 to SoundVolume
- updateStage()
- repeat while the stillDown
- UpdateSoundLevel()
- end repeat
- updateStage()
- puppetSprite(45, 0)
- set SoundVolume to the locH of sprite 45
- end
-
- on UpdateSoundLevel
- global curSoundName, volSliderMin, volSliderScale, SoundVolume
- if the mouseH > 637 then
- set the locH of sprite 45 to 637
- else
- if the mouseH < 565 then
- set the locH of sprite 45 to 564
- else
- set the locH of sprite 45 to the mouseH
- end if
- end if
- set SoundVolume to the locH of sprite 45
- set the locV of sprite 45 to 472
- updateStage()
- set the volume of sound 1 to (the locH of sprite 45 - volSliderMin) * volSliderScale
- end
-
- on ToggleSoundLoop
- global gSoundLoop, curSoundName
- if gSoundLoop = 1 then
- set gSoundLoop to 0
- sound stop 1
- else
- set gSoundLoop to 1
- end if
- end
-
- on CycleNextMoov
- global MoreMoovs, gNext, CurMoovSprite, GignorRest, nowPlaying, gReturnList, gMediaType
- set CurMoovSprite to integer(CurMoovSprite) + 1
- if the castNum of sprite CurMoovSprite <> 0 then
- if the castType of cast the castNum of sprite CurMoovSprite = #digitalVideo then
- DispQTControls()
- set GignorRest to 1
- set gNext to 0
- set the movieRate of sprite (CurMoovSprite - 1) to 0
- set the visible of sprite (CurMoovSprite - 1) to 0
- set the visible of sprite 29 to 1
- set the visible of sprite CurMoovSprite to 1
- set the volume of sprite CurMoovSprite to 255
- updateStage()
- set nowPlaying to 1
- if the movieRate of sprite CurMoovSprite <> 1 then
- playMoovFW()
- end if
- end if
- else
- HideRandoms()
- set MoreMoovs to EMPTY
- set GignorRest to EMPTY
- set gNext to 0
- gettheMarker()
- LocalUp()
- end if
- end
-
- on ExitVideoThirty
- if the castNum of sprite 30 <> 0 then
- if the castType of cast the castNum of sprite 30 = #digitalVideo then
- set the visible of sprite 30 to 0
- HideAudioControls()
- puppetSprite(30, 0)
- set the movieRate of sprite 30 to 0
- set the movieTime of sprite 30 to 0
- set the loop of cast the castNum of sprite 30 to 0
- end if
- end if
- if the castNum of sprite 29 <> 0 then
- set the visible of sprite 29 to 0
- end if
- end
-
- on reWindAllMoovs
- repeat with i = 30 to 33
- if (the castNum of sprite i <> 0) and (the castNum of sprite i <> -1) then
- if the castType of cast the castNum of sprite i = #digitalVideo then
- set the movieTime of sprite i to 0
- end if
- end if
- end repeat
- end
-
- on StopAllMoovs
- repeat with i = 30 to 33
- if (the castNum of sprite i <> 0) and (the castNum of sprite i <> -1) then
- if the castType of cast the castNum of sprite i = #digitalVideo then
- set the movieRate of sprite i to 0
- end if
- end if
- end repeat
- end
-
- on ToggleLoopAllMoovs
- repeat with i = 30 to 33
- if (the castNum of sprite i <> 0) and (the castNum of sprite i <> -1) then
- if the castType of cast the castNum of sprite i = #digitalVideo then
- set the loop of cast the castNum of sprite i to 0
- end if
- end if
- end repeat
- end
-
- on hideAllMoovs
- if the castNum of sprite 29 <> 0 then
- set the visible of sprite 29 to 0
- end if
- repeat with i = 30 to 33
- if (the castNum of sprite i <> 0) and (the castNum of sprite i <> -1) then
- if the castType of cast the castNum of sprite i = #digitalVideo then
- set the visible of sprite i to 0
- end if
- end if
- end repeat
- end
-
- on CleanVidExit
- set the visible of sprite 29 to 0
- repeat with i = 30 to 33
- if (the castNum of sprite i <> 0) and (the castNum of sprite i <> -1) then
- if the castType of cast the castNum of sprite i = #digitalVideo then
- set the visible of sprite i to 0
- set the movieRate of sprite i to 0
- set the movieTime of sprite i to 0
- set the loop of cast the castNum of sprite i to 0
- end if
- next repeat
- end if
- exit
- end repeat
- end
-
- on MultiMediaEnterFrameScript
- global nowPlaying, gMediaType
- ToggleControls()
- if nowPlaying = 1 then
- if gMediaType = "moov" then
- DispQTControls()
- QTEnterFrameScript()
- end if
- if gMediaType = "AIFF" then
- DispAudioControls()
- SoundEnterFrameScript()
- end if
- else
- HideAudioControls()
- end if
- end
-