Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
flashx.textLayout.formats 
TextLayoutFormat 
Packageflashx.textLayout.formats
Classpublic class TextLayoutFormat
InheritanceTextLayoutFormat Inheritance Object
Implements ITextLayoutFormat

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The TextLayoutFormat class holds all of the text layout properties. These properties affect the format and style of a text flow at the container level, paragraph level, and text level. Both the ContainerController class and the FlowElement base class have format properties that enable you to assign a TextLayoutFormat instance to them. Assign a TextLayoutFormat object to a container to affect the format of all of the container's content. Assign a TextLayoutFormat object to a FlowElement descendant to specify formatting for that particular element: TextFlow, ParagraphElement, DivElement, SpanElement, InlineGraphicElement, LinkElement, and TCYElement. In addition to the format property, these classes also define each of the individual TextLayoutFormat properties so that you can override the setting of a particular style property for that element, if you wish.

Because you can set a given style at multiple levels, it is possible to have conflicts. For example, the color of the text at the TextFlow level could be set to black while a SpanElement object sets it to blue. The general rule is that the setting at the lowest level on the text flow tree takes precedence. So if the ligature level is set for a TextFlow instance and also set for a DivElement, the DivElement setting takes precedence.

Cascading styles refers to the process of adopting styles from a higher level in the text flow if a style value is undefined at a lower level. When a style is undefined on an element at the point it is about to be rendered, it either takes its default value or the value cascades or descends from the value on a parent element. For example, if the transparency (textAlpha property) of the text is undefined on a SpanElement object, but is set on the TextFlow, the value of the TextFlow.textAlpha property cascades to the SpanElement object and is applied to the text for that span. The result of the cascade, or the sum of the styles that is applied to the element, is stored in the element's computedFormat property.

In the same way, you can apply user styles using the userStyles property of the ContainerController and FlowElement classes. This property allows you to read or write a dictionary of user styles and apply its settings to a container or a text flow element. The user styles dictionary is an object that consists of stylename-value pairs. Styles specified by the userStyles property take precedence over all others.

Most styles that are undefined inherit the value of their immediate parent during a cascade. A small number of styles, however, do not inherit their parent�s value and take on their default values instead.

Style properties that adopt their default values, if undefined, include: backgroundAlpha, backgroundColor, columnCount, columnGap, columnWidth, lineBreak, paddingBottom, paddingLeft, paddingRight, paddingTop, verticalAlign

.

View the examples

See also



Public Properties
 PropertyDefined By
  alignmentBaseline : *
Specifies the baseline to which the dominant baseline aligns.
TextLayoutFormat
  backgroundAlpha : *
Alpha (transparency) value for the background (adopts default value if undefined during cascade).
TextLayoutFormat
  backgroundColor : *
Background color of the text (adopts default value if undefined during cascade).
TextLayoutFormat
  baselineShift : *
Amount to shift the baseline from the dominantBaseline value.
TextLayoutFormat
  blockProgression : *
Specifies a vertical or horizontal progression of line placement.
TextLayoutFormat
  breakOpportunity : *
Controls where lines are allowed to break when breaking wrapping text into multiple lines.
TextLayoutFormat
  cffHinting : *
The type of CFF hinting used for this text.
TextLayoutFormat
  color : *
Color of the text.
TextLayoutFormat
  columnCount : *
Number of text columns (adopts default value if undefined during cascade).
TextLayoutFormat
  columnGap : *
Specifies the amount of gutter space, in pixels, to leave between the columns (adopts default value if undefined during cascade).
TextLayoutFormat
  columnWidth : *
Column width in pixels (adopts default value if undefined during cascade).
TextLayoutFormat
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  defaultFormat : flashx.textLayout.formats:ITextLayoutFormat
[static] [read-only] Returns a TextLayoutFormat object with default settings.
TextLayoutFormat
  digitCase : *
The type of digit case used for this text.
TextLayoutFormat
  digitWidth : *
Type of digit width used for this text.
TextLayoutFormat
  direction : *
Specifies the default bidirectional embedding level of the text in the text block.
TextLayoutFormat
  dominantBaseline : *
Specifies which element baseline snaps to the alignmentBaseline to determine the vertical position of the element on the line.
TextLayoutFormat
  firstBaselineOffset : *
Specifies the baseline position of the first line in the container.
TextLayoutFormat
  fontFamily : *
The name of the font to use, or a comma-separated list of font names.
TextLayoutFormat
  fontLookup : *
Font lookup to use.
TextLayoutFormat
  fontSize : *
The size of the text in pixels.
TextLayoutFormat
  fontStyle : *
Style of text.
TextLayoutFormat
  fontWeight : *
Weight of text.
TextLayoutFormat
  justificationRule : *
Rule used to justify text in a paragraph.
TextLayoutFormat
  justificationStyle : *
The style used for justification of the paragraph.
TextLayoutFormat
  kerning : *
Kerning adjusts the pixels between certain character pairs to improve readability.
TextLayoutFormat
  leadingModel : *
Specifies the leading model, which is a combination of leading basis and leading direction.
TextLayoutFormat
  ligatureLevel : *
Controls which of the ligatures that are defined in the font may be used in the text.
TextLayoutFormat
  lineBreak : *
Controls word wrapping within the container (adopts default value if undefined during cascade).
TextLayoutFormat
  lineHeight : *
Leading controls for the text.
TextLayoutFormat
  lineThrough : *
If true, applies strikethrough, a line drawn through the middle of the text.
TextLayoutFormat
  locale : *
The locale of the text.
TextLayoutFormat
  paddingBottom : *
Botttom inset in pixels (adopts default value if undefined during cascade).
TextLayoutFormat
  paddingLeft : *
Left inset in pixels (adopts default value if undefined during cascade).
TextLayoutFormat
  paddingRight : *
Right inset in pixels (adopts default value if undefined during cascade).
TextLayoutFormat
  paddingTop : *
Top inset in pixels (adopts default value if undefined during cascade).
TextLayoutFormat
  paragraphEndIndent : *
A Number that specifies, in pixels, the amount to indent the paragraph's end edge.
TextLayoutFormat
  paragraphSpaceAfter : *
A Number that specifies the amount of space, in pixels, to leave after the paragraph.
TextLayoutFormat
  paragraphSpaceBefore : *
A Number that specifies the amount of space, in pixels, to leave before the paragraph.
TextLayoutFormat
  paragraphStartIndent : *
A Number that specifies, in pixels, the amount to indent the paragraph's start edge.
TextLayoutFormat
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  renderingMode : *
The rendering mode used for this text.
TextLayoutFormat
  tabStops : *
Specifies the tab stops associated with the paragraph.
TextLayoutFormat
  textAlign : *
Alignment of lines in the paragraph relative to the container.
TextLayoutFormat
  textAlignLast : *
Alignment of the last (or only) line in the paragraph relative to the container in justified text.
TextLayoutFormat
  textAlpha : *
Alpha (transparency) value for the text.
TextLayoutFormat
  textDecoration : *
Decoration on text.
TextLayoutFormat
  textIndent : *
A Number that specifies, in pixels, the amount to indent the first line of the paragraph.
TextLayoutFormat
  textJustify : *
Specifies options for justifying text.
TextLayoutFormat
  textRotation : *
Determines the number of degrees to rotate this text.
TextLayoutFormat
  trackingLeft : *
Number in pixels (or percent of fontSize, like 120%) indicating the amount of tracking (manual kerning) to be applied to the left of each character.
TextLayoutFormat
  trackingRight : *
Number in pixels (or percent of fontSize, like 120%) indicating the amount of tracking (manual kerning) to be applied to the right of each character.
TextLayoutFormat
  typographicCase : *
