If you are using the FLVPlayback component in combination with a custom UI seekbar component then you may have asked yourself why the seekbar is not clickable. Many video players implement this functionality: rather than having to find the handle, drag it and let go it is possible to click the seekbar anywhere to jump to that point.

Fortunately it is ot too difficult to add this piece of behaviour. The following code is applicable to an instance of the FLVPlayback component on stage (instance name 'player') not using a skin but using a custom UI seekbar component (instance name 'seekbar').

view plain print about
1player.seekBar = seekb;
2
3seekb.addEventListener( MouseEvent.MOUSE_DOWN, onclick);
4
5seekb.useHandCursor = true;
6seekb.buttonMode = true;
7
8function onclick(e:MouseEvent):void
9{    
10    var seekto = ((this.mouseX-seekb.x)/seekb.width)*100;
11    trace(seekto);
12    player.playheadPercentage = seekto;
13}

Give that a try and you should be able to click the seekbar to jump to any point in the video (provided you are streaming or - if using progressive download - the video has already loaded up to the part you are trying to seek to).