Announcement

Collapse
No announcement yet.

Scaleform - linebreak

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scaleform - linebreak

    Not wanting to use canvas, I am looking for a way to get linebreaks created when the lines reach a certain length.

    Basically I was going to use something like this.
    Code:
    class My_Text extends GFxMoviePlayer;
    
    var GFxObject myTextField;
    
    myTextField.SetString("text", "This is the very best line of text i ever saw -somewhere in here i want linebreaks!");
    Basically I want the text to show up something like this:
    Code:
    This is the very best
    line of text i ever saw
    -somewhere in here i
    want linebreaks!
    I am aware that I can use \n to force a linebreak, and that is what I want - in a function.
    But I need a way to check for when the line is X amount long.

    #2
    \n is a new line character in Action Script. But If you want the string to be automatically formatted just use a TextField or TextArea with a size that suits you. And remember to set a TextField in your movie to multiline.

    Comment


      #3
      Originally posted by piotrO View Post
      \n is a new line character in Action Script. But If you want the string to be automatically formatted just use a TextField or TextArea with a size that suits you. And remember to set a TextField in your movie to multiline.
      Thanks for the tip. I will look for the multiline option.

      Comment

      Working...
      X