Help getting to the root

Doing this tutorial with my own library. http://www.kirupa.com/developer/mx2004/transitions2.htm

My buttons are within a movie clip like the Note mentions. However I have altered my action script to what I think is corrent and cant seem to get the swf’s to unload and reload new.

 on buttons:
on (release) { 
if (_root.currMovie == undefined) { 
_root.currMovie = "gallery"; 
_root.container.loadMovie("gallery.swf"); 
} else if (_root.currMovie != "gallery") { 
if (_root.container._currentframe >= _root.container.midframe) { 
_root.currMovie = "gallery"; 
_root.container.play(); 
} 
} 
} 

Is this the correct way of doing it or if it is then it must be something with my swf’s that are loading. I can get the first to load fine with:


_root.currMovie = "home"; 
container.loadMovie(_root.currMovie+".swf"); 

but when button click no response. any help is appreciated.
Thanks
MT