Keyboard Control
|
ASSIGNMENT: Controlling object movement using the arrow keys makes a lot of sense and it's not too awfully complicated. The key line you should pay special attention to is: window.addEventListener("keydown",obmove,false); Also inspect the obmove function to see how keys are recognized. After experimenting around and inspecting the code, you should be able to figure out which key codes correspond to the up, down, right, and left arrows.
Your assignment is to accomplish the following simple code alterations:
|