FLVPlayback scrubber issue - need help!

Hey,

I’m trying to build a custom video player using the FLVPlayback component.
I’ve got an instance of FLVPlayback in my library, pulling onto the stage ok -

Video is playing nicely with a loading bar and playhead but I am having a shocker trying to make the scrubbing function work.

I have a timerEvent set to update my display, but the video just goes haywire when I drag my scrubber either way. I’m pretty inexperienced in AS3 & with the FLVPlayback component.

Could someone have a look and point me in the right direction here?



private function updateDisplay(e:TimerEvent):void 
{
    //My loading bar - works like a champ    
    loadedSprite.width = flv.bytesLoaded * 594 / flv.bytesTotal;
    
    //bolProgressScrub is when "scrubSprite" is being dragged        
    if(bolProgressScrub)
    flv.seek(Math.round(scrubSprite.x * flv.metadata.duration / 584))
    else
    scrubSprite.x = flv.metadata.time * 432 / flv.metadata.duration; 
            
    maskSprite.width = scrubSprite.x - 10;
}


I’ve only used netstream & netconnection previously in AS2, so maybe it’s my metadata calls that are screwed here?

OR should I use the good ol’ video display method? Is there any advantage to using the FLVPB?

This has been driving me nuts all day.