title: AS3 gotoAndPlay button
body: <p>I have this:</p>
  
  <pre><code>           123456789ABCDEF
  </code></pre>
  
  <p>Action 2..........o___Xa________Xo</p>
  
  <p>Action.............a___X</p>
  
  <p>Juego.............o_________oxxxX</p>
  
  <p>Niveles...........o____oxxxX</p>
  
  <p>Presentacion..oxxxX</p>
  
  <p>Script in "Action" frame1 looks like this:</p>
  
  <pre><code>stop();
  
  stage.addEventListener(MouseEvent.CLICK, gotoNiveles);
  
  function gotoNiveles(event:MouseEvent):void
  {
      trace("goto frame 6");
      gotoAndStop(6);
      /* line added to do it work properly
      stage.removeEventListener(MouseEvent.CLICK, gotoNiveles);
      */
  }
  </code></pre>
  
  <p>Script in "Action2" frame6 look like this:</p>
  
  <pre><code>nivelButton1.addEventListener(MouseEvent.CLICK, gotoNivel1);
  
  function gotoNivel1(event:MouseEvent):void
  {
  
          trace("goto frame 11");
          gotoAndPlay(11);
          navigateToURL(new URLRequest("http://www.technotupper.com"), "_blank");
  
  }
  </code></pre>
  
  <p>It shows: </p>
  
  <ul>
  <li><p>"goto frame 6"</p></li>
  <li><p>"goto frame 11"</p></li>
  <li><p>"goto frame 6"</p></li>
  </ul>
  
  <p>And it opens "www.technotupper.com", but it is not working as far as it is not showing frame 11 but going back to frame 6 and showing frame 6.</p>
  
  <p>Thank you.</p>
  
  <p>J. Pablo.</p>