Skip to main content
Inspiring
April 28, 2006
Question

onKeyUp/onKeyDown does not react to Escape

  • April 28, 2006
  • 1 reply
  • 319 views
This bit of code copied from a tutorial works fine except Escape key reacts
only if any other key was pressed before.
If after loading the file Esc is the first key pressed it does not react no
mater how many times it is pressed.
In other applications Esc works fine
Is this a known problem or I am doing something wrong ?

o = new Object();
o.onKeyUp = function()
{
trace(Key.getCode())
}
Key.addListener(o);


This topic has been closed for replies.

1 reply

Inspiring
April 28, 2006
I think you just have to disable keyboard shortcuts when running preview (ctrl-enter)... go to Control menu, and there on the bottom Disable keyborad shortcuts...

some keys are trapped by Flash IDE and therefore they are not pased to the swf app...