AS3: movieclip to target

I am fairly new at AS3 and I was wondering if anyone can help me with this:
I have a movieclip playing and when I click a certain button I want the movieclip to first play an “outro” animation (which is also inside the movieclip) then go to the real target of the button.
For example, I am at the Homepage of my website then I click on the Contact button. The homepage will first go to Homepage’s outro animation then go to the Contact page.
I need the button to recognize the page/clip being played and the page it will go to.
Thanks!
P.S. Please explain to me how the code works and how I will change it because I am a REAL noob at this thanks :slight_smile: