Key 65(letter a) Only works once
I was making w,a,s, and d controls for a game with AS3 and pressing Key 65(a) only works the first time. Found below is a code that demonstrates how this only happens to key 65.
I have a Mac OS X Snow Leopard and I am using Flash Professional CS5. Can someone let me know what would be the problem?
Thanks
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
function keyPressed(evt:KeyboardEvent):void
{
switch(evt.keyCode)
{
case (68) :
trace("right key is pressed");
break;
case (65) :
trace("left key is pressed");
break;
default :
break;
}
}