Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function insertBreakLines()
- {
- var saveText = text;
- var last = _finalText.length;
- var n0:Int = 0;
- var n1:Int = 0;
- while (true)
- {
- last = _finalText.substr(0, last).lastIndexOf(" ");
- if (last <= 0)
- break;
- text = prefix + _finalText;
- n0 = textField.numLines;
- var nextText = _finalText.substr(0, last) + "\n" + _finalText.substr(last + 1, _finalText.length);
- text = prefix + nextText;
- n1 = textField.numLines;
- if (n0 == n1)
- {
- _finalText = nextText;
- }
- }
- text = saveText;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement