ok basicaly i want to user to click on the button and on click i want to time line to finish playing the animationclosing then depending on the button the user click the time line should jump to were the animation 1-4 starts. here is the code i am try to get to work

The code I have on my four buttons are
Button 1

on (release) {
var i=1;
this.parent.gotoAndPlay(27);
}

Button 1

on (release) {
var i=2;
this.parent.gotoAndPlay(27);
}

Button 1

on (release) {
var i=3;
this.parent.gotoAndPlay(27);
}

Button 1

on (release) {
var i=4;
this.parent.gotoAndPlay(27);
}

then when the button is clicked it will play untill the time line gets to frame 45 and on frame 45 in the actions layer i have some code that goes as follows