A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: easy textField question

  1. #1
    Member
    Join Date
    Oct 2004
    Location
    california
    Posts
    31

    easy textField question

    Say I'm updating a textField by adding a new line, a la a chat window. how do I start the added text on a new line?

    code:

    thisTextField.text = (thisTextField.text + /*i want a carriage return here...*/ + newTextLine);



    basically.

    Richard

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    code:

    thisTextField.text = (thisTextField.text + "\n" + newTextLine);



    or use the += operator to save some typing:

    code:

    thisTextField.text += "\n" + newTextLine;



    \n is an escape character which provides a newline.

  3. #3
    Member
    Join Date
    Oct 2004
    Location
    california
    Posts
    31

    thank you

    Great! That does it. Actually I found that "/r" will do the same thing.
    Thanks very much.

    Richard

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