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, gCurrentlyPlayingMovie, gStylingNeedF, gStylingStillNeeded, gStylingSuspended
-
- 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 gStylingSuspended to 0
- 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
- hQTPause()
- updateStage()
- forget(window string(getaProp(gMyWinList, 11)))
- setAt(gImageList, 11, EMPTY)
- setAt(gMyWinList, 11, EMPTY)
- setAt(gMyWinTracker, 11, 0)
- setAt(gtheLockList, 11, 0)
- clearpuppets()
- end
-
- on hDisplayVideo
- 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 (the castNum of sprite 7 + 1)
- updateStage()
- setAt(gtheLockList, 11, 1)
- else
- puppetSprite(7, 0)
- updateStage()
- setAt(gtheLockList, 11, 0)
- end if
- end
-
- on hReWind
- hQTPause()
- 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()
- hSetTheHead()
- hQTGo()
- end
-
- on hPlayQT
- puppetSprite(11, 0)
- puppetSprite(13, 0)
- updateStage()
- puppetSprite(12, 1)
- set the castNum of sprite 12 to the number of cast "PlayButton" + 1
- updateStage()
- hQTGo()
- 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()
- hQTPause()
- end
-
- on hSuspendStyling
- if gStylingSuspended = 0 then
- set gStylingStillNeeded to gStylingNeedF
- set gStylingSuspended to 1
- tell the stage
- do("hSetStylingNeed 0")
- end tell
- end if
- end
-
- on hResumeStyling
- if gStylingSuspended = 1 then
- if gStylingStillNeeded = 1 then
- tell the stage
- do("hSetStylingNeed 1")
- end tell
- set gStylingSuspended to 0
- end if
- end if
- end
-
- on hQTGo
- set gCurrentlyPlayingMovie to the moviePath & the movieName
- tell the stage
- do(" hWinVoiceSuspend")
- end tell
- hSuspendStyling()
- set the movieRate of sprite 9 to 1
- end
-
- on hQTPause
- set the movieRate of sprite 9 to 0
- tell the stage
- do("hWinVoiceResume")
- end tell
- hResumeStyling()
- set gCurrentlyPlayingMovie to EMPTY
- end
-
- on hSlideTheHead
- set the movieRate of sprite 9 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
- hQTGo()
- 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 clearpuppets
- repeat with x = 1 to 24
- puppetSprite(x, 0)
- end repeat
- end
-
- on activateWindow
- if gActiveWin <> (the pathName & the movieName) then
- set the windowType of window string(gActiveWin) to 2
- set gActiveWin to the pathName & the movieName
- set the windowType of window string(gActiveWin) to gWinType
- end if
- end
-