title: Adobe Flash CS5 (AS3.0): "Error 1046: Type wasn't found or was not a compile-time constant: MouseEvent."
body: <p>I'm creating on Flash CS5 an animation of navigation buttons. On AS3 I have this code:</p>
  
  <pre><code>stop();
  
  fotos_btn.addEventListener(MouseEvent.CLICK, goFotos);
  videos_btn.addEventListener(MouseEvent.CLICK, goVideos);
  textos_btn.addEventListener(MouseEvent.CLICK, goTextos);
  
  function goFotos(e:MouseEvent):void{gotoAndStop('fotos');}
  
  function goVideos(e:MouseEvent):void{gotoAndStop('videos');}
  
  function goTextos(e:MouseEvent):void{gotoAndStop('textos');}
  </code></pre>
  
  <p>When compiling there are 3 error messages which say the same: "Error 1046: Type wasn't found or was not a compile-time constant: MouseEvent." (Look out, it refers to those where are written on the 'function' part. Not to the 'addEventListener' ones)</p>
  
  <p>I tried out with AS2.0 but it's impossible to be read. Now in the first line you can read "stop();" , this is an instruction to stop the animation (slide) of the navigation buttons once appeared on Stage. My teacher has the same code (and the same version of Flash CS5 as mine) and it can run with no problems. Supposedly this is a basic code which can be compiled very well. This is not my case, though.</p>
  
  <p>Is there something wrong with my code? Do I have write on more specific codes to be run?</p>
  
  <p>I appreciate your help. Thank you :)</p>