Multiple toggle buttons to control (on/off) music.swf

Hi,

I have a little t.v. set on my homepage: www.folkphotography.com that has 4 buttons that I want to control different sound files. I want each button to turn on a loop with first click and shut it off with a second click. If you test what I have now only one button works… and not very well. Any ideas on how I should do this. I had an idea of putting the slide show into a movie clip and having the sounds on different parts of the main timeline. SO far I tried it with actionscript which I really dont understand and had a ton of help just coming up with this:

on (release) {
 
this.sndbtn.onRelease = function(){
		count++;
		if (count % 2) {_level5.stop();}
		else{_level5.play();}}}

and in the frame:

this.onLoad = function () {
loadMovieNum("music.swf",5);
}

I tried to make another swf and button and loading it too level 6 with the code otherwise the same… that didn’t work. Any help, advice, or links that you can offer would be really appreciated.

Thanks!

According to the button code, you are telling a movie clip to stop and play. You should try using the sound object and not the timeline to control sound.
create the object like this:
obSound = new Sound(_level5);

then start and stop it like this:
this.sndbtn.onRelease = function (){
count++;
if (count%2){
obSound.stop();
} else {
obSound.start();
}
};

Hope that helps,
:slight_smile:
Jeremy