PDA

View Full Version : Moving the cursor to a paricualr text box(Flash 5)



ani21_76
April 25th, 2003, 02:26 AM
I have 2 input text boxes. On entering the data in 1st input text and pressing "ENTER" key, the focus should move to the 2nd input text box.
I tried this by method Selection.sefocus(<variable>), but the focus does not move to the 2nd input text. This in flash5. It's urgent.Please hlep.

Thanx in advance

fishtank
April 25th, 2003, 07:04 AM
hm, try this:

make a new button, and put some circle or whatever in it and make it invisible (alpha). place it anywhere in your movieclip (but try not to put it over an animation, would be very processor-intensive)

give it the action:

on (keyPress "<Enter>") {
selection.setFocus("instancenameof2ndtextbox");
}

hope this helps...

ani21_76
April 26th, 2003, 02:13 AM
I tried it out it still does not work. Any way the syntax asks for avarialbe and not an instance name.

fishtank
April 26th, 2003, 05:18 AM
hm, sorry, my mistake, do no use the instancename, use the variable of the textfiel.

it may be flash 5 which doesnt know some of the commands...

ive just seen that the board has deleted the name of the key...

it should be like that: (instert a < before and a > after the word enter.

on (keyPress "enter") {
selection.setFocus("instancenameof2ndtextbox");
}

ani21_76
April 28th, 2003, 08:16 AM
Thanks it works