A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: setFocus text

  1. #1
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784

    setFocus text

    Ok, first let me clarify that I have used the search and I found what I was looking for, but I can't seem to get it to work. I have an input textbox that I want to automatically get the focus. Right now I am using this
    Code:
    setFocus(input_text);
    input_text.text = "";
    It clears the textbox, but it won't put the blinking cursor in the textbox. I have to manually click on the box. Is there a way to make it so the blinking cursor goes to the textbox? Thanks
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  2. #2
    curiouser and curiouser LittleRed's Avatar
    Join Date
    Mar 2004
    Location
    Nottingham
    Posts
    335
    i've been using this:
    Code:
    Selection.setFocus(nameinput);
    Selection.setSelection(0, 1);
    where nameinput is the name of my Input Text box.
    hope it helps...

  3. #3
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    what is Selection? Also it kind of worked, but I can't use backspace.
    Last edited by TheLostGuru; 06-06-2007 at 09:10 AM.
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  4. #4
    curiouser and curiouser LittleRed's Avatar
    Join Date
    Mar 2004
    Location
    Nottingham
    Posts
    335
    it's a standard flash object:
    http://www.adobe.com/support/flash/a...ionary635.html
    I don't know why backspace won't work though...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center