Load var/MC

hey everyone,
i have a button that loads an external .swf file into an emptyMC. Now when you unload the MC, it plays an exit type animation. so my problem is that i have several buttons and i need to make it smart enough to detect which movie is being loaded and play the exit animation of the current loaded MC.

to get a better visual of my question, please check out the W.I.P at http://triggerme.com/index2.html (ignore the preloader)

any suggestions would greatly be appreciated

Why don’t you set a variable?

Try putting this on a frame…

myMovie = “home”

Then when you want to play the exit animation you can do something like…

if(_root.myMovie == “home”) {
//play animaion;
} else if (_root.myMovie == “about”) {
//play animation;
} else if (_root.myMovie == “portfolio”);
//play animation
}

You know… etc, etc.

And on the buttons you can just do something like…

on (release) {
_root.myMovie = “about”;
//any other code goes after that
}

thanks for the reply beta.
but i’m still a bit lost. since i am loading external swf’s how do i declare variables on external swf? and it’s being loaded into an empty MC. so i am not sure what, where or who i should assign the variables to.

all your loaded mcs have unique names right? Just make frame labels for the exit animations of each loaded movie with those names. Then when you unload that movie, use its name in the gotoAndPlay/Stop to the exit animations.