O'Reilly logo

Understanding Flash MX 2004 ActionScript 2 by Alex Michael

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6

Keyboard Object

In this chapter we will look at how to listen to keyboard input with and without creating an object and a constructor. We will use the methods of the Key object to build an interface that can be controlled by a user with a standard keyboard. The properties of the Key object are constants representing the keys most commonly used to control games. For a complete list of key code values, see Appendix B at the end of this book. We will first look at the conventions within ActionScript and touch on the issues of Object-Oriented Programming. We will then move to a few tutorials on keyboard input.

The Structure of ActionScript Code

Only keywords in ActionScript are case sensitive; with the rest of ActionScript, you can use upper and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required