Groups | Blog | Home
all groups > flash actionscript > april 2006 >

flash actionscript : onKeyUp/onKeyDown does not react to Escape


dr.Evol
4/28/2006 10:04:05 PM
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...


aa
4/28/2006 11:15:42 PM
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);

AddThis Social Bookmark Button