# Problem With Button Load multiple external SWFs

**URL:** <https://forum.kirupa.com/t/problem-with-button-load-multiple-external-swfs/184433>\
**Category:** flash\
**Created:** [April 5, 2006, 3:40am UTC](https://forum.kirupa.com/t/problem-with-button-load-multiple-external-swfs/184433 "2006-04-05T03:40:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbautista18](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@jbautista18](https://forum.kirupa.com/u/jbautista18)\
**Post date:** [April 5, 2006, 3:40am UTC](https://forum.kirupa.com/t/problem-with-button-load-multiple-external-swfs/184433/1 "2006-04-05T03:40:56Z")

</div>

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.

```auto

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.
