I have a built a mp3/video player. The scrub bar has a loaded bar that shows the amount that has been downloaded. That load bar has the mouse event that will update the playhead. The reason I chose the loadbar to have the mouse event is so a user cant seek past what is already loaded.
function updateMediaPosition(e:MouseEvent):void
{
pBar.scrubber.width = e.localX * pBar.width;
vPos = e.localX * videoLength;
v.seek(vPos);
}
The code currently works playing locally since it loads right away. If I test it online, e.localX keeps changing until its fully loaded, therefore resulting in invalid seek times. Can anyone shed some light on this? Here is an example: