Smooth in and Out Transition Tweens

Hello, I am new to the forum and to flash. I hope I can learn a lot here. Thanks for reading.

I am trying to make a photo gallery that has smooth in and out tween animation transitions.

  1. On frame 1 there is a button that looks like:

on(press){
gotoAndPlay(2);
}

  1. On frame 2-10 there is a shape tween of a square getting bigger

  2. On frame 10 there is a stop(); action

  3. On frame 10 there is a button that looks like

on(press){
gotoAndPlay(11);
}

  1. On frame 11-19 there is a shape tween of a square getting smaller

I want to add code to the button that tells the movie to finish the tween animation from frame 11-19 and then, once the movie reaches frame 19 to jump to frame 36.

The code has to be related to pressing the button on frame 10, not a global frame action on frame 19 because I want other buttons to tell the movie to play through frame 19 and jump to a different frame than 36.

I hope that all made sense. Thank you for considering helping me.