Action Script for transition

I have a transition that I want to use when you click on one of the navigation buttons (the transition is the same for all four buttons), once clicked I would like to gotoAndPlay the transition, then gotoAndPlay the page of the button clicked (ex. portfolio for the portfolio button).

Not sure of how i would do this. Any thoughts would be greatly appreciated.

Thanks in advanced