Actionscript/Menu Question

I’m building a menu in flash 8 using some actionscript to control it.

what i want it to do is when a menu item is clicked, then play the fade out animation, then when thats complete play the fade in amimation for the selected menu item.

i’m using movieclips as buttons for this and I’ve got this to work individually but when i put both commands on the button it seems to jump straight to the fade in animation before it finishes playing the fade out one.

this is the code i’m using, is there a way to make sure closeMenu() has finished playing before it goes to the gotoAndPlay(“homeOpen”)
command?

menu0.onRelease = function() {
closeMenu();
gotoAndPlay(“homeOpen”)
menuOpen = 0;
};

Many Thanks

Sean