-
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;
}
}
-
Developing For Dunkets
Works fine on a PC, CS5 windows 7 pro.
When you're previewing the swf click control, then disable keyboard shortcuts and see if that does anything for you.
-
Disabling the keyboard shortcuts in the control menu actually didn't work. At least I know now that it's probably a problem with mac's. Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|