I tried this and it didn't work... Although, when I did I combined the two line like this:
PHP Code:
if ( keyDown( 5 ) && this.keydown5 == false ) {
Would that have anything to do with it?
I also noticed every flag is set to true. Am I missing something there?