title: Access of undefined property Keyboard (AS3)
body: <p>I'm new to Actionscript 3 and I'm wanting to allow a circle to move down using the down arrow on the keyboard. Here's my code:</p>
  
  <pre><code>package  {
  
  import flash.display.MovieClip;
  import flash.events.KeyboardEvent;
  import flash.ui.Keyboard;
  
  public class Circle extends MovieClip {
  
      public function Circle() {
          // constructor code
          var speed:int = 3;
  
          addEventListener(KeyboardEvent.KEY_DOWN,keyIsDown);
  
          function keyIsDown(event:KeyboardEvent) {
              if(event.keyCode == Keyboard.DOWN) {
                  y = y+=speed;
              }
          }
      }
  
  }
  
  }
  </code></pre>
  
  <p>When I test it, nothing happens when I press the down key. Anyone know what's wrong with the code?</p>