mp3 player: volume slider help

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!

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