Interactivity sample: Keyboard-controlled movement
19 July 2010
Keyboard interactivity is used for games, accessibility, and navigation. General practice in ActionScript 3 involves "listening" to keyboard events from the Stage because the Stage always has focus while the movie is active.
The sample demonstrates an animation whose path is controlled by pressing the arrow keys on your keyboard. Press the up, down, left, or right arrows to see the change in the animation.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.
More Like This