Making a Text Entity a block


(Max Marze) #1

Hi,

I’m relatively new to certain parts of FlashPunk but I am currently reading a text file into a Text Entity to be displayed but what I want to know right now is how I can make it that the text goes as a block instead of one line. How can I do that?


(Chris Logsdon) #2

The Text constructor can take a width and a height. This is the size of the rectangle that the text is contained in. If it’s 0, 0, then the rectangle sizes to fit the string. If you give the rectangle a size, though, it will wrap the string when it would exceed the bounds of the rectangle.


(Max Marze) #3

Thank you very Much!