I’m trying to get a button to load multiple external swfs into separate empty movie clips.
The first one works fine, however the second empty movie clip is giving me trouble. Whenever I click on a button, it loads the movie fine… However, when I click on another button to change the movie, it loads the movie that matches the first button I hit rather than the more recent one.
This is the code I have in one of the buttons.
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "scmain";
boxsubcat.loadMovie("scmain.swf");
} else if (_root.currMovie != "scmain") {
if (boxsubcat._currentframe>=boxsubcat.midframe) {
_root.currMovie = "scmain";
boxsubcat.play();
}
}
}
on (release) {
if (_root.currMovie2 == undefined) {
_root.currMovie2 = "t1main";
boxtitle1.loadMovie("t1main.swf");
} else if (_root.currMovie2 != "t1main") {
if (boxtitle1._currentframe>=boxtitle1.midframe) {
_root.currMovie2 = "t1main";
boxtitle1.play();
}
}
}
Like I said, the first movie (currMovie) changes successfully with each corresponding button. However, I believe currMovie2 will not change variables, thus preventing it from loading the movie clips which correspond with the selected button.