It doesn't make much of a game if we can't move the paddle!
Add code to the movie as follows:
stage.addEventListener(KeyboardEvent.KEY_DOWN, doKeyDown);
function doKeyDown(e:KeyboardEvent):void {
var amount:int=1; //amount to move by
if(e.shiftKey) amount=5; //make it 5 if shift is down
switch(e.keyCode) {
case Keyboard.LEFT: case 65: paddle.x-=amount; break; //left arrow or letter A
case Keyboard.RIGHT: case 68: paddle.x+=amount; break; //right arrow or letter D
} //switch
} //doKeyDown
We can now move the paddle but it is not really a great game yet. Experiment and add any of the following:
Download the class. Download the movie.