PDA

View Full Version : raising keystrokes


arni_venky
09-05-2003, 03:38 PM
Hi Friend,
Is there any way to generate keystroke dynamically ? (as we do in vb using "sendKey()"), let me explain my requirement, i have to generate the keystroke automatically based on some events,
eg if User presses downarrow, i want to generate a "tab" key to make the next (tabindex) TextField to receive focus, i beleive u can understand what i'm comming to ask.

your help is much appreciated.

regards
Venkatesh.M

farafiro
09-07-2003, 04:04 AM
I think u can do this with:
making the tabIndex with the sorting u want
or u may like this_root.createTextField("one",1,10,10,300,20)
one.border = true
one.text = "koko wawa"
one.type = "input"
//
_root.createTextField("two",2,10,40,300,20)
two.border = true
two.text = "koko wawa"
two.type = "input"
//
_root.onEnterFrame = function(){
if(Key.isDown(Key.DOWN)){
Selection.setFocus(two)
}
if(Key.isDown(Key.UP)){
Selection.setFocus(one)
}
}