Skip navigation
Sawlay
Currently Being Moderated

adding new line and sapaces in between the text in AI Script

Apr 2, 2012 12:06 AM

areaText.contents = "This is an Area Text in a rectangle. See how it flows to the next line.";

 

 

 

/*

i want to break the sentance from 'Text' ie i want to add new line in between and also some more spaces can any one plz help

*/

 

for example

I want to write the above text like this way

 

 

this is an Area

Text in a rectangle.   See

    how it       flows to the

next line  

 
Replies
  • Currently Being Moderated
    Apr 2, 2012 2:40 AM   in reply to Sawlay

    that's a much better explanation, you didn't have to create another thread, you could have replied to my reply in the original thread.

     

    we use the "\r" character to insert a new line and we can use "\t" to insert a "tab" for the spaces, or the actual spaces in a variable

     

    var sixSpaces = "      ";
    areaText.contents = "This is an Area\rText in a rectangle." + sixSpaces + "See\r" + sixSpaces + "how it" + sixSpaces + "flows to the\rnext line.";
    
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2012 3:42 AM   in reply to Sawlay

    A screen grab with text invisibles switched on is always a good help…

     

    Screen shot 2012-04-02 at 11.40.10.png

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points