ok, ok, then I am totally offroads, once again .... :D

sorry Glen :(

oops, I misread your question, sorry.

Regarding a TextLineFactory (ie: the "simple" text engine):

a) you can directly pass the paragraphFormat attributes to the 'createTextLinesFromString' <http://livedocs.adobe.com/labs/textlayout/flashx/textLayout/ factory/TextLineFactory.html#createTextLinesFromString()>

b) you can pass the TextFlow instance if you create your text line from a textflow object (createTextLinesFromTextFlow) <http://livedocs.adobe.com/labs/textlayout/flashx/textLayout/ factory/TextLineFactory.html#createTextLinesFromTextFlow()>

- API docs:
<http://livedocs.adobe.com/labs/textlayout/>

And I'd like to recommend you to read this white paper (pdf)
<http://download.macromedia.com/pub/labs/textlayout/ textlayout_flashcomponent_overview.pdf>

It *seems* hard to grab, but when you read it everything gets clearer. Btw, I need to read it again :)


hth,
Cedric


Hello Glen,

Assuming you have a TextFlow instance called 'myTextFlow), you can tweak the paragraphFormat property:

var paragraphFormat = new ParagraphFormat (myTextFlow.paragraphFormat); paragraphFormat.textAlign = "right"; // "left", "center", "justify", "start", "end" (start/end is useful for RTL + LTR multi language applications)
myTextFlow.paragraphFormat = paragraphFormat;
myTextFlow.flowComposer.updateAllContainers();

This applies the new paragraphFormat.align property to your whole textFlow object (ie: all the text).


hth,
Cedric


Hi,



   Quick question about the new text engine in Flash 10...

I am using the "simple" text engine rather than the full on text layout framework, but can anyone tell me how I set the alignment of a TextElement / TextBlock / TextLine???

   Thanks..

   Glen

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to