A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Select Text on onSetFocus

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1

    Select Text on onSetFocus

    Hi, when I click on the text box "text_txt.text", zero should be selected.
    But it is not happening. I have attached file.

    text_txt.text = "0";

    text_txt.onSetFocus = function() {
    Selection.setFocus("text_txt");
    }

    But when i write the code (Selection.setFocus("text_txt")) outside the event handler, it works,

    text_txt.text = "0";
    Selection.setFocus("text_txt");

    Please help.
    Attached Files Attached Files

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