# Clickable SeekBar component

**URL:** <https://forum.kirupa.com/t/clickable-seekbar-component/271070>\
**Category:** flash\
**Created:** [September 18, 2008, 12:41am UTC](https://forum.kirupa.com/t/clickable-seekbar-component/271070 "2008-09-18T00:41:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![agent\_99](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@agent\_99](https://forum.kirupa.com/u/agent_99)\
**Post date:** [September 18, 2008, 12:41am UTC](https://forum.kirupa.com/t/clickable-seekbar-component/271070/1 "2008-09-18T00:41:33Z")

</div>

Hello,

I am working on a project that contains an external flv file playing through the FLVPlayback component. I have also added a SeekBar component, which I am needing to be “clickable” in order to jump the playhead to that part of the video.

After much searching on forums I finally found a bit of code which I thought would work. Most of the code is functioning - the SeekBar is working with the video, and the little hand icon appears on rollover of the SeekBar. But when clicked it does nothing.

I have attached the code I am working with below. Would anyone have any ideas why this is not functioning properly?

## Any suggestions would be greatly appreciated. 🙂 Thanks

CODE:

[COLOR=royalblue] **//Code on the timeline** [/COLOR]  
[COLOR=royalblue]player.seekBar = myseekbar; [/COLOR]  
[COLOR=royalblue]function clickTime(){ [/COLOR]  
[COLOR=royalblue]videoDuration = player.metadata.duration / myseekbar.\_width; [/COLOR]  
[COLOR=royalblue]clickPos= videoDuration \* myseekbar.\_xmouse; [/COLOR]  
[COLOR=royalblue]player.seekSeconds(clickPos);[/COLOR]  
[COLOR=royalblue]}[/COLOR]

* * *

[COLOR=teal] **//Code on the SeekBar component** [/COLOR]  
[COLOR=teal]on(press){ [/COLOR]  
[COLOR=teal]clickTime();[/COLOR]  
[COLOR=teal]}[/COLOR]
