A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Disabling focus (editing) of a text field

  1. #1
    Senior Member somlemeg's Avatar
    Join Date
    Aug 2000
    Posts
    171

    Question Disabling focus (editing) of a text field

    AS v2:
    When the user clicks outside a textfield on stage (named showNotes), I don't want the textfield to be editable anymore.

    I have tried to set the focus to another text field, but it doesn't work:



    PHP Code:
    onClipEvent (mouseDown) {
    _root.createTextField("myTF"12050501010);
    _root.myTF.type="input";
    _root.myTF.text=" "//a SPACE or temp "foo" text, but NOT empty !
    _root.myTF.stage.focus myTFmyTF.setSelection(myTF.length,myTF.length);
    Selection.setFocus("_root.myTF");
    _root.myTF.text "";
    showNotes.selectable false;

    Also tried:

    PHP Code:
    stage.focus null


    Please help.

    (edit) Ps: changing the selectable property of the text field disables the blinking | coursor, but the user can still write in it.
    Last edited by somlemeg; 12-18-2009 at 06:15 PM.

Tags for this Thread

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