JonnyT
03-12-2010, 04:29 PM
Hi. I've made a video player that plays an FLV file with play/pause/mute/fullscreen buttons and a progress bar allowing visitors to seek to a particular moment in the video. However, I cannot seem to create a listener that gets the current elapsed time and displays it in a dynamic text box. I have managed to get the total time of the video though, just not the elapsed time.
Can anyone help?
Here's what I've put together on my last attempt:
//Get playhead time
var TimelistenerObject:Object = new Object();
TimelistenerObject.stateChange = function(eventObject:Object):Void {
controls.elapsed = video.playheadTime;
};
video.addEventListener("stateChange", TimelistenerObject);
Can anyone help?
Here's what I've put together on my last attempt:
//Get playhead time
var TimelistenerObject:Object = new Object();
TimelistenerObject.stateChange = function(eventObject:Object):Void {
controls.elapsed = video.playheadTime;
};
video.addEventListener("stateChange", TimelistenerObject);