Menu with sliding doors effect

Hi all,

I’m working on a flash site which has a menu with 4 to 5 buttons and a pair of sliding doors. What I wanted to do is that when each button is clicked, the doors will slide open and show the content. However, I can’t figure out the logic behind it because each button will show different contents, and the doors will slide open and close as the transitions. The content should not be shown until the doors are closed and then open again. Can someone point me a direction please on how should I code it?
Thanks!