Hi All-
I’m having trouble with a button script my client has asked me to create. I need help on putting together a script to detect if a specific movie clip “port_fade.swf” has already been loaded and into a container and if so don’t reload it. This clip has to load on a on(release) function. I have 8 buttons and depending on which button a visitor clicks on I need the clip to load. I don’t want to have it reload every time a button is clicked.
I found this code but it doesn’t seem to work.
function loadExternalSwf() {
if (containerFade.thisID == “port_fade.swf”) {
trace(“Content already loaded - Don’t do anything.”);
} else {
mcl.loadClip(“port_fade.swf”, containerFade);
}
}
My current button code is this:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = “port_fade”;
containerFade.loadMovie(“port_fade.swf”);
} else if (_root.currMovie != “port_fade”) {
if (containerFade._currentframe >= containerFade.midframe) {
_root.currMovie = “port_fade”;
containerFade.play();
}
}
}
Thank you for any assistance.