title: ActionScript 3.0 - 2 gotoAndPlay() commands in one function
body: <p>I have the following Adobe Flash (ActionScript 3.0) movie:</p>
  
  <p><img src="https://i.stack.imgur.com/4dy4J.png" alt="enter image description here"></p>
  
  <p>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:</p>
  
  <pre><code>button.addEventListener(MouseEvent.CLICK, buttonClick);
  
  function buttonClick(event:MouseEvent):void{
          gotoAndPlay(17);
          gotoAndPlay(10);
  }
  </code></pre>
  
  <p>In other short words: after <code>gotoAndPlay(17);</code> I want to <code>gotoAndPlay(10);</code><br><br>
  Thanks for your attention!</p>