I'm lost on this and am going to lose the account if I can't find a solution!!! I started a Flash website for a band. They have several samples of music from their CD which they want to play on the website. I've got them to play as button events but that's a problem in itself! They keep overlapping as I can't get one instance to stop and start another. I can get them to play a single time, so if someone selects a sample, they'll just have to let it play through and then select a second one...I can live with that but would prefer the samples to stop playing when another is selected.

Here's my biggest problem though; there's a background sound that plays when the swf file is loaded and repeats itself indefinitely. This is what the client wants. I want the bg music to stop playing when a sample from the CD is played but I can't, for the life of me, get it stop playing when the sample is selected! I'm trying it as actionscript but not even sure if that is correct, I again can get one to play but it won't stop anything else from playing so everything just overlaps everything else!

Can I control a timeline sound (i.e. a background sound) with a button sound or event?
Here's the sample of a single button:

on (release) {
var mySound:Sound= new Sound();
mySound.loadSound("Judge Judy (1m 26s).mp3" , true);
mySound.onLoad = function() {
mySound.start();}
}

How do I stop the background sound when this button is selected? If I duplicate the button instance but give it a new name, can I then stop it somehow when another is selected?

Sorry, I'm really a HTML/ASP designer and this flash stuff is really foreign to me!

Great tut. I think I already found out some things on it that should def help. I appreciate the point in the right direction.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.