Be a Supporter!

as3 not detecting some keys

  • 786 Views
  • 6 Replies
New Topic Respond to this Topic
taongkahoy
taongkahoy
  • Member since: Dec. 29, 2010
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
as3 not detecting some keys 2011-03-19 03:00:01 Reply

Hi all, I have a simple question. So I made a KeyboardEvent listener but for some reason it won't recognize when I press some keys, particularly q,a,s, and z. I tried tracing their keycodes but whenever I press those keys it won't show me anything. It works fine on other keys though, what could I be doing wrong here? any help would be appreciated.

Version2
Version2
  • Member since: Sep. 24, 2003
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to as3 not detecting some keys 2011-03-19 03:06:31 Reply

Double check your keycodes first, I use this site's app when I'm setting up keyboard commands. If that doesn't work, post the code that isn't working, and you'll get a more detailed answer.

Redshift
Redshift
  • Member since: Feb. 12, 2005
  • Offline.
Forum Stats
Member
Level 15
Programmer
Response to as3 not detecting some keys 2011-03-19 12:29:36 Reply

You probably need to disable keyboard shortcuts.


#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}

BBS Signature
taongkahoy
taongkahoy
  • Member since: Dec. 29, 2010
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to as3 not detecting some keys 2011-03-19 20:54:35 Reply

At 3/19/11 12:29 PM, Redshift wrote: You probably need to disable keyboard shortcuts.

How do I do this? I found out this only happens when I run the .swf file from ctrl+enter, but when I run it from an external projector it works perfectly well.

Redshift
Redshift
  • Member since: Feb. 12, 2005
  • Offline.
Forum Stats
Member
Level 15
Programmer
Response to as3 not detecting some keys 2011-03-19 21:02:56 Reply

Control >> Disable keyboard shortcuts


#include <stdio.h>
char*p="#include <stdio.h>%cchar*p=%c%s%c;%cmain() {printf(p,10,34,p,34,10);}";
main() {printf(p,10,34,p,34,10);}

BBS Signature
taongkahoy
taongkahoy
  • Member since: Dec. 29, 2010
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to as3 not detecting some keys 2011-03-19 22:23:17 Reply

I couldn't find any option of that sort, the closest thing I have is a "disable simple buttons". Though I found out from another thread that running through ctrl+shift+enter kind of solves the problem.

Callum123456
Callum123456
  • Member since: Mar. 7, 2009
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to as3 not detecting some keys 2011-03-19 22:26:16 Reply

At 3/19/11 10:23 PM, taongkahoy wrote: I couldn't find any option of that sort, the closest thing I have is a "disable simple buttons". Though I found out from another thread that running through ctrl+shift+enter kind of solves the problem.

Where are you looking? I think the option is in the flash player not the ide.