property pQTsprite -- the QuickTime sprite channel property pQTduration -- duration of the QuickTime cast member property pWhichFrame -- the frame or marker to go to when the video plays to the end ----------------------------------------------------------------------- -- Attach this behavior to a QuickTime video sprite. -- -- This behavior will keep the playhead on a frame until the video -- is finished playing. It will then go to a specified marker. -- -- Note: The 'currentTime' property used to be in ticks, but is now in -- milliseconds. The time units below are converted to seconds so the -- conditional statement will work correctly. -- -- Ken Loge - http://diginoodles.com ----------------------------------------------------------------------- on beginSprite me pQTsprite = sprite(me.spriteNum) pQTduration = pQTsprite.duration/60 -- convert ticks value to seconds end on getPropertyDescriptionList me list = [:] addProp list, #pWhichFrame, [#comment: "Marker to go to when video is finished playing:", #format: #marker, #default: ""] return list end on exitFrame me if sprite(pQTsprite).currentTime/1000 < pQTduration then -- stay on the current frame _movie.go(_movie.frame) else -- go to specified frame _movie.go(pWhichFrame) end if end