Stop re-loading an already loaded movie

Is there a script that can cancel out re-loading a loaded .swf? i have 4 buttons which load 4 different .swfs, so when you click on button one, movie one loads, but if the user clicks on button one again the movie re-loads again…

how can i stop this so that it recognizes that that movie is already open?

thanks,
jondj24

quickest way would be to throw in an IF statement to check if the movie is loaded each time you press the button. if the movie is not loaded, load it, if it is loaded, just do the other actions.

Use a variable to store the current loaded swf. Then run an if statemen to compare that value with the value of the button pressed.

hi,
when you load the movie set a variable to true and add an if statements to each of your buttons (where each button loads a different movie). you will require a variable for each movie and the buttons must set the appropriate variables to true or false.
something like this:

on (release){
if (not(loaded)) {
loadMovie(“movie1.swf”, this);
loaded = true;
}

}

hope this helps!