# mp3 player: volume slider help

**URL:** <https://forum.kirupa.com/t/mp3-player-volume-slider-help/117438>\
**Category:** Uncategorized\
**Created:** [July 27, 2004, 1:57pm UTC](https://forum.kirupa.com/t/mp3-player-volume-slider-help/117438 "2004-07-27T13:57:50Z")\
**Posts on this page:** 2\
**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:** [July 27, 2004, 1:57pm UTC](https://forum.kirupa.com/t/mp3-player-volume-slider-help/117438/1 "2004-07-27T13:57:50Z")

</div>

I’m making an audio player in flash that plays external mp3’s and my volume slider isn’t working.

On my main timeline in my actions frame I have the following code:

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

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

On music button 1 I have the following code:

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

On my dragger inside my volume slider 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 = “”;  
}

I tried changing the \_parent script in this section to \_root to see if that would work but then when I’d release the volume slider my volume would go to 0 and then never come back. Thanks for any help!

---

<div class="post-metadata">

**Author:** ![El\_Phantom](https://avatars.discourse-cdn.com/v4/letter/e/d6d6ee/32.png) [@El\_Phantom](https://forum.kirupa.com/u/El_Phantom)\
**Post date:** [July 27, 2004, 5:14pm UTC](https://forum.kirupa.com/t/mp3-player-volume-slider-help/117438/2 "2004-07-27T17:14:29Z")

</div>

Sometimes I think that buttons have problems reporting their accurate \_x and \_y positions because they don’t have an onEnterFrame() action to update their location.

Try using a movieclip instead.

–EP
