Keyboard interactivity is used for games, accessibility, and navigation. General practice in ActionScript 3.0 involves "listening" to keyboard events from the Stage because the Stage always has focus while the movie is active.
This sample demonstrates an animation whose path is controlled by pressing the arrow keys on the keyboard. Press the up, down, left, or right arrows to see the change in the animation.
User level: Intermediate
To view these samples, you need the following software and files:

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License