2 Replies Latest reply on Aug 10, 2006 12:29 PM by joedisney

    set focus on text entry box

    joedisney
      I am using Flash 8 for a simulation exercise and we are using screen shots of our software and I need to be able to put a transparent text entry box over an area of the screen shot and I need it to have the cursor blnking in the text entry box as soon as the frame displays. Is there a way to do this? I was using setFocus() on the text box movie clip that i made but still no blinking cursor unless I click on the screen first.Thanks
        • 1. Re: set focus on text entry box
          ufitzi
          Use the static class Selection:
          Selection.setFocus(UI component name);
          Selection.setSelection(0,0);
          //setSelection(rowposition,columnposition), I believe is the sytax, maybe the other way around.
          That should do it.
          bh
          • 2. Re: set focus on text entry box
            joedisney Level 1
            I cannot get it to work. I created a text box then made it into a movie and put the following code on the movie but you still have to click on the screen first before the cursor starts blinking in the text box. My text box movie instance name is joe2:

            onClipEvent (load) {
            Selection.setFocus("joe2");
            Selection.setSelection(0,0);
            //setSelection(rowposition,columnposition), I believe is the sytax, maybe the other way around.
            }

            What am I doing wrong? Thanks.