Moving the cursor to a paricualr text box(Flash 5)

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

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…

I tried it out it still does not work. Any way the syntax asks for avarialbe and not an instance name.

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”);
}

Thanks it works