# Volume slider problems

**URL:** https://forum.kirupa.com/t/volume-slider-problems/122765
**Category:** Uncategorized
**Created:** [September 16, 2004, 9:16pm UTC](https://forum.kirupa.com/t/volume-slider-problems/122765 "2004-09-16T21:16:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![massive3215](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/massive3215/32/253_2.png) [@massive3215](https://forum.kirupa.com/u/massive3215)
#### Post date: [September 16, 2004, 9:16pm UTC](https://forum.kirupa.com/t/volume-slider-problems/122765/1 "2004-09-16T21:16:43Z")

</div>

I’m making an mp3 player for my site. So far I’ve been able to get my buttons to change songs but I can’t get my volume slider to change the volume of the audio. My code is as follows.

On my main timline in my actions frame I have:

audio1 = new Sound();  
audio1.loadSound(“grow.mp3”,false);

audio2 = new Sound();  
audio2.loadSound(“stability.mp3”,false);

On button one that plays song 1, I have the following code:

on (release) {  
audio1.start(cue, 1);  
audio2.stop();  
}

My slider movie clip on my main timeline has an instance name of volSlider. Inside that movie clip I have my horizontal bar and my volume slider - instance name dragger. On the dragger movieclip I have the following code:

on (press) {  
startDrag(dragger, false, 0, 0, 50, 0);  
isDrag = “y”;  
}  
on (release) {  
\_parent.audio1.setVolume(dragger.\_x);  
stopDrag();  
isDrag = “”;  
}

Thanks for any help!
