A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Are some TextField parameters irreversable?

  1. #1
    Banned indivision's Avatar
    Join Date
    Jul 2001
    Location
    Portland, OR
    Posts
    474

    Are some TextField parameters irreversable?

    Try this:

    In a new, blank fla, place a dynamic textfield on the stage with default settings.

    Give it a name(myTextField) and a variable reference(myValue).

    Set 'myValue' to some long text that wont fit horizontally in the text field.

    Then, create a button that sets multiline to true( myTextField.multiline=true; ).

    I would think that clicking this button should re-draw the text so that it wraps around, but it doesn't seem to affect it at all. Is there some step I'm missing to change multiline dynamically? The behavior is the same in reverse, so if you set multiline to true in the first frame when it is instantiated it works, but if you try to change it to false on a button, it doesnt do anything. Also, some other attributes, like autoSize are the same. But, I can't seem to find anything in Macromedia documentation that explains this.

    Any help would be greatly appreciated.

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    omg your post count changed!

    I havn't given my textfield a variable reference since flash 5. There's no point, especially since it will sometimes conflict or cancel out the instance name.

    Do all your text settings through myTextField.text

  3. #3
    Banned indivision's Avatar
    Join Date
    Jul 2001
    Location
    Portland, OR
    Posts
    474
    i know it. i really had a dilemma posting this and changing my count!

    I agree about using the textfield 'text' variable instead. but, do you have any info about why changing those parameters doesnt do anything once they are set at initialization?

  4. #4
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Set wordwrap to true also:

    myTextField.multiline = true;
    myTextField.wordWrap = true;

  5. #5
    Banned indivision's Avatar
    Join Date
    Jul 2001
    Location
    Portland, OR
    Posts
    474
    thank you.

    it turns out that i just had TextFormat and TextField mixed up. I was trying to apply multiline and wordWrap via texformat. Apparently TextFormat is a dynamic class or something but it would have been nice to get type mismatch errors on this one.

    Thanks again. Definitely helped me troubleshoot.

  6. #6
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    I had that problem with embedFont too, just seems like it should go in TextFormat.

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