Okay i think i understand, thank you.
how to i tell flash that i mean the button space?MovieClip.onKeyUp = function () {
trace ("You pressed a key");
};
im not familiar with Key.getCode or Key.getAscii yet.
Okay i think i understand, thank you.
how to i tell flash that i mean the button space?MovieClip.onKeyUp = function () {
trace ("You pressed a key");
};
im not familiar with Key.getCode or Key.getAscii yet.
It's fairly straightforward. You could either of those methods within the onKeyUp (or onKeyDown) function to determine the key that is pressed.
For example:
Key.getAscii() and Key.getCode() are pretty much the same. The main difference is that Key.getAscii() respects the key's capitalization and Key.getCode() does not.Code:var keyListener:Object = new Object(); keyListener.onKeyDown = function() { trace("You just typed: "+Key.getCode()); }; Key.addListener(keyListener);
Bookmarks