title: stop(); undefined method in as3.0
body: <p>i want to move to the next frame after clicking a specific button. tried putting stop(); method but it says error and the result is just alternating the 2 frames .</p>
  
  <p>here's my code.</p>
  
  <pre><code>    //the error says call to a possibly undefined method stop.
      //i'm using adobe flash cc.
      stop();
      public function main ():void {
          enter_button.buttonMode = true;
          enter_button.addEventListener(MouseEvent.MOUSE_DOWN, checkForm);
  
          player.text = "";
      }
      public function checkForm (event:MouseEvent):void {
          if (player.text != ""){
              gotoAndStop(1);
              sendForm();
  
          }
          else{
              player.text = "please enter your name";
          }
      }
  </code></pre>