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

**URL:** <https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200>\
**Category:** flash\
**Created:** [April 25, 2003, 6:26am UTC](https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200 "2003-04-25T06:26:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ani21\_76](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@ani21\_76](https://forum.kirupa.com/u/ani21_76)\
**Post date:** [April 25, 2003, 6:26am UTC](https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200/1 "2003-04-25T06:26:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 25, 2003, 11:04am UTC](https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200/2 "2003-04-25T11:04:30Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 26, 2003, 6:13am UTC](https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200/3 "2003-04-26T06:13:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 26, 2003, 9:18am UTC](https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200/4 "2003-04-26T09:18:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 28, 2003, 12:16pm UTC](https://forum.kirupa.com/t/moving-the-cursor-to-a-paricualr-text-box-flash-5/19200/5 "2003-04-28T12:16:48Z")

</div>

Thanks it works
