package { import flash.display.Sprite; import flash.text.engine.*; [SWF(width="200", height="80")] public class FTEDemo9 extends Sprite { public function FTEDemo9() { super(); var e1:TextElement = new TextElement('"Saying what we think gives us a wider conversational range than saying what we know."', new ElementFormat(null, 16)); var e2:TextElement = new TextElement('\n- Cullen Hightower', new ElementFormat(null, 16, 0xCC3300)); var block:TextBlock = new TextBlock(new GroupElement(new [e1, e2], new ElementFormat())); block.textJustifier = new SpaceJustifier("en", LineJustification.ALL_BUT_LAST, true); var y:Number = 0; var line:TextLine = block.createTextLine(null, 200); while(line) { addChild(line); y += line.ascent; line.y = y; y += line.descent; line = block.createTextLine(line, 200); } } } }