The type of typographic case used for this text.
TextLayoutFormat
  verticalAlign : *
Vertical alignment or justification (adopts default value if undefined during cascade).
TextLayoutFormat
  whiteSpaceCollapse : *
Collapses or preserves whitespace when importing text into a TextFlow.
TextLayoutFormat
Public Methods
 MethodDefined By
  
Creates a new TextLayoutFormat object.
TextLayoutFormat
  
Replaces property values in this TextLayoutFormat object with the values of properties that are set in the incoming ITextLayoutFormat instance.
TextLayoutFormat
  
Concatenates the values of properties in the incoming ITextLayoutFormat instance with the values of this TextLayoutFormat object.
TextLayoutFormat
  
Concatenates the values of properties in the incoming ITextLayoutFormat instance with the values of this TextLayoutFormat object.
TextLayoutFormat
  
Copies TextLayoutFormat settings from the values ITextLayoutFormat instance into this TextLayoutFormat object.
TextLayoutFormat
 Inherited
Indicates whether an object has a specified property defined.
Object
  
[static] Compares properties in ITextLayoutFormat instance p1 with properties in ITextLayoutFormat instance p2 and returns true if all properties match.
TextLayoutFormat
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
Sets properties in this TextLayoutFormat object to undefined if they do not match those in the incoming ITextLayoutFormat instance.
TextLayoutFormat
  
Sets properties in this TextLayoutFormat object to undefined if they match those in the incoming ITextLayoutFormat instance.
TextLayoutFormat
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

alignmentBaseline

property
alignmentBaseline:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the baseline to which the dominant baseline aligns. For example, if you set dominantBaseline to ASCENT, setting alignmentBaseline to DESCENT aligns the top of the text with the DESCENT baseline, or below the line. The largest element in the line generally determines the baselines.

baselines

Legal values are flash.text.engine.TextBaseline.ROMAN, flash.text.engine.TextBaseline.ASCENT, flash.text.engine.TextBaseline.DESCENT, flash.text.engine.TextBaseline.IDEOGRAPHIC_TOP, flash.text.engine.TextBaseline.IDEOGRAPHIC_CENTER, flash.text.engine.TextBaseline.IDEOGRAPHIC_BOTTOM, flash.text.engine.TextBaseline.USE_DOMINANT_BASELINE, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of USE_DOMINANT_BASELINE.



Implementation
    public function get alignmentBaseline():*
    public function set alignmentBaseline(value:any):void

Throws
RangeError — when set value is not within range for this property

See also


Example  ( How to use this example )
This example sets alignmentBaseline to three different values - USE_DOMINANT_BASELINE, DESCENT, and IDEOGRAPHIC_CENTER - for three spans in a paragraph that has dominantBaseline set to ASCENT.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flash.text.engine.TextBaseline;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;

    public class TextLayoutFormat_alignmentBaselineExample extends Sprite
    {
        public function TextLayoutFormat_alignmentBaselineExample()
        {
            // create text flow with dominantBaseline of ASCENT and 3 spans
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();
            paragraph.fontFamily = "Helvetica";
            paragraph.fontSize = 20;
            paragraph.dominantBaseline = TextBaseline.ASCENT    
            var spanOne:SpanElement = new SpanElement();
            var spanTwo:SpanElement = new SpanElement();
            var spanThree:SpanElement = new SpanElement();
            spanOne.text = "Hello, World  ";
            spanTwo.text = "Hello, World  ";
            spanThree.text = "Hello, World";
            
            // add spans to paragraph and specify alignment baseline for each
            paragraph.addChild(spanOne);
            spanOne.alignmentBaseline = TextBaseline.USE_DOMINANT_BASELINE;    
            paragraph.addChild(spanTwo);
            spanTwo.alignmentBaseline = TextBaseline.DESCENT;
            paragraph.addChild(spanThree);
            spanThree.alignmentBaseline = TextBaseline.IDEOGRAPHIC_CENTER;
            
            // add paragraph to TextFlow and set container position
            textFlow.addChild(paragraph);
            this.x = 50;
            this.y = 100;
            
            // update controller to display on stage
            textFlow.flowComposer.addController(new ContainerController(this,400,300));
            textFlow.flowComposer.updateAllControllers();    
        }
    }
}

backgroundAlpha

property 
backgroundAlpha:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Alpha (transparency) value for the background (adopts default value if undefined during cascade). A value of 0 is fully transparent, and a value of 1 is fully opaque. Display objects with alpha set to 0 are active, even though they are invisible.

Legal values are numbers from 0 to 1 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of 1.



Implementation
    public function get backgroundAlpha():*
    public function set backgroundAlpha(value:any):void

Throws
RangeError — when set value is not within range for this property

backgroundColor

property 
backgroundColor:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Background color of the text (adopts default value if undefined during cascade). Can be either the constant value BackgroundColor.TRANSPARENT, or a hexadecimal value that specifies the three 8-bit RGB (red, green, blue) values; for example, 0xFF0000 is red and 0x00FF00 is green.

Legal values as a string are flashx.textLayout.formats.BackgroundColor.TRANSPARENT, flashx.textLayout.formats.FormatValue.INHERIT and uints from 0x0 to 0xffffffff.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of TRANSPARENT.



