Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Flash Media Server Stream Flash, Windows Media,howto,Flash media server Tutorials , Flash media server References , flash media server Examples , Flash media server codes , learn flash media server.

Flash Media Server Thread, Implementing Click-To-Seek For The FLVPlayback Component in Web Technology; If you are using the FLVPlayback component in combination with a custom UI seekbar component then you may have asked ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3580


Reply
LinkBack Thread Tools Display Modes
Implementing Click-To-Seek For The FLVPlayback Component
 
 
Choose
SABRAWY's Avatar

Reply With Quote
 
Join Date: Aug 2007
Posts: 1,893
17-09-2008, 08:29 AM
 
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').

player.seekBar = seekb;

ActionScript
PHP Code:
 seekb.addEventListener( MouseEvent.MOUSE_DOWN, onclick);

seekb.useHandCursor = true;
seekb.buttonMode = true;

function
onclick(e:MouseEvent):void
{   
    var
seekto = ((this.mouseX-seekb.x)/seekb.width)*100;
    
trace(seekto);
    
player.playheadPercentage = seekto;
}
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).
 
 
 
Reply

Flash Media Server Thread, Implementing Click-To-Seek For The FLVPlayback Component in Web Technology; If you are using the FLVPlayback component in combination with a custom UI seekbar component then you may have asked ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3580


Bookmarks

Tags
clicktoseek, component, flvplayback, implementing


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing CSRF Protection in modifications Developer Articles 4 08-04-2009 09:27 PM
change ip on double click Developer Software and Programs 2 27-11-2008 07:07 PM
Lesson : Window Component Developer Articles 0 23-10-2008 02:43 AM
Implementing CSRF Protection in modifications Developer Articles 0 10-09-2008 06:32 PM
Using the Flash FLVPlayback Component in Flex 2.01 SABRAWY Flex 1 20-11-2007 04:16 PM