ForumsProgramming ForumCode which about pressing button

4 2742
machinegun
offline
machinegun
4 posts
1,325

Th players can press "W A S & D" to control the movement of the chacters during the game. But, what is the code of this?
Moreover, I don't know what the name of the button is.
For ex. "space" button is :
if (keyisDown(Key(space)){
_root.gotoandplay(2);
}

But , how about other?(Key"A","B","c"...)
If I write this:
if (keyisDown(Key(A)){
_root.gotoandplay(2);
}
It didn't work when I press button "A"?!
Can someone tell me about this???

  • 4 Replies
dank
offline
dank
1,002 posts
960

You have to use the integer ASCII value in place of the letter.

machinegun
offline
machinegun
4 posts
1,325

what is the integer ASCII value ?
Where is it?
How do I use it?

MikeVarilek
offline
MikeVarilek
36 posts
40

http://en.wikipedia.org/wiki/ASCII
Under Ascii printable Characters, use the Dec number for the letters
so 65 for A
66 for B
etc...

flipje225
offline
flipje225
1 posts
40

use the assistance and chose "on" and you can type in your key, A, B, C, 1,2, and forward

Showing 1-4 of 4