title: 1180: Call to a possibly undefined method gotoAndPlay
body: <p>I have this AS3 script that worked so far...</p>
  
  <pre><code>stop();
  
  b1.addEventListener(MouseEvent.CLICK, Info001);
  function Info001(event:MouseEvent):void {
  gotoAndPlay(2);
  }
  
  X.addEventListener(MouseEvent.CLICK, Exit001);
  function Exit001(e:MouseEvent) {
  NativeApplication.nativeApplication.exit();
  }
  </code></pre>
  
  <p>then, I added a class in the .fla file...</p>
  
  <pre><code>package
  {
      import flash.system.System;
      import flash.system.Capabilities;
      import flash.display.Sprite;
      import flash.events.Event;
      import flash.desktop.NativeApplication;
      import flash.utils.setTimeout;
      import com.hdi.nativeExtensions.NativeAds;
      import com.hdi.nativeExtensions.NativeAdsEvent; 
  
      public class Main extends Sprite
      {       
          public var na : NativeApplication;
          private var admobId:String = 'a1514b5ef85e336';
  
  
          public function Main()      
          {
              na = NativeApplication.nativeApplication;
              na.addEventListener('exiting',exit,false,0,true);
              na.addEventListener('deactivate',exit,false,0,true);
  
              if ( stage ){
                  stage.scaleMode = 'noScale';
                  stage.align = 'TL';
              }           
  
              if ( loaderInfo ){
                  loaderInfo.addEventListener( Event.INIT, init, false, 0, true );
              } else {
                  init(null);
              }
          }
  </code></pre>
  
  <p>(the class is not complete here...)</p>
  
  <p>and the buttons stopped working... :-/</p>
  
  <p>I tried adding</p>
  
  <pre><code>import flash.events.MouseEvent;
  </code></pre>
  
  <p>but that's not enough... how can you make it work?</p>