Key press?

Hello,
I have a key press pb…


onClipEvent (load) {
	my_hear = new Object();
	Key.addListener(my_hear);


		
}
onClipEvent (enterFrame) {
	my_hear.onKeyUp = function() {
		trace("up");
	};
	my_hear.onKeyDown = function() {
		trace("down");
		
	};

}

This simply doesn’t work… If i press down, it traces “down” but if i press “up”, most of the time it traces “down” as well… Sometimes “up” but not that often… like randomly What’s wrong??

onKeyUp means when the key is released, not when you press the UP ARROW key.
Same goes for onKeyDown.

lol ok thanks

Key.UP

is the key code for the up arrow key

Prophet.

yea found it thanks :slight_smile: