Sliding menu ...help!

hey all new here. Been reading alot the past few days and just cant seem to be able to find the answer so it’s time to ask for help.

I have created a sliding navigation, which will open up into an menu where different content will be loaded. What i cant figure out is to make 1 menu closes before another one opens up.

example: i open A menu content is loaded…now i wanna open B menu but before that happens i want to make sure A menu will close first. How do i do that ?

Here’s the sample of the swf file

thanks!