PDA

View Full Version : Problems with Sounds


Topex
01-06-2003, 08:00 AM
I donīt know how to loop the mp3īs chosen by a Flash MX Combo Box. I think this is a rather simple question, maybe you can help me. And the other thing is: How can i apply a volume control to this sounds.

Thanks

The AS is:

on (release) {
song = kombo.getValue();
if (song == "snd1") {
snd.loadSound("DATA\\Freax.mp3", true);
} else if (song == "snd2") {
snd.loadSound("DATA\\Give me 5.mp3", true);
} else if (song == "snd3") {
snd.loadSound ("DATA\\Baby.mp3", true);
}
}

sandman9
01-07-2003, 06:13 AM
on your volume control knob just put the following script:

onClipEvent (load) {
top = _y;
botton = _y;
left = _x;
right = _x+100;
_x += 100;
}
onClipEvent (enterFrame) {
_root.song.setVolume(_x-left);
}

PS-for looping try
song.start(0,999);
This means that the song will play through 999 times