A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to select a dynamic text field?

  1. #1
    Confounded Flash User
    Join Date
    Apr 2001
    Location
    Chicago
    Posts
    39

    How to select a dynamic text field?

    I'm working on a page where the user enters their password, then confirms it, so of course their are two dynamic text boxes.

    For the first text box, they enter keys on a keyboard and of course the text goes into the text field, like so.

    myTextField_txt.appendText(myKeyPressedString);

    Works fine.

    However, I can't seem to figure out when they are done with the first password how to switch them to the second text field. Clicking on the area where the second dynamic text field is doesn't highlight it or give me a cursor.

    We really want to do this on one page, not two. Is there some way to make the second field selectable to change the target for the keyboard?

  2. #2

  3. #3
    Confounded Flash User
    Join Date
    Apr 2001
    Location
    Chicago
    Posts
    39
    Oh man, holy DUH.

    Ok that works, in which case I need to know which input is selected. I assume I can make a var to store it and then use that to append the text to proper field like so...

    var myField = textFieldA; // to start with...

    I assume then I need to put an event listener on each text field so when it is selected, I can change the myField var to the proper one. Is there such a listener for a text field?

  4. #4

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