Movie clips

Ok here is my set up:

I have a main movie - in it, I have about 25 buttons that all load movie clips with sounds. It’s like a sound board of sorts.

My problem:

I know how to load movie clips and unload them using those exact commands. What I am wondering is - is there a code that can be used on my buttons so that if another movie clip is playing when a different button is pressed all the others will stop and just it will play. You see I would really hate to have to go in and an “unload X movie clip” 25 times for each button to make sure it’s not going to be there.

Do you guys have any idea?

Anyone? Please help me out guys…

Hrm… don’t use this too much as I have yet to make a Flash site, or anything that uses it, but…

yourClip.unloadMovie();

That should unload any movie that is loaded onto yourClip.

You could store the name of the movie playing when you press on the button, so that you can access it to unload it when you press another button, no?

pom :asian:

ilyaslamasse: I am not sure what you mean, or how to do it. If it’s not too much trouble do you think you could explain it to me? Remember, I am a designer - not a programer so I might need some detailed instructions :slight_smile: I am kind of an idiot when it comes to actions…sorry :frowning:

Hmm, can you explain exactly how you want it to work?

Ok :slight_smile:

I have a movie with 25 buttons on it.
each buttons opens a movie clip with a sound on it.

I want it so that if you click on one button and the sound starts to play and then you press another button the first movie stops and the second one begins.

This way if they are trying to find a sound they are looking for they wont have to wait for one to finish if click on the wrong one.

do you know what I mean?

right now, if they were to click on like 6 different buttons right in a row, there would be 6 different voices going at the same time!

ilyaslamasse?

please!!..:slight_smile:

what’s wrong with using unloadMovie()?

because that would mean that for every single button I would have to have 24 statements that read “if clip#? is loaded, unload it”

and I really dont want to have to do all that :slight_smile: There has to be a way to stop any movies that are already playing…

What do you mean the button opens a movie clip? It is loaded, attached?

Anyway, if you are loading, a simple solution would be to load in the same clip/level all the time. That way, the new clip erases the previous one.

pom :slight_smile: