
-----------------------------------
nis
Tue Mar 09, 2004 4:31 pm

How can i use the keyboard in flash
-----------------------------------
How do i make the computer reconize when the 'a' button is pressed or 'b' etc. I know how to use the arrow keys (Key.UP, Key.DOWN, etc) but how do i use the other keys? thanks

-----------------------------------
Tony
Tue Mar 09, 2004 5:16 pm


-----------------------------------
well the same way as Key.UP/DOWN, but instead you might have to use their ASCII values :?

-----------------------------------
zylum
Tue Mar 09, 2004 8:20 pm


-----------------------------------
yeah tony is right, you need to use ascii. here's a simple way to check what the ascii value of the last letter you pressed:

onEnterFrame = function () {
	// checks if a is being pressed
	// if (Key.isDown(65)) {
	// trace("fun");
	// }
	
	// gives you the keyCode for the last letter you pressed
	trace(Key.getCode());
};

-zylum

-----------------------------------
nis#2
Thu Mar 11, 2004 5:04 pm


-----------------------------------
Thanks
