Menu Help

I’m trying to make a site that is has a lot of animation. I have five main buttons and 5 sub buttons on the main stage. When you click on one of the main buttons say B1 only 3 of the sub buttons are active. I would like to animate the three unused sub buttons and make them disappear. So i can figure out how to do that from the home page for each page (if you click on B1 three sub buttons go away or you click on B4 you get one sub button), but what happens if say B3 has 4 sub buttons. If i try to go from B4 to B3 how do i get those buttons back. I could animate ever possible combination but that seems like its overkill. There has to be a way to do this more efficiently. I hope all that makes sense.

I’m sure this subject has been covered in the forum but for the life of me I cant find it. If some one can even give me a search term to google that would be great. I don’t know how to describe what I want to do in any less words that I did above and that seems like a long google search.

Thanks in advance for the help and let me know if you have any questions about what I want to do.