I'm new to Action Script 3 I have tried to make a movie where i can control a box on the screen move with the left and right arrow keys but I keep getting a message "Access of possible undefined property LEFT through a reference with static class". Certain statements don't turn blue, such as if and function?
This is the code:

```
stage.addEventListener(KeyboardEvent.KEY_DOWN,myFunction);

function myFunction (event:KeyboardEvent){

    if (event.keyCode == KeyboardEvent.LEFT){
        blueBox.x -=5
    }
    if (event.keyCode == KeyboardEvent.RIGHT){
        blueBox.x +=5
    }
}

```