A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: WHY: trace(TextField.enabled) returns null

Hybrid View

  1. #1
    Italy Novik2000's Avatar
    Join Date
    Jun 2001
    Posts
    360

    WHY: trace(TextField.enabled) returns null

    hi,
    i got myText (TextField) and a button that does :
    Code:
    on (release)
    {
    trace(myText.enabled);
    }
    the problem is that this code return "undefined". why is that?
    Attached Files Attached Files
    Last edited by Novik2000; 06-02-2010 at 04:16 AM.

  2. #2
    Member
    Join Date
    Mar 2002
    Location
    Auburn, WA
    Posts
    69
    You didn't set myText.enabled to true or false.

    so trace(myText.enabled) is looking for a value that doesn't exist.

    make a new frame layer called actions. and put:

    Code:
    myText.enabled = true;
    or

    Code:
    myText.enabled = false;

    hope that helps.

    wyl_m

  3. #3
    Italy Novik2000's Avatar
    Join Date
    Jun 2001
    Posts
    360
    welp, it did help but now i got other problem
    (the problem i started with...)

    how can i make that the user can't mark the text with the mouse and do Copy/Paste?!

  4. #4
    FK Slacker
    Join Date
    Jun 2000
    Location
    vancouver
    Posts
    3,208
    TextField.selectable=false;

    Or uncheck the selectable box (looks like: Ab) in the Properties panel...

    K.

  5. #5
    Italy Novik2000's Avatar
    Join Date
    Jun 2001
    Posts
    360
    thanks!!

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