I have the following Adobe Flash (ActionScript 3.0) movie:

When a button is pressed I want to play frame 17 to 24, and after this, I want to go back and play frame 10 to 16 in the same animation. I’ve tried something like this but unfortunately doesn’t works:
button.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void{
gotoAndPlay(17);
gotoAndPlay(10);
}
In other short words: after gotoAndPlay(17); I want to gotoAndPlay(10);
Thanks for your attention!
Try this:
Which will let you do this: