all groups > flash actionscript > september 2004 >
You're in the

flash actionscript

group:

key.getcode() ??


key.getcode() ?? dmcdonald
9/20/2004 11:37:46 PM
flash actionscript:
I posted this to the wrong forum originally.

I'm trying to simulate a mainframe system in which the user types in a certain
code (in an input field) and then has to hit the tab key to get to the next
field. I need to see if they have typed in the right code, then if so, check to
see if they have hit the tab key. I'm using the input field with a variable
name to test the input field and I thought the keycode to check if they have
pressed the tab key. Can someone tell me if I'm on the right path?
Re: key.getcode() ?? mandingo
9/21/2004 12:56:29 AM
setup a keylistener

myListener = new Object();
myListener.onKeyDown = function(){
if(Key.isDown(Key.TAB)){
// check the value and go to the next field
}
}
Key.addListener(myListener);

hope that helps
cheers,
AddThis Social Bookmark Button