Game Development Reference
CONTROLLING A PLAYER CHARACTER
One of the first things your games must do is allow game players to move an object
around the stage. The object can be moved with either the mouse or the keyboard. In
this chapter, you'll look at techniques for controlling an object with the keyboard.
This chapter covers the following topics:
Using the GAU[@KSJ, GAU[QL, and AJPAN[BN=IA events
Stopping the player character at the edges of the stage and screen wrapping
Scrolling: vertical, horizontal, and parallax scrolling
Setting up the project files
If you've worked through the projects in the previous chapters, you should by now
be very familiar with the format used to set up the project files:
1. Create a project folder called ?d]n]_pan?kjpnkh.
2. Open Flash. Select File ° New and choose Flash File (ActionScript 3.0) from the
New Document dialog box.
3. Click the OK button.
4. Select File ° Save As .