title: As3 Errors 1046 type not found if I specify a document class
body: <p>In my as3 code using Flash cs3, everything works fine without any document class. I can use event handlers and they work. But, once I attach a document class, I start to get this error: <code>1046: Type was not found or was not a compile-time constant: KeyboardEvent.</code></p>
  
  <p>Could somebody explain why this occurs? This is what my document class looks like:</p>
  
  <pre><code>package {
      import flash.display.Sprite;
      import flash.events.Event;
      import flash.utils.Timer;
      import flash.events.TimerEvent;
      import flash.display.MovieClip;
      import flash.geom.Point;
      import flash.geom.Matrix
      import flash.ui.Keyboard;
      import flash.Event.KeyboardEvent;
      import flash.Event.MouseEvent;
      import flash.events.KeyboardEvent;
      import flash.events.MouseEvent;
  
      public class myCoolClass extends MovieClip {
  
      }
  
  }</code></pre>
  
  <p>But then, I start to get more errors. I get: <code>1180: Call to a possibly undefined method SoundTransform.</code>.</p>
  
  <p>Do I have to keep adding more <code>import</code>'s in order to have it run properly?</p>
  
  <p>Thanks</p>