Loadmovie question, any help appreciated

Hi,

I’m working on a website navigation menus. What basically happens is that when you click one of the menu items, sub-menu slides down. What I also want to do is, when you click on another menu item, it will first slide the current sub-menu backup and slide down the new menu item.

To do that I put these actions for “on press”

on (press) {
this.gotoAndStop(3);
//hide submenu
_root.loadSubMenu.menu_clip.gotoAndPlay(16);
//load submenu
_root.loadSubMenu.loadMovie(this._name+".swf");
}

As I do other types of programmings, I assumed that the code would go line by line so it would first read the first _root and hide the sub-menu then it would read the second _root and show the new sub_menu. However it doesn’t work, they work individually meaning if I comment out either one of them, the other works meaning it either hides the old menu but doesn’t bring the new one or doesn’t hide the old menu but brings the new one. If I keep both, it doesn’t even see the first _root therefore just brings the new menu. Any ideas? Is there a way to fix this code or should I try a whole new way. Thanks in advance.