Sound Question

I cant seem to find the answer on searching, so if this has been asked before, please forgive me. OK, basically im still pretty new to Flash MX and it seems all of my above basic knowledge of Flash 5 feels like it’s gone out the window now that ive upgraded to Flash MX, and i used to know how to do this but cant for the life of me figure it out in the MX version.

OK, ive got some movie clips as buttons and when the person clicks on them, i want a sound to play differently for each one. I got it to work for one button with the script below, but my problem is, i want the sound to stop when another button is clicked (and then therefore that button’s sound plays) or if they click the same button again, i just want the sound, if its still playing, to stop and start over and not loop like its doing for me now when i test it out. I cant use the stop function or the animated movie clips stop. What is it im missing in the code below my name, anyone have any ideas?? Thanks in advance.

Jen

onClipEvent (load) {
song = new Sound();
song.attachSound(“dist”);
_root.distmc.onRelease = function() {
song.start();
_root.distmc.play();

};

You’ll find everything you’re looking for in there (I hope): http://www.kirupaforum.com/forums/showthread.php?s=&threadid=10836

ok first of al dotn put the actions on your mc. rather your button instance.

to answer your first question
[AS]
song.start(0,1)// play once
[/AS]

you will have to give your button instance “this” or “root” to refer to your main timeline

Check this

Hey guys, thanks so much! All of your combined answers helped me out BIG time! Thanks again!!

Jen

You’re welcome
:slight_smile:

yup