PDA

View Full Version : Key Code for enter or return


GoneNuts
12-02-2007, 06:50 PM
for some reason I can't find the key code for return, enter or any of these keys qwertyuioplkjhgfdsazxcvbnm.. I am using this trace.

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); stage.addEventListener(KeyboardEvent.KEY_UP, keyUPHandler);
function keyDownHandler(event:KeyboardEvent):void {

trace("KEY DOWN")
trace("keyDownHandler: " + event.keyCode);
trace("ctrlKey: " + event.ctrlKey);
trace("keyLocation: " + event.keyLocation);
trace("shiftKey: " + event.shiftKey);
trace("altKey: " + event.altKey);
trace("==============================================") }
function keyUPHandler(event:KeyboardEvent):void {
trace("KEY UP")
trace("keyDownHandler: " + event.keyCode);
trace("ctrlKey: " + event.ctrlKey);
trace("keyLocation: " + event.keyLocation);
trace("shiftKey: " + event.shiftKey);
trace("altKey: " + event.altKey);
trace("==============================================") }

it works fine but when I press the keys mentioned above it just can't here them. Can anyone help.. I am new to action script and I am trying to learn using action 3. :confused:

panel
12-02-2007, 09:50 PM
After compile movie go to menu control -> disable keyboard shourtcuts

GoneNuts
12-03-2007, 07:35 AM
Thanks Panel spent 3 hr trying to figure this out and in five seconds with your help my headache has gone...

Cheers m8t