# Sound clickable slider

**URL:** <https://forum.kirupa.com/t/sound-clickable-slider/174201>\
**Category:** Uncategorized\
**Created:** [January 3, 2006, 7:07pm UTC](https://forum.kirupa.com/t/sound-clickable-slider/174201 "2006-01-03T19:07:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blaatorx](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@blaatorx](https://forum.kirupa.com/u/blaatorx)\
**Post date:** [January 3, 2006, 7:07pm UTC](https://forum.kirupa.com/t/sound-clickable-slider/174201/1 "2006-01-03T19:07:27Z")

</div>

Peepz,

I have a sound slider wich is 161px width, i have a mp3 that have a duration of: 160732 (wich is variable if it’s still streaming (var name = “myDur”)

if i click on the bar, the music needs to play to a position wich is relative to the position i clicked on the bar. (is the duration a good integer, because is see a lot of people dividing it by 1000 ?)

does somebody knows a formule for this?

i think i need something like this:

```auto

this.onRelease = function()
{
 musicGoto = /*some var with a formule*/ *(this._xmouse/100)
 myTrack.start(musicGoto, 1);
}

```

thnx already!