Implementation
    public function get backgroundColor():*
    public function set backgroundColor(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

baselineShift

property 
baselineShift:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Amount to shift the baseline from the dominantBaseline value. Units are in pixels, or a percentage of fontSize (in which case, enter a string value, like 140%). Positive values shift the line up for horizontal text (right for vertical) and negative values shift it down for horizontal (left for vertical).

Legal values are flashx.textLayout.formats.BaselineShift.SUPERSCRIPT, flashx.textLayout.formats.BaselineShift.SUBSCRIPT, flashx.textLayout.formats.FormatValue.INHERIT.

Legal values as a number are from -1000 to 1000.

Legal values as a percent are numbers from -1000 to 1000.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.0.



Implementation
    public function get baselineShift():*
    public function set baselineShift(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

blockProgression

property 
blockProgression:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies a vertical or horizontal progression of line placement. Lines are either placed top-to-bottom (BlockProgression.TB, used for horizontal text) or right-to-left (BlockProgression.RL, used for vertical text).

Legal values are flashx.textLayout.formats.BlockProgression.RL, flashx.textLayout.formats.BlockProgression.TB, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of TB.



Implementation
    public function get blockProgression():*
    public function set blockProgression(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

breakOpportunity

property 
breakOpportunity:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Controls where lines are allowed to break when breaking wrapping text into multiple lines. Set to BreakOpportunity.AUTO to break text normally. Set to BreakOpportunity.NONE to not break the text unless the text would overrun the measure and there are no other places to break the line. Set to BreakOpportunity.ANY to allow the line to break anywhere, rather than just between words. Set to BreakOpportunity.ALL to have each typographic cluster put on a separate line (useful for text on a path).

Legal values are flash.text.engine.BreakOpportunity.ALL, flash.text.engine.BreakOpportunity.ANY, flash.text.engine.BreakOpportunity.AUTO, flash.text.engine.BreakOpportunity.NONE, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of AUTO.



Implementation
    public function get breakOpportunity():*
    public function set breakOpportunity(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

cffHinting

property 
cffHinting:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The type of CFF hinting used for this text. CFF hinting determines whether the Flash runtime forces strong horizontal stems to fit to a sub pixel grid or not. This property applies only if the renderingMode property is set to RenderingMode.CFF, and the font is embedded (fontLookup property is set to FontLookup.EMBEDDED_CFF). At small screen sizes, hinting produces a clear, legible text for human readers.

Legal values are flash.text.engine.CFFHinting.NONE, flash.text.engine.CFFHinting.HORIZONTAL_STEM, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of HORIZONTAL_STEM.



Implementation
    public function get cffHinting():*
    public function set cffHinting(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

color

property 
color:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Color of the text. A hexadecimal number that specifies three 8-bit RGB (red, green, blue) values; for example, 0xFF0000 is red and 0x00FF00 is green.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get color():*
    public function set color(value:any):void

Throws
RangeError — when set value is not within range for this property

columnCount

property 
columnCount:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Number of text columns (adopts default value if undefined during cascade). The column number overrides the other column settings. Value is an integer, or FormatValue.AUTO if unspecified. If columnCount is not specified,columnWidth is used to create as many columns as can fit in the container.

Legal values as a string are flashx.textLayout.formats.FormatValue.AUTO, flashx.textLayout.formats.FormatValue.INHERIT and from ints from 1 to 50.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of AUTO.



Implementation
    public function get columnCount():*
    public function set columnCount(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

columnGap

property 
columnGap:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the amount of gutter space, in pixels, to leave between the columns (adopts default value if undefined during cascade). Value is a Number

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of 20.



Implementation
    public function get columnGap():*
    public function set columnGap(value:any):void

Throws
RangeError — when set value is not within range for this property

columnWidth

property 
columnWidth:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Column width in pixels (adopts default value if undefined during cascade). If you specify the width of the columns, but not the count, TextLayout will create as many columns of that width as possible, given the container width and columnGap settings. Any remainder space is left after the last column. Value is a Number.

Legal values as a string are flashx.textLayout.formats.FormatValue.AUTO, flashx.textLayout.formats.FormatValue.INHERIT and numbers from 0 to 8000.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of AUTO.



Implementation
    public function get columnWidth():*
    public function set columnWidth(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

defaultFormat

property 
defaultFormat:flashx.textLayout.formats:ITextLayoutFormat  [read-only]

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Returns a TextLayoutFormat object with default settings. This function always returns the same object.



Implementation
    public static function get defaultFormat():flashx.textLayout.formats:ITextLayoutFormat

digitCase

property 
digitCase:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The type of digit case used for this text. Setting the value to DigitCase.OLD_STYLE approximates lowercase letterforms with varying ascenders and descenders. The figures are proportionally spaced. This style is only available in selected typefaces, most commonly in a supplemental or expert font. The DigitCase.LINING setting has all-cap height and is typically monospaced to line up in charts.

digitCase

Legal values are flash.text.engine.DigitCase.DEFAULT, flash.text.engine.DigitCase.LINING, flash.text.engine.DigitCase.OLD_STYLE, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of DEFAULT.



Implementation
    public function get digitCase():*
    public function set digitCase(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

digitWidth

property 
digitWidth:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Type of digit width used for this text. This can be DigitWidth.PROPORTIONAL, which looks best for individual numbers, or DigitWidth.TABULAR, which works best for numbers in tables, charts, and vertical rows.

digitWidth

Legal values are flash.text.engine.DigitWidth.DEFAULT, flash.text.engine.DigitWidth.PROPORTIONAL, flash.text.engine.DigitWidth.TABULAR, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of DEFAULT.



Implementation
    public function get digitWidth():*
    public function set digitWidth(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

direction

property 
direction:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the default bidirectional embedding level of the text in the text block. Left-to-right reading order, as in Latin-style scripts, or right-to-left reading order, as in Arabic or Hebrew. This property also affects column direction when it is applied at the container level. Columns can be either left-to-right or right-to-left, just like text. Below are some examples:

direction

Legal values are flashx.textLayout.formats.Direction.LTR, flashx.textLayout.formats.Direction.RTL, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of LTR.



Implementation
    public function get direction():*
    public function set direction(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

dominantBaseline

property 
dominantBaseline:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies which element baseline snaps to the alignmentBaseline to determine the vertical position of the element on the line. A value of TextBaseline.AUTO selects the dominant baseline based on the locale property of the parent paragraph. For Japanese and Chinese, the selected baseline value is TextBaseline.IDEOGRAPHIC_CENTER; for all others it is TextBaseline.ROMAN. These baseline choices are determined by the choice of font and the font size.

baselines

Legal values are flashx.textLayout.formats.FormatValue.AUTO, flash.text.engine.TextBaseline.ROMAN, flash.text.engine.TextBaseline.ASCENT, flash.text.engine.TextBaseline.DESCENT, flash.text.engine.TextBaseline.IDEOGRAPHIC_TOP, flash.text.engine.TextBaseline.IDEOGRAPHIC_CENTER, flash.text.engine.TextBaseline.IDEOGRAPHIC_BOTTOM, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of flashx.textLayout.formats.FormatValue.AUTO.



Implementation
    public function get dominantBaseline():*
    public function set dominantBaseline(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

firstBaselineOffset

property 
firstBaselineOffset:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the baseline position of the first line in the container. Which baseline this property refers to depends on the container-level locale. For Japanese and Chinese, it is TextBaseline.IDEOGRAPHIC_BOTTOM; for all others it is TextBaseline.ROMAN. The offset from the top inset (or right inset if blockProgression is RL) of the container to the baseline of the first line can be either BaselineOffset.ASCENT, meaning equal to the ascent of the line, BaselineOffset.LINE_HEIGHT, meaning equal to the height of that first line, or any fixed-value number to specify an absolute distance. BaselineOffset.AUTO aligns the ascent of the line with the container top inset.

firstBaselineOffset1firstBaselineOffset2firstBaselineOffset3firstBaselineOffset4

Legal values as a string are flashx.textLayout.formats.BaselineOffset.AUTO, flashx.textLayout.formats.BaselineOffset.ASCENT, flashx.textLayout.formats.BaselineOffset.LINE_HEIGHT, flashx.textLayout.formats.FormatValue.INHERIT and numbers from 0 to 1000.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of AUTO.



Implementation
    public function get firstBaselineOffset():*
    public function set firstBaselineOffset(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

fontFamily

property 
fontFamily:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The name of the font to use, or a comma-separated list of font names. The Flash runtime renders the element with the first available font in the list. For example Arial, Helvetica, _sans causes the player to search for Arial, then Helvetica if Arial is not found, then _sans if neither is found.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of Arial.



Implementation
    public function get fontFamily():*
    public function set fontFamily(value:any):void

Throws
RangeError — when set value is not within range for this property

fontLookup

property 
fontLookup:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Font lookup to use. Specifying FontLookup.DEVICE uses the fonts installed on the system that is running the SWF file. Device fonts result in a smaller movie size, but text is not always rendered the same across different systems and platforms. Specifying FontLookup.EMBEDDED_CFF uses font outlines embedded in the published SWF file. Embedded fonts increase the size of the SWF file (sometimes dramatically), but text is consistently displayed in the chosen font.

Legal values are flash.text.engine.FontLookup.DEVICE, flash.text.engine.FontLookup.EMBEDDED_CFF, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of DEVICE.



Implementation
    public function get fontLookup():*
    public function set fontLookup(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

fontSize

property 
fontSize:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The size of the text in pixels.

Legal values are numbers from 1 to 720 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 12.



Implementation
    public function get fontSize():*
    public function set fontSize(value:any):void

Throws
RangeError — when set value is not within range for this property

fontStyle

property 
fontStyle:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Style of text. May be FontPosture.NORMAL, for use in plain text, or FontPosture.ITALIC for italic. This property applies only to device fonts (fontLookup property is set to flash.text.engine.FontLookup.DEVICE).

Legal values are flash.text.engine.FontPosture.NORMAL, flash.text.engine.FontPosture.ITALIC, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of NORMAL.



Implementation
    public function get fontStyle():*
    public function set fontStyle(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

fontWeight

property 
fontWeight:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Weight of text. May be FontWeight.NORMAL for use in plain text, or FontWeight.BOLD. Applies only to device fonts (fontLookup property is set to flash.text.engine.FontLookup.DEVICE).

Legal values are flash.text.engine.FontWeight.NORMAL, flash.text.engine.FontWeight.BOLD, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of NORMAL.



Implementation
    public function get fontWeight():*
    public function set fontWeight(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

justificationRule

property 
justificationRule:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Rule used to justify text in a paragraph. Default value is FormatValue.AUTO, which justifies text based on the paragraph's locale property. For all languages except Japanese and Chinese, FormatValue.AUTO becomes JustificationRule.SPACE, which adds extra space to the space characters. For Japanese and Chinese, FormatValue.AUTO becomes JustficationRule.EAST_ASIAN. In part, justification changes the spacing of punctuation. In Roman text the comma and Japanese periods take a full character's width but in East Asian text only half of a character's width. Also, in the East Asian text the spacing between sequential punctuation marks becomes tighter, obeying traditional East Asian typographic conventions. Note, too, in the example below the leading that is applied to the second line of the paragraphs. In the East Asian version, the last two lines push left. In the Roman version, the second and following lines push left.

justificationRule

Legal values are flashx.textLayout.formats.JustificationRule.EAST_ASIAN, flashx.textLayout.formats.JustificationRule.SPACE, flashx.textLayout.formats.FormatValue.AUTO, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of flashx.textLayout.formats.FormatValue.AUTO.



Implementation
    public function get justificationRule():*
    public function set justificationRule(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

justificationStyle

property 
justificationStyle:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The style used for justification of the paragraph. Used only in conjunction with a justificationRule setting of JustificationRule.EAST_ASIAN. Default value of FormatValue.AUTO is resolved to JustificationStyle.PUSH_IN_KINSOKU for all locales. The constants defined by the JustificationStyle class specify options for handling kinsoku characters, which are Japanese characters that cannot appear at either the beginning or end of a line. If you want looser text, specify JustificationStyle.PUSH-OUT-ONLY. If you want behavior that is like what you get with the justificationRule of JustificationRule.SPACE, use JustificationStyle.PRIORITIZE-LEAST-ADJUSTMENT.

Legal values are flash.text.engine.JustificationStyle.PRIORITIZE_LEAST_ADJUSTMENT, flash.text.engine.JustificationStyle.PUSH_IN_KINSOKU, flash.text.engine.JustificationStyle.PUSH_OUT_ONLY, flashx.textLayout.formats.FormatValue.AUTO, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of flashx.textLayout.formats.FormatValue.AUTO.



Implementation
    public function get justificationStyle():*
    public function set justificationStyle(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

kerning

property 
kerning:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Kerning adjusts the pixels between certain character pairs to improve readability. Kerning is supported for all fonts with kerning tables.

Legal values are flash.text.engine.Kerning.ON, flash.text.engine.Kerning.OFF, flash.text.engine.Kerning.AUTO, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of AUTO.



Implementation
    public function get kerning():*
    public function set kerning(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

leadingModel

property 
leadingModel:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the leading model, which is a combination of leading basis and leading direction. Leading basis is the baseline to which the lineHeight property refers. Leading direction determines whether the lineHeight property refers to the distance of a line's baseline from that of the line before it or the line after it. The default value of FormatValue.AUTO is resolved based on the paragraph's locale property. For Japanese and Chinese, it is LeadingModel.IDEOGRAPHIC_TOP_DOWN and for all others it is LeadingModel.ROMAN_UP.

Leading Basis:

leadingBasis1 leadingBasis2 leadingBasis3

Leading Direction:

leadingDirection1 leadingDirection2 leadingDirection3

Legal values are flashx.textLayout.formats.LeadingModel.ROMAN_UP, flashx.textLayout.formats.LeadingModel.IDEOGRAPHIC_TOP_UP, flashx.textLayout.formats.LeadingModel.IDEOGRAPHIC_CENTER_UP, flashx.textLayout.formats.LeadingModel.IDEOGRAPHIC_TOP_DOWN, flashx.textLayout.formats.LeadingModel.IDEOGRAPHIC_CENTER_DOWN, flashx.textLayout.formats.LeadingModel.APPROXIMATE_TEXT_FIELD, flashx.textLayout.formats.LeadingModel.ASCENT_DESCENT_UP, flashx.textLayout.formats.LeadingModel.AUTO, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of AUTO.



Implementation
    public function get leadingModel():*
    public function set leadingModel(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

ligatureLevel

property 
ligatureLevel:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Controls which of the ligatures that are defined in the font may be used in the text. The ligatures that appear for each of these settings is dependent on the font. A ligature occurs where two or more letter-forms are joined as a single glyph. Ligatures usually replace consecutive characters sharing common components, such as the letter pairs 'fi', 'fl', or 'ae'. They are used with both Latin and Non-Latin character sets. The ligatures enabled by the values of the LigatureLevel class - MINIMUM, COMMON, UNCOMMON, and EXOTIC - are additive. Each value enables a new set of ligatures, but also includes those of the previous types.

Note: When working with Arabic or Syriac fonts, ligatureLevel must be set to MINIMUM or above.

ligatureLevel

Legal values are flash.text.engine.LigatureLevel.MINIMUM, flash.text.engine.LigatureLevel.COMMON, flash.text.engine.LigatureLevel.UNCOMMON, flash.text.engine.LigatureLevel.EXOTIC, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of COMMON.



Implementation
    public function get ligatureLevel():*
    public function set ligatureLevel(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

lineBreak

property 
lineBreak:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Controls word wrapping within the container (adopts default value if undefined during cascade). Text in the container may be set to fit the width of the container (LineBreak.TO_FIT), or can be set to break only at explicit return or line feed characters (LineBreak.EXPLICIT).

Legal values are flashx.textLayout.formats.LineBreak.EXPLICIT, flashx.textLayout.formats.LineBreak.TO_FIT, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of TO_FIT.



Implementation
    public function get lineBreak():*
    public function set lineBreak(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

lineHeight

property 
lineHeight:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Leading controls for the text. The distance from the baseline of the previous or the next line (based on LeadingModel) to the baseline of the current line is equal to the maximum amount of the leading applied to any character in the line. This is either a number or a percent. If specifying a percent, enter a string value, like 140%.

lineHeight1lineHeight2

Legal values as a number are from -720 to 720.

Legal values as a percent are numbers from -1000% to 1000%.

Legal values include flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 120%.



Implementation
    public function get lineHeight():*
    public function set lineHeight(value:any):void

Throws
RangeError — when set value is not within range for this property

lineThrough

property 
lineThrough:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

If true, applies strikethrough, a line drawn through the middle of the text.

Legal values are true, false and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of false.



Implementation
    public function get lineThrough():*
    public function set lineThrough(value:any):void

Throws
RangeError — when set value is not within range for this property

locale

property 
locale:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The locale of the text. Controls case transformations and shaping. Standard locale identifiers as described in Unicode Technical Standard #35 are used. For example en, en_US and en-US are all English, ja is Japanese.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of en.



Implementation
    public function get locale():*
    public function set locale(value:any):void

Throws
RangeError — when set value is not within range for this property

paddingBottom

property 
paddingBottom:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Botttom inset in pixels (adopts default value if undefined during cascade). Space between the bottom edge of the container and the text. Value is a Number.

With horizontal text, in scrollable containers with multiple columns, the first and following columns will show the padding as blank space at the bottom of the container, but for the last column, if the text doesn't all fit, you may have to scroll in order to see the padding.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of 0.



Implementation
    public function get paddingBottom():*
    public function set paddingBottom(value:any):void

Throws
RangeError — when set value is not within range for this property

paddingLeft

property 
paddingLeft:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Left inset in pixels (adopts default value if undefined during cascade). Space between the left edge of the container and the text. Value is a Number.

With vertical text, in scrollable containers with multiple columns, the first and following columns will show the padding as blank space at the end of the container, but for the last column, if the text doesn't all fit, you may have to scroll in order to see the padding.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of 0.



Implementation
    public function get paddingLeft():*
    public function set paddingLeft(value:any):void

Throws
RangeError — when set value is not within range for this property

paddingRight

property 
paddingRight:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Right inset in pixels (adopts default value if undefined during cascade). Space between the right edge of the container and the text. Value is a Number.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of 0.



Implementation
    public function get paddingRight():*
    public function set paddingRight(value:any):void

Throws
RangeError — when set value is not within range for this property

paddingTop

property 
paddingTop:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Top inset in pixels (adopts default value if undefined during cascade). Space between the top edge of the container and the text. Value is a Number.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of 0.



Implementation
    public function get paddingTop():*
    public function set paddingTop(value:any):void

Throws
RangeError — when set value is not within range for this property

paragraphEndIndent

property 
paragraphEndIndent:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

A Number that specifies, in pixels, the amount to indent the paragraph's end edge. Refers to the right edge in left-to-right text and the left edge in right-to-left text.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get paragraphEndIndent():*
    public function set paragraphEndIndent(value:any):void

Throws
RangeError — when set value is not within range for this property

paragraphSpaceAfter

property 
paragraphSpaceAfter:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

A Number that specifies the amount of space, in pixels, to leave after the paragraph. Collapses in tandem with paragraphSpaceBefore.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get paragraphSpaceAfter():*
    public function set paragraphSpaceAfter(value:any):void

Throws
RangeError — when set value is not within range for this property

paragraphSpaceBefore

property 
paragraphSpaceBefore:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

A Number that specifies the amount of space, in pixels, to leave before the paragraph. Collapses in tandem with paragraphSpaceAfter.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get paragraphSpaceBefore():*
    public function set paragraphSpaceBefore(value:any):void

Throws
RangeError — when set value is not within range for this property

paragraphStartIndent

property 
paragraphStartIndent:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

A Number that specifies, in pixels, the amount to indent the paragraph's start edge. Refers to the left edge in left-to-right text and the right edge in right-to-left text.

Legal values are numbers from 0 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get paragraphStartIndent():*
    public function set paragraphStartIndent(value:any):void

Throws
RangeError — when set value is not within range for this property

renderingMode

property 
renderingMode:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The rendering mode used for this text. Applies only to embedded fonts (fontLookup property is set to FontLookup.EMBEDDED_CFF).

Legal values are flash.text.engine.RenderingMode.NORMAL, flash.text.engine.RenderingMode.CFF, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of CFF.



Implementation
    public function get renderingMode():*
    public function set renderingMode(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

tabStops

property 
tabStops:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the tab stops associated with the paragraph. Setters can take an array of flashx.textLayout.formats.TabStopFormat, a condensed string representation, undefined, or FormatValue.INHERIT. The condensed string representation is always converted into an array of flashx.textLayout.formats.TabStopFormat.

The string-based format is a list of tab stops, where each tab stop is delimited by one or more spaces.

A tab stop takes the following form: <alignment type><alignment position>|<alignment token>.

The alignment type is a single character, and can be S, E, C, or D (or lower-case equivalents). S or s for start, E or e for end, C or c for center, D or d for decimal. The alignment type is optional, and if its not specified will default to S.

The alignment position is a Number, and is specified according to FXG spec for Numbers (decimal or scientific notation). The alignment position is required.

The vertical bar is used to separate the alignment position from the alignment token, and should only be present if the alignment token is present.

The alignment token is optional if the alignment type is D, and should not be present if the alignment type is anything other than D. The alignment token may be any sequence of characters terminated by the space that ends the tab stop (for the last tab stop, the terminating space is optional; end of alignment token is implied). A space may be part of the alignment token if it is escaped with a backslash (\ ). A backslash may be part of the alignment token if it is escaped with another backslash (\\). If the alignment type is D, and the alignment token is not specified, it will take on the default value of null.

If no tab stops are specified, a tab action defaults to the end of the line.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of null.



Implementation
    public function get tabStops():*
    public function set tabStops(value:any):void

Throws
RangeError — when set value is not within range for this property

textAlign

property 
textAlign:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Alignment of lines in the paragraph relative to the container. TextAlign.LEFT aligns lines along the left edge of the container. TextAlign.RIGHT aligns on the right edge. TextAlign.CENTER positions the line equidistant from the left and right edges. TextAlign.JUSTIFY spreads the lines out so they fill the space. TextAlign.START is equivalent to setting left in left-to-right text, or right in right-to-left text. TextAlign.END is equivalent to setting right in left-to-right text, or left in right-to-left text.

Legal values are flashx.textLayout.formats.TextAlign.LEFT, flashx.textLayout.formats.TextAlign.RIGHT, flashx.textLayout.formats.TextAlign.CENTER, flashx.textLayout.formats.TextAlign.JUSTIFY, flashx.textLayout.formats.TextAlign.START, flashx.textLayout.formats.TextAlign.END, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of START.



Implementation
    public function get textAlign():*
    public function set textAlign(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

textAlignLast

property 
textAlignLast:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Alignment of the last (or only) line in the paragraph relative to the container in justified text. If textAlign is set to TextAlign.JUSTIFY, textAlignLast specifies how the last line (or only line, if this is a one line block) is aligned. Values are similar to textAlign.

Legal values are flashx.textLayout.formats.TextAlign.LEFT, flashx.textLayout.formats.TextAlign.RIGHT, flashx.textLayout.formats.TextAlign.CENTER, flashx.textLayout.formats.TextAlign.JUSTIFY, flashx.textLayout.formats.TextAlign.START, flashx.textLayout.formats.TextAlign.END, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of START.



Implementation
    public function get textAlignLast():*
    public function set textAlignLast(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

textAlpha

property 
textAlpha:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Alpha (transparency) value for the text. A value of 0 is fully transparent, and a value of 1 is fully opaque. Display objects with textAlpha set to 0 are active, even though they are invisible.

Legal values are numbers from 0 to 1 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 1.



Implementation
    public function get textAlpha():*
    public function set textAlpha(value:any):void

Throws
RangeError — when set value is not within range for this property

textDecoration

property 
textDecoration:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Decoration on text. Use to apply underlining; default is none.

Legal values are flashx.textLayout.formats.TextDecoration.NONE, flashx.textLayout.formats.TextDecoration.UNDERLINE, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of NONE.



Implementation
    public function get textDecoration():*
    public function set textDecoration(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

textIndent

property 
textIndent:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

A Number that specifies, in pixels, the amount to indent the first line of the paragraph. A negative indent will push the line into the margin, and possibly out of the container.

Legal values are numbers from -1000 to 1000 and flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get textIndent():*
    public function set textIndent(value:any):void

Throws
RangeError — when set value is not within range for this property

textJustify

property 
textJustify:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Specifies options for justifying text. Default value is TextJustify.INTER_WORD, meaning that extra space is added to the space characters. TextJustify.DISTRIBUTE adds extra space to space characters and between individual letters. Used only in conjunction with a justificationRule value of JustificationRule.SPACE.

Legal values are flashx.textLayout.formats.TextJustify.INTER_WORD, flashx.textLayout.formats.TextJustify.DISTRIBUTE, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of INTER_WORD.



Implementation
    public function get textJustify():*
    public function set textJustify(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

textRotation

property 
textRotation:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Determines the number of degrees to rotate this text.

Legal values are flash.text.engine.TextRotation.ROTATE_0, flash.text.engine.TextRotation.ROTATE_180, flash.text.engine.TextRotation.ROTATE_270, flash.text.engine.TextRotation.ROTATE_90, flash.text.engine.TextRotation.AUTO, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of AUTO.



Implementation
    public function get textRotation():*
    public function set textRotation(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

trackingLeft

property 
trackingLeft:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Number in pixels (or percent of fontSize, like 120%) indicating the amount of tracking (manual kerning) to be applied to the left of each character. If kerning is enabled, the trackingLeft value is added to the values in the kerning table for the font. If kerning is disabled, the trackingLeft value is used as a manual kerning value. Supports both positive and negative values.

Legal values as a number are from -1000 to 1000.

Legal values as a percent are numbers from -1000% to 1000%.

Legal values include flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get trackingLeft():*
    public function set trackingLeft(value:any):void

Throws
RangeError — when set value is not within range for this property

trackingRight

property 
trackingRight:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Number in pixels (or percent of fontSize, like 120%) indicating the amount of tracking (manual kerning) to be applied to the right of each character. If kerning is enabled, the trackingRight value is added to the values in the kerning table for the font. If kerning is disabled, the trackingRight value is used as a manual kerning value. Supports both positive and negative values.

Legal values as a number are from -1000 to 1000.

Legal values as a percent are numbers from -1000% to 1000%.

Legal values include flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of 0.



Implementation
    public function get trackingRight():*
    public function set trackingRight(value:any):void

Throws
RangeError — when set value is not within range for this property

typographicCase

property 
typographicCase:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

The type of typographic case used for this text. Here are some examples:

typographicCase

Legal values are flashx.textLayout.formats.TLFTypographicCase.DEFAULT, flashx.textLayout.formats.TLFTypographicCase.CAPS_TO_SMALL_CAPS, flashx.textLayout.formats.TLFTypographicCase.UPPERCASE, flashx.textLayout.formats.TLFTypographicCase.LOWERCASE, flashx.textLayout.formats.TLFTypographicCase.LOWERCASE_TO_SMALL_CAPS, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of DEFAULT.



Implementation
    public function get typographicCase():*
    public function set typographicCase(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

verticalAlign

property 
verticalAlign:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Vertical alignment or justification (adopts default value if undefined during cascade). Determines how TextFlow elements align within the container.

Legal values are flashx.textLayout.formats.VerticalAlign.TOP, flashx.textLayout.formats.VerticalAlign.MIDDLE, flashx.textLayout.formats.VerticalAlign.BOTTOM, flashx.textLayout.formats.VerticalAlign.JUSTIFY, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will have a value of TOP.



Implementation
    public function get verticalAlign():*
    public function set verticalAlign(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

whiteSpaceCollapse

property 
whiteSpaceCollapse:*

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Collapses or preserves whitespace when importing text into a TextFlow. WhiteSpaceCollapse.PRESERVE retains all whitespace characters. WhiteSpaceCollapse.COLLAPSE removes newlines, tabs, and leading or trailing spaces within a block of imported text. Line break tags () and Unicode line separator characters are retained.

Legal values are flashx.textLayout.formats.WhiteSpaceCollapse.PRESERVE, flashx.textLayout.formats.WhiteSpaceCollapse.COLLAPSE, flashx.textLayout.formats.FormatValue.INHERIT.

Default value is undefined indicating not set.

If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of COLLAPSE.



Implementation
    public function get whiteSpaceCollapse():*
    public function set whiteSpaceCollapse(value:any):void

Throws
RangeError — when set value is not within range for this property

See also

Constructor Detail

TextLayoutFormat

()Constructor
public function TextLayoutFormat(initialValues:flashx.textLayout.formats:ITextLayoutFormat = null)

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Creates a new TextLayoutFormat object. All settings are empty or, optionally, are initialized from the supplied initialValues object.

Parameters
initialValues:flashx.textLayout.formats:ITextLayoutFormat (default = null) — optional instance from which to copy initial values.

See also

Method Detail

apply

()method
public function apply(incoming:flashx.textLayout.formats:ITextLayoutFormat):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Replaces property values in this TextLayoutFormat object with the values of properties that are set in the incoming ITextLayoutFormat instance. Properties that are undefined in the incoming ITextLayoutFormat instance are not changed in this object.

Parameters

incoming:flashx.textLayout.formats:ITextLayoutFormat — instance whose property values are applied to this TextLayoutFormat object.


Example  ( How to use this example )

This example applies the settings in one TextLayoutFormat object to a second one (textFormatLayout) and uses the receiving object to format the text.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class TextLayoutFormat_applyExample extends Sprite
    {
        public function TextLayoutFormat_applyExample()
        {
            // create a container and add it to the stage
            var container:Sprite = new Sprite();
            this.stage.addChild(container);
            // create TextFlow, ParagraphElement, and SpanElement objects
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            // create two TextLayoutFormat objects
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
            // set format attributes in the first one
            textLayoutFormat.textIndent = 8;
            textLayoutFormat.color = 0x336633;
            textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
            textLayoutFormat.fontSize = 24;
            // set some of the same attributes on the second one
            textLayoutFormat2.color = 0x0000CC;
            textLayoutFormat2.fontSize = 12;
            textLayoutFormat2.textIndent = 24;
            // add text to the span, the span to the paragraph, and the paragraph to the text flow.
            span.text = "Notice that fontFamily is unchanged because it was undefined in textLayoutFormat2.";
            p.addChild( span);
            textFlow.addChild(p);
            // use apply() to apply textLayoutFormat2 format settings; assign format to the text flow
            textLayoutFormat.apply(textLayoutFormat2);  
            textFlow.hostFormat = textLayoutFormat;  
            // add paragraph to textFlow and update controller to display it
            textFlow.addChild(p);
            var controller:ContainerController = new ContainerController(container, 200, 200 );
            textFlow.flowComposer.addController(controller);
            textFlow.flowComposer.updateAllControllers();  
        }
    }
}

concat

()method 
public function concat(incoming:flashx.textLayout.formats:ITextLayoutFormat):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Concatenates the values of properties in the incoming ITextLayoutFormat instance with the values of this TextLayoutFormat object. In this (the receiving) TextLayoutFormat object, properties whose values are FormatValue.INHERIT, and inheriting properties whose values are undefined will get new values from the incoming object. Non-inheriting properties whose values are undefined will get their default values. All other property values will remain unmodified.

Parameters

incoming:flashx.textLayout.formats:ITextLayoutFormat — instance from which values are concatenated.

See also


Example  ( How to use this example )

This example adds values that are set in one TextLayoutFormat object to corresponding properties whose values are undefined in a second object (textFormatLayout) and uses the receiving object to format the text.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class TextLayoutFormat_concatExample extends Sprite
    {
        public function TextLayoutFormat_concatExample()
        {
            // create a container and add it to the stage
            var container:Sprite = new Sprite();
            this.stage.addChild(container);
            // create TextFlow, ParagraphElement, and SpanElement objects
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            // create two TextLayoutFormat objects
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
            // set format attributes in the first one
            textLayoutFormat.textIndent = 8;
            textLayoutFormat.color = 0x336633;
            textLayoutFormat.fontSize = 18;
            // set some of the same attributes on the second one
            textLayoutFormat2.textIndent = 24;
            textLayoutFormat2.color = 0x0000CC;
            textLayoutFormat2.fontSize = 12;
            textLayoutFormat2.fontFamily = "Arial, Helvetica, _sans";
            // concat textLayoutFormat2 settings; assign format to the text flow
            textLayoutFormat.concat(textLayoutFormat2);    
            textFlow.hostFormat = textLayoutFormat; 
            // add text to the span, the span to the paragraph, and the paragraph to the text flow.
            span.text = "Notice that fontFamily value has been added from textLayout2 to textLayout but " +
                "the other values have not been changed.";     
            p.addChild( span);
            textFlow.addChild(p);
            // update controller to display it
            var controller:ContainerController = new ContainerController(container, 200, 200 );
            textFlow.flowComposer.addController(controller);
            textFlow.flowComposer.updateAllControllers(); 
        }
    }
}

concatInheritOnly

()method 
public function concatInheritOnly(incoming:flashx.textLayout.formats:ITextLayoutFormat):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Concatenates the values of properties in the incoming ITextLayoutFormat instance with the values of this TextLayoutFormat object. In this (the receiving) TextLayoutFormat object, properties whose values are FormatValue.INHERIT, and inheriting properties whose values are undefined will get new values from the incoming object. All other property values will remain unmodified.

Parameters

incoming:flashx.textLayout.formats:ITextLayoutFormat — instance from which values are concatenated.

See also


Example  ( How to use this example )

This example adds values of one TextLayoutFormat object to corresponding properties whose values are undefined in a second TextLayoutFormat object, but only if the property can inherit. The example formats the text with the result in the receiving TextLayoutFormat object.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class TextLayoutFormat_concatInheritOnlyExample extends Sprite
    {
        public function TextLayoutFormat_concatInheritOnlyExample()
        {
            // create a container and add it to the stage
            var container:Sprite = new Sprite();
            this.stage.addChild(container);
            // create TextFlow, ParagraphElement, and SpanElement objects
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            // create two TextLayoutFormat objects
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
            // set format attributes in the first one
            textLayoutFormat.color = 0xFF0000;
            textLayoutFormat.fontSize = undefined;            
            // set attributes on the second one (fontSize set here, too)
            textLayoutFormat2.color = 0x00FF00;
            textLayoutFormat2.backgroundColor = 0x00CCCC;
            textLayoutFormat2.fontSize = 16;
            textLayoutFormat2.fontFamily = "Times Roman";
            // concat textLayoutFormat2 settings; assign format to the text flow
            textLayoutFormat.concatInheritOnly(textLayoutFormat2);    
            textFlow.hostFormat = textLayoutFormat; 
            // add text to the span, the span to the paragraph, and the paragraph to the text flow.
            span.text = "Notice that the value of backgroundColor is "
            span.text += textLayoutFormat.backgroundColor;
            span.text += ", even though it is set in textLayoutFormat2. This is because " +
                "this property does not inherit. Also notice that font color does not change " +
                "because it is not undefined."
            p.addChild( span);
            textFlow.addChild(p);
            // update controller to display it
            var controller:ContainerController = new ContainerController(container, 200, 200 );
            textFlow.flowComposer.addController(controller);
            textFlow.flowComposer.updateAllControllers();  
        }
    }
}

copy

()method 
public function copy(values:flashx.textLayout.formats:ITextLayoutFormat):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Copies TextLayoutFormat settings from the values ITextLayoutFormat instance into this TextLayoutFormat object. If values is null, this TextLayoutFormat object is initialized with undefined values for all properties.

Parameters

values:flashx.textLayout.formats:ITextLayoutFormat — optional instance from which to copy values.


Example  ( How to use this example )

This example uses copy() to override the default format settings in one TextLayoutFormat object with a TextLayoutFormat object that has some formatting properties set.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class TextLayoutFormat_copyExample extends Sprite
    {
        public function TextLayoutFormat_copyExample()
        {
            // create a container and add it to the stage
            var container:Sprite = new Sprite();
            this.stage.addChild(container);
            // create TextFlow, ParagraphElement, and SpanElement objects
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            // create two TextLayoutFormat objects
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
            // set format attributes in the second one
            textLayoutFormat2.textIndent = 8;
            textLayoutFormat2.color = 0x336633;
            textLayoutFormat2.fontFamily = "Times Roman";
            textLayoutFormat2.fontSize = 18;
            // add text to the span, the span to the paragraph, and the paragraph to the text flow.
            span.text = "Notice that formatting values set in textLayoutFormat2 override " +
                "the default values in textLayoutFormat."; 
            p.addChild(span);
            textFlow.addChild(p);
            // copy format settings of textLayoutFormat2; assign format to the text flow
            textLayoutFormat.copy(textLayoutFormat2);
            textFlow.hostFormat = textLayoutFormat;  
            // add paragraph to textFlow and update controller to display it
            textFlow.addChild(p);
            var controller:ContainerController = new ContainerController(container, 200, 200 );
            textFlow.flowComposer.addController(controller);
            textFlow.flowComposer.updateAllControllers();      
        }
    }
}

isEqual

()method 
public static function isEqual(p1:flashx.textLayout.formats:ITextLayoutFormat, p2:flashx.textLayout.formats:ITextLayoutFormat):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Compares properties in ITextLayoutFormat instance p1 with properties in ITextLayoutFormat instance p2 and returns true if all properties match.

Parameters

p1:flashx.textLayout.formats:ITextLayoutFormat — instance to compare to p2.
 
p2:flashx.textLayout.formats:ITextLayoutFormat — instance to compare to p1.

Returns
Boolean — true if all properties match, false otherwise.

removeClashing

()method 
public function removeClashing(incoming:flashx.textLayout.formats:ITextLayoutFormat):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Sets properties in this TextLayoutFormat object to undefined if they do not match those in the incoming ITextLayoutFormat instance.

Parameters

incoming:flashx.textLayout.formats:ITextLayoutFormat — instance against which to compare this TextLayoutFormat object's property values.


Example  ( How to use this example )

This example calls removeClashing() to remove from textLayoutFormat2 any formatting values that are different in textLayoutFormat. It sets the differing values to undefined, cancelling the values that were applied.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class TextLayoutFormat_removeClashingExample extends Sprite
    {
        public function TextLayoutFormat_removeClashingExample()
        {
            // create a container and add it to the stage
            var container:Sprite = new Sprite();
            this.stage.addChild(container);
            // create TextFlow, ParagraphElement, and SpanElement objects
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            // create two TextLayoutFormat objects
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
            // set format attributes for textLayoutFormat2
            textLayoutFormat.textIndent = 8;
            textLayoutFormat.color = 0x336633;
            textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
            textLayoutFormat.fontSize = 24;
            // set fontFamily to same value for textLayoutFormat2            
            textLayoutFormat2.fontFamily = "Arial, Helvetica, _sans";
            // add text to the span, the span to the paragraph, and the paragraph to the text flow.
            span.text = "Notice that fontFamily (Arial, Helvetica, _sans) is applied." 
            p.addChild( span);
            textFlow.addChild(p);    
            // call removeClashing(), cancelling any values that clash with textLayoutFormat; 
            // assign it to the text flow
            textLayoutFormat.removeClashing(textLayoutFormat2);  
            textFlow.hostFormat = textLayoutFormat;  
            // add paragraph to textFlow and update controller to display it
            textFlow.addChild(p);
            var controller:ContainerController = new ContainerController(container, 200, 200 );
            textFlow.flowComposer.addController(controller);
            textFlow.flowComposer.updateAllControllers();  
        }
    }
}

removeMatching

()method 
public function removeMatching(incoming:flashx.textLayout.formats:ITextLayoutFormat):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5

Sets properties in this TextLayoutFormat object to undefined if they match those in the incoming ITextLayoutFormat instance.

Parameters

incoming:flashx.textLayout.formats:ITextLayoutFormat — instance against which to compare this TextLayoutFormat object's property values.


Example  ( How to use this example )

This example calls removeMatching() to remove from textLayoutFormat any formatting values that match those in textLayoutFormat2.
package flashx.textLayout.formats.examples {
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class TextLayoutFormat_removeMatchingExample extends Sprite
    {
        public function TextLayoutFormat_removeMatchingExample()
        {
            // create a container and add it to the stage
            var container:Sprite = new Sprite();
            this.stage.addChild(container);
            // create TextFlow, ParagraphElement, and SpanElement objects
            var textFlow:TextFlow = new TextFlow();
            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            // create two TextLayoutFormat objects
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            var textLayoutFormat2:TextLayoutFormat = new TextLayoutFormat();
            // set format attributes for textLayoutFormat
            textLayoutFormat.textIndent = 8;
            textLayoutFormat.color = 0x336633;
            textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
            textLayoutFormat.fontSize = 24;
            // add text to the span, the span to the paragraph, and the paragraph to the text flow
            span.text = "Notice that fontFamily (Arial, Helvetica, _sans) is not applied." 
            p.addChild( span);
            textFlow.addChild(p);
            // set fontFamily to same value for textLayoutFormat2            
            textLayoutFormat2.fontFamily = "Arial, Helvetica, _sans";        
            // call removeMatching() to remove any values that match textLayoutFormat2; 
            // assign textLayoutFormat to the text flow
            textLayoutFormat.removeMatching(textLayoutFormat2);
            textFlow.hostFormat = textLayoutFormat;  
            // add paragraph to textFlow and update controller to display it
            textFlow.addChild(p);
            var controller:ContainerController = new ContainerController(container, 200, 200 );
            textFlow.flowComposer.addController(controller);
            textFlow.flowComposer.updateAllControllers();  
        }
    }
}

TextLayoutFormatExample.as

This example formats a paragraph with 15 pixel margins, a 20 pixel first line indent, and a left-aligned tab stop at 40 pixels. It uses the Arial font (with alternate device fonts), sets the size to 14 pixels, the color to green, turns on kerning, and sets leading (lineHeight) is to 140%.

package flashx.textLayout.formats.examples
{
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TabStopFormat;
    import flashx.textLayout.formats.TextLayoutFormat;
    import flash.text.engine.TabAlignment;
    
    public class TextLayoutFormatExample extends Sprite
    {
        public function TextLayoutFormatExample()
        {
            var textFlow:TextFlow = new TextFlow();
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            textLayoutFormat.paragraphStartIndent = 15;
            textLayoutFormat.paragraphSpaceBefore = 15;
            textLayoutFormat.paragraphEndIndent = 15;
            textLayoutFormat.paragraphSpaceAfter = 15;
            textLayoutFormat.textIndent = 20;
            textLayoutFormat.color = 0x336633;
            textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
            textLayoutFormat.fontSize = 14;
            textLayoutFormat.kerning = flash.text.engine.Kerning.ON;
            textLayoutFormat.lineHeight = "140%";

            var tabStop1:TabStopFormat = new TabStopFormat();
            tabStop1.alignment = flash.text.engine.TabAlignment.START;
            tabStop1.position = 40;
            textLayoutFormat.tabStops = new Array(tabStop1);
            textFlow.hostFormat = textLayoutFormat;

            var p:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement();
            span.text = "This example formats a paragraph with 15 pixel margins, a 20 pixel first " +
                 "line indent, and a left-aligned tab stop at 40 pixels (last line). It uses the " +
                 "Arial font (with alternate device fonts), sets the size to 14 pixels, the color to green, " +
                 " turns on kerning, \n \t and sets leading (lineHeight) to 140%.";
            p.addChildAt(0, span);
            textFlow.addChildAt(0, p);

            textFlow.flowComposer.addController(new ContainerController(this,310,200));
            textFlow.flowComposer.updateAllControllers();
        }
    }
}
TextLayoutFormatExample2.as

This example converts a string of Japanese characters in Unicode to a text flow and sets TextLayoutFormat properties to display it vertically, from right to left.
package flashx.textLayout.formats.examples
{
    import flash.display.Sprite;
    import flash.system.Capabilities;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.BlockProgression;
    import flashx.textLayout.formats.JustificationRule;
    import flashx.textLayout.formats.TextLayoutFormat;
    import flashx.textLayout.formats.VerticalAlign;
    
    public class TextLayoutFormatExample2 extends Sprite
    {
        public function TextLayoutFormatExample2()
        {
            // create TextFlow object
            var textFlow:TextFlow = new TextFlow();   
            // create TextLayoutFormat object
            var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
            // define Japanese text in a string of Unicode characters
            var jaText:String = String.fromCharCode(
                0x30AF, 0x30ED, 0x30B9, 0x30D7, 0x30E9, 0x30C3, 0x30C8, 0x30D5, 
                0x30A9, 0x30FC, 0x30E0, 0x4E0A, 0x3067, 0x518D, 0x751F, 0x53EF, 
                0x80FD, 0x306A
            ) + 
            "Flash Video" +
            String.fromCharCode(
                0x3092, 0x914D, 0x4FE1, 0x3001, 0x653F, 0x5E9C, 0x6700, 0x65B0, 
                0x60C5, 0x5831, 0x3092, 0x3088, 0x308A, 0x591A, 0x304F, 0x306E, 
                0x56FD, 0x6C11, 0x306B, 0x9AD8, 0x54C1, 0x8CEA, 0x306A, 0x753B, 
                0x50CF, 0x3067, 0x7C21, 0x5358, 0x304B, 0x3064, 0x30EA, 0x30A2, 
                0x30EB, 0x30BF, 0x30A4, 0x30E0, 0x306B, 0x63D0, 0x4F9B, 0x3059, 
                0x308B, 0x3053, 0x3068, 0x304C, 0x53EF, 0x80FD, 0x306B, 0x306A, 
                0x308A, 0x307e, 0x3057, 0x305F, 0x3002);
            // convert the text into a TextFlow object
            textFlow = TextConverter.importToFlow(jaText, TextConverter.PLAIN_TEXT_FORMAT);
            // set the locale and fontFamily
            textLayoutFormat.locale = "ja";
            if (Capabilities.os.search("Mac OS") > -1) 
                textLayoutFormat.fontFamily = String.fromCharCode(0x5C0F, 0x585A, 0x660E, 0x671D) + " Pro R"; // "Kozuka Mincho Pro R"                    koFont.fontName = "Adobe " + String.fromCharCode(0xBA85, 0xC870) + " Std M"; // "Adobe Myungjo Std M"
            else 
                textLayoutFormat.fontFamily = "Kozuka Mincho Pro R";
            // specify right-to-left block progression, east Asian justification, and top vertical alignment
            textLayoutFormat.blockProgression = BlockProgression.RL;
            textLayoutFormat.justificationRule = JustificationRule.EAST_ASIAN;
            textLayoutFormat.verticalAlign = VerticalAlign.TOP;
            textFlow.hostFormat = textLayoutFormat;
            // add controller and update to display text
            textFlow.flowComposer.addController(new ContainerController(this, 300, 200));
            textFlow.flowComposer.updateAllControllers();
        }
    }
}