dsrnu
asked on
How do I continuously update a current time text display with FLVPlayback?
Hi,
I have the FLVPlayback component in an AS3 document.
I have found that the current time of the FLV video is available via
myFLVPlayback.playheadTime (considering myFLVPlayback is the instance name of my object)
BUT this variable only gets updated every "state change" via a listener that calls a function every "stateChange"
How do I continuously update this text box to display the most up to date value of playheadTime? I know that NetStream's netStream.time works very well, but I'd rather not recode using netstreams.
PS. I have a dynamic text box named CURRENTTIME.
Thank you.
I have the FLVPlayback component in an AS3 document.
I have found that the current time of the FLV video is available via
myFLVPlayback.playheadTime
BUT this variable only gets updated every "state change" via a listener that calls a function every "stateChange"
How do I continuously update this text box to display the most up to date value of playheadTime? I know that NetStream's netStream.time works very well, but I'd rather not recode using netstreams.
PS. I have a dynamic text box named CURRENTTIME.
Thank you.
function listenerObjectStateChange(eventObject:Object):void {
controlsMC.CURRENTTIME.text = formatTime(vid.playheadTime);
};
vid.addEventListener("stateChange", listenerObjectStateChange);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much.
ASKER
I inserted myTimer.start() inside the (initial) play button, and changed the repeat on the timer to the total time of the video.