Animating with AS/Calling functions

Hi:)

I’d like to ask what would be the best approach for a situation like this:

  1. User clicks on menu
  2. Animation driven by ActionScript is played
  3. After the animation ends, another menu (subpage) is loaded.

Now the problem is that I’d like to have a few generic functions that should animate things on the screen and after each of these is played, I want the script to continue with building menus and other items. Eventually I’d like to animate more than one thing at the same time. Can someone help me with what is the best way to solve this?

thanks in advance