Re: [Flashcoders] Flash Text Engine

2009-02-17 Thread Cedric Muller

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'



b) you can pass the TextFlow instance if you create your text line  
from a textflow object (createTextLinesFromTextFlow)



- API docs:


And I'd like to recommend you to read this white paper (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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Text Engine

2009-02-17 Thread Cedric Muller

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'



b) you can pass the TextFlow instance if you create your text line  
from a textflow object (createTextLinesFromTextFlow)



- API docs:


And I'd like to recommend you to read this white paper (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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Text Engine

2009-02-17 Thread Glen Pike

Hi,

   I am using the flash.text.engine classes not the flashx.textLayout ones.

   All I want to do is put some text into the equivalent of a button 
text field and have it aligned to the right if my text is in Arabic - I 
don't need all the extra Text Layout Framework stuff for this (hopefully).


   Glen

Cedric Muller wrote:

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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Flash Text Engine

2009-02-17 Thread Cedric Muller

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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders