home *** CD-ROM | disk | FTP | other *** search
- global gActiveWin, gWinType, gNewCaption, gAssetPath, gPDL, gTheName, gTheNewWinht, gTheNewWinwd, gMovieIncr, gWinListNum, gMyWinTracker, gtheLockList, gtheSearchWord, gtheWord, gImageList, gTheVidTime, gSliderIncr, gtheNewIncr, gTheTime, gSliderMin, gSliderMax, gVidIsPlaying
-
- on startMovie
- setAt(gImageList, gWinListNum, gTheName)
- setAt(gMyWinTracker, gWinListNum, 1)
- setAt(gtheLockList, gWinListNum, 0)
- set the volume of sprite 9 to 255
- puppetSprite(4, 1)
- set vTrekCursor to the number of cast "trekcursFG"
- cursor([vTrekCursor, vTrekCursor + 1])
- end
-
- on hSetBlankCast
- set the fileName of cast "BlankQ.MOV" to the pathName & "BL" & gPDL & "BlankQ.MOV"
- end
-
- on closeWindow
- set gVidIsPlaying to 0
- set gActiveWin to the pathName & the movieName
- setAt(gImageList, 11, EMPTY)
- setAt(gMyWinList, 11, EMPTY)
- setAt(gMyWinTracker, 11, 0)
- setAt(gtheLockList, 11, 0)
- forget(window string(gActiveWin))
- tell the stage
- hRestoreSpeech()
- end tell
- end
-
- on hDisplayVideo
- tell the stage
- hStopListening()
- end tell
- hGettheQT()
- hgetCaption()
- end
-
- on hGettheQT
- set LFirstChar to char 1 of string(gTheName)
- set gPath to gAssetPath
- set the fileName of cast "BlankQ.MOV" to gPath & LFirstChar & gPDL & gTheName & "1Q.MOV"
- set gTheVidTime to the duration of cast "BlankQ.MOV"
- put "the video length is " & gTheVidTime && "ticks"
- set gSliderIncr to 201.0 / (gTheVidTime + 0.0)
- set gMovieIncr to (gTheVidTime + 0.0) / 201.0
- set gSliderMin to the left of sprite 3 + 3
- set gSliderMax to the right of sprite 3 - 3
- put "the Control Increment is" && gSliderIncr
- set gtheNewIncr to gSliderIncr
- end
-
- on hgetCaption
- set the text of field "caption" to string(gNewCaption)
- end
-
- on hWatchVideo
- if the locH of sprite 4 = gSliderMax then
- go(the frame)
- exit
- end if
- set gTheTime to the movieTime of sprite 9
- set the locH of sprite 4 to gSliderMin + (gTheTime * gSliderIncr)
- go(the frame)
- end
-
- on hLockMe
- if getaProp(gtheLockList, 11) = 0 then
- puppetSprite(7, 1)
- set the castNum of sprite 7 to the number of cast "lock" + 1
- updateStage()
- setAt(gtheLockList, 11, 1)
- else
- puppetSprite(7, 0)
- updateStage()
- setAt(gtheLockList, 11, 0)
- end if
- end
-
- on hReWind
- if the locH of sprite 4 = gSliderMin then
- exit
- end if
- set the locH of sprite 4 to gSliderMin
- puppetSprite(12, 0)
- puppetSprite(13, 0)
- updateStage()
- puppetSprite(11, 1)
- set the castNum of sprite 11 to the number of cast (the castNum of sprite 11 + 1)
- updateStage()
- set the movieRate of sprite 9 to 0
- set the movieTime of sprite 9 to 1
- set gVidIsPlaying to 1
- tell the stage
- hStopListening()
- end tell
- end
-
- on hPlayQT
- tell the stage
- hStopListening()
- end tell
- puppetSprite(11, 0)
- puppetSprite(13, 0)
- updateStage()
- puppetSprite(12, 1)
- set the castNum of sprite 12 to the number of cast "PlayButton" + 1
- updateStage()
- set the movieRate of sprite 9 to 1
- set gVidIsPlaying to 1
- end
-
- on hStopQT
- if the movieRate of sprite 9 = 0 then
- exit
- end if
- puppetSprite(11, 0)
- puppetSprite(12, 0)
- updateStage()
- puppetSprite(13, 1)
- set the castNum of sprite 13 to the number of cast (the castNum of sprite 13 + 1)
- updateStage()
- set the movieRate of sprite 9 to 0
- set gVidIsPlaying to 0
- tell the stage
- hRestoreSpeech()
- end tell
- end
-
- on hSlideTheHead
- set the movieRate of sprite 9 to 0
- set gVidIsPlaying to 0
- set the constraint of sprite 4 to 2
- repeat while the stillDown
- set the locH of sprite 4 to the mouseH
- updateStage()
- set the movieTime of sprite 9 to gMovieIncr * (the mouseH - gSliderMin)
- set the mouseUpScript to "hSetTheHead"
- end repeat
- end
-
- on hSetTheHead
- hPlayQT()
- if the locH of sprite 4 > 244 then
- set the locH of sprite 4 to 245
- end if
- set LtheNewLocH to the locH of sprite 4
- set the movieTime of sprite 9 to (LtheNewLocH - gSliderMin) * gMovieIncr
- set the movieRate of sprite 9 to 1
- set gVidIsPlaying to 1
- set the mouseUpScript to "nothing"
- end
-
- on hGetWord
- global gtheWord
- set x to the mouseCast
- set y to the mouseWord
- if (x > 0) and (y > 0) then
- set gtheWord to word y of field x
- tell the stage
- hFindCaptionWord()
- end tell
- end if
- end
-
- on hGetLine
- global gtheLine
- set x to the mouseCast
- set y to the mouseLine
- if (x > 0) and (y > 0) then
- set gtheLine to line y of field x
- tell the stage
- hFindCaptionLine()
- end tell
- end if
- end
-
- on activateWindow
- set gActiveWin to the pathName & the movieName
- end
-