Need some help with timline control

I have a 3 movieclip buttons on the main timeline when pressed they need to play 2 movieclips and then depending on which button was pressed go to a frame on the main timeline.

Basically there are 2 movieclips on the maintimeline in frame 1 that I want to animate when a button is pressed and then when the 2 movies are done playing go to the frame that is associated with the button that is pressed.


(1) when either one of the 3 buttons is pressed it triggers the 2 movieclips to start playing

(2) when the movies come to an end the main timeline needs to go to a frame.

(3) depending on which button is pressed the timeline needs to go to the frame associated with that button.

B1 go to frame 16

B2 go to frame 17

B3 to to frame 18

Not sure if this is clear enough but I am stuck.