Transitions Between External SWFs

I read this tutorial and it works except that I have a lot of buttons. So I created a function that has all that information in it:


function thumbDisplay(thumbMov) {
if (currMovie == undefined) {
_root.currMovie = "index";
container.loadMovie("index.swf");
} else if (_root.currMovie != thumbMov) {
if (container._currentframe>=container.midframe) {
_root.currMovie = thmubMov;
container.play();
}
}
}
//Function call
thumbDisplay("index")

The code on the buttons is:


thumbNail.onRelease = function() {
_root.thumbDisplay("myBox")
};

Last but not leaset the code at the end of the movie that is loaded into the main movie is:


_root.container.loadMovie(_root.thumbMov+".swf");

My problem is that when a button is cliked it comes back with:
Error opening URL “[undefined.swf](file:///F|/white/undefined.swf)”
I know that there is a problem in my function but I can not seem to fix it. Please help…