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:
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: