[fmx] problem with onKeyDown

[The short question]

I know you can find what key has been pressed by using the Key.getAscii() in onKeyDown but is there a way to find out what key

was let go of when using the onKeyUp.

I mean, if I push the ‘d’ key, I can use Key.getAscii() to tell me that the key pressed was 100 or ‘d’ but how can I tell what

key was released?

Say I press two keys, one after the other, and hold them down, so both keys have been pressed. Using getAscii, I can tell what

keys are down and what order they were pressed. But say then, I let go of one key. I know that a key was released using

onKeyUp, but as far as I know, I cant find out what key was let go off.

Is there any way to do this?

[The long version]

ok, I’m making a mortal kombat-ish fighting game.
When the user pushes the block key, it has to make the character block. At the same time it has to disable all other keys.

Meaning you cant punch, kick or move while holding the block key.

This is where my problem starts.

say some one is holding block, the character will go into the block position until the block key is released. But as far as I

know, you can never tell what key has been released, you can only tell when it has, but not what it was.

Here is [a simplified version of] my code

[AS]onClipEvent (load) {
myListener = new Object();
}
onClipEvent (enterFrame) {
myListener.onKeyDown=function(){
keyHit=Key.getAscii();
}
myListener.onKeyUp=function(){
keyHit=-1;
}
if (keyHit==100)state=“block”;
//ascii 100 = ‘d’ which is what I use for block…
else state=""
}[/AS]

The way this works now, When you hit ‘d’ it sets the state to “block” and when you let go, it sets it to “”
But What if, while your holding the ‘d’ key, you press and release the left arrow key. onKeyUp will recognize that a key has

been released and make the character unblock, even thought the ‘d’ key is still down.

If there was a way to check what key has been released, I could make something like if (Key.getUpAscii()==100) etc… but no

such function exists.

Any help would be great.

PS, While writing this post, I stumbled across Key.isDown, I haven’t looked at it too much but could this help me at all?
Anyway, thanks ahead of time for any help