dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Line breaks in text field?

  1. #1
    Senior Member
    Join Date
    Feb 2002
    Location
    Newcastle Upon Tyne
    Posts
    324

    Line breaks in text field?

    Hello everyone,

    Does anyone know if there is anyway to create line breaks in a text field. I have a large paragraph of text that I am inputting through actionscript. I don't want it to scroll along until the end of the text box, but would like to instruct it where to put the line breaks. Please don't tell me I have to put a seperate text box for each line!

    I'm using MX Educational (Actionscript 1.0)

    Thanks
    Graeme

  2. #2
    Senior Member wessamzeidan's Avatar
    Join Date
    Sep 2003
    Location
    Lebanon
    Posts
    160
    myTextField.text="My lines\n of text";
    Proudly a Palestinian

  3. #3
    Member
    Join Date
    Aug 2003
    Posts
    51
    _root.createTextField("mytext",1,100,100,100,100);

    mytext.multiline = true;
    mytext.wordWrap = true;
    mytext.selectable = false;

    mytext.text = "enter your text here enter your text here enter your text here enter your text here";

  4. #4
    Senior Member
    Join Date
    Feb 2002
    Location
    Newcastle Upon Tyne
    Posts
    324
    Spot on.

    Thanks
    Graeme

  5. #5
    Member
    Join Date
    Aug 2002
    Posts
    37
    is there a way to have a list using this same method ?

    something like:
    mytext.text = "<li>red</li><li>blue</li><li>green</li><li>yellow</li><li>orange</li>";

    or "mytext.text = "red<br>blue<br>green<br>yellow<br>orange<br>" ;

    that would display:
    red
    blue
    green
    yellow
    orange

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    37
    never mind, misread the above post, just add " \n " where you want to break the line.

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