# Seek and volume bar problems for mp3 player

**URL:** https://forum.kirupa.com/t/seek-and-volume-bar-problems-for-mp3-player/236915
**Category:** Uncategorized
**Created:** [August 24, 2007, 9:20pm UTC](https://forum.kirupa.com/t/seek-and-volume-bar-problems-for-mp3-player/236915 "2007-08-24T21:20:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Angel2727](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@Angel2727](https://forum.kirupa.com/u/Angel2727)
#### Post date: [August 24, 2007, 9:20pm UTC](https://forum.kirupa.com/t/seek-and-volume-bar-problems-for-mp3-player/236915/1 "2007-08-24T21:20:41Z")

</div>

Hi,

I am trying to make a mp3 player which uses a xml file for the songs in flash 8.  
I got some free code from different places and I have modified it to make some of the functionalities work but I am still struggling with a few more…

The first one is a scrubber, which can be dragged to seek different positions in the song.  
I have a scrubber\_mc, which is like a background to the progress bar. That let’s me seek different positions in the song if I ‘click’, but what I need is a scrubber that can appear like a small arrow that can be ‘dragged’ to different positions in the song.

I have written some code but don’t understand why it is not working… the scrubber is called playhead\_btn which is inside a movieclip called seekbar\_mc which also has the progessbar\_mc which shows the progress of the song.

seekbar\_mc.playhead\_btn.onPress = function() {  
seekbar\_mc.playhead\_btn.\_x = seekbar\_mc.progressbar\_mc.\_width + seekbar\_mc.progressbar\_mc.\_x;  
var leftLimit = seekbar\_mc.progressbar\_mc.\_x;  
var rightLimit = seekbar\_mc.progressbar\_mc.\_width + seekbar\_mc.progressbar\_mc.\_x;  
this.startDrag(“seekbar\_mc.playhead\_btn”, false, leftLimit, seekbar\_mc.progressbar\_mc.\_y, rightLimit, seekbar\_mc.progressbar\_mc.\_y);  
}

seekbar\_mc.playhead\_btn.onRelease = function() {  
this.stopDrag();  
}

seekbar\_mc.playhead\_btn.releaseOutside = function() {  
this.stopDrag();  
}

Another functionality that I am trying to get working is a volume control. I have a line of code on the main timeline of the player:

this.\_sound.setVolume(song\_volume);

and I have the rest of the code in the volume\_mc movieclip. I am being able to increment and decrement the counter on the volume control but it is not affecting the actual volume of the song being played. I am not sure what I am missing.

I am not very good at actionscript but try to read up stuff and try it out. To help you help me, I am attaching a copy of the .fla file. I really hope someone can help me.

Thank you in advance.
