Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
flashx.textLayout.container 
ContainerController 
Packageflashx.textLayout.container
Classpublic class ContainerController
InheritanceContainerController Inheritance Object
Implements IInteractionEventHandler, ITextLayoutFormat, ISandboxSupport

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

The ContainerController class defines the relationship between a TextFlow object and a container. A TextFlow may have one or more rectangular areas that can hold text; the text is said to be flowing through the containers. Each container is a Sprite that is the parent DisplayObject for the TextLines. Each container has a ContainerController that manages the container; the controller holds the target width and height for the text area, populates the container with TextLines, and handles scrolling. A controller also has a format associated with it that allows some formatting attributes to be applied to the text in the container. This allows, for instance, a TextFlow to have one container where the text appears in a single column, and a second container in the same TextFlow with two column text. Not all formatting attributes that can be applied to the container will affect the text; only the ones that affect container-level layout. The diagram below illustrates the relationship between the TextFlow, its flowComposer, and the display list.

IContainerController

View the examples

See also

flashx.textLayout.compose.IFlowComposer
flashx.textLayout.elements.TextFlow
flashx.textLayout.container.TextContainerController


Public Properties
 PropertyDefined By
  absoluteStart : int
[read-only] Returns the first character in the container.
ContainerController
  alignmentBaseline : *
TextLayoutFormat: Specifies the baseline to which the dominant baseline aligns.
ContainerController
  backgroundAlpha : *
TextLayoutFormat: Alpha (transparency) value for the background (adopts default value if undefined during cascade).
ContainerController
  backgroundColor : *
TextLayoutFormat: Background color of the text (adopts default value if undefined during cascade).
ContainerController
  baselineShift : *
TextLayoutFormat: Amount to shift the baseline from the dominantBaseline value.
ContainerController
  blockProgression : *
TextLayoutFormat: Specifies a vertical or horizontal progression of line placement.
ContainerController
  breakOpportunity : *
TextLayoutFormat: Controls where lines are allowed to break when breaking wrapping text into multiple lines.
ContainerController
  cffHinting : *
TextLayoutFormat: The type of CFF hinting used for this text.
ContainerController
  color : *
TextLayoutFormat: Color of the text.
ContainerController
  columnCount : *
TextLayoutFormat: Number of text columns (adopts default value if undefined during cascade).
ContainerController
  columnGap : *
TextLayoutFormat: Specifies the amount of gutter space, in pixels, to leave between the columns (adopts default value if undefined during cascade).
ContainerController
  columnState : ColumnState
[read-only] Returns a ColumnState object, which describes the number and characteristics of columns in the container.
ContainerController
  columnWidth : *
TextLayoutFormat: Column width in pixels (adopts default value if undefined during cascade).
ContainerController
  compositionHeight : Number
[read-only] Returns the vertical extent allowed for text inside the container.
ContainerController
  compositionWidth : Number
[read-only] Returns the horizontal extent allowed for text inside the container.
ContainerController
  computedFormat : flashx.textLayout.formats:ITextLayoutFormat
[read-only] Returns an ITextLayoutFormat instance with the attributes applied to this container, including the attributes inherited from its root element.
ContainerController
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  container : Sprite
[read-only] Returns the container display object that holds the text lines for this ContainerController instance.
ContainerController
  containerControllerInitialFormat : flashx.textLayout.formats:ITextLayoutFormat
[static]
ContainerController
  coreStyles : Object
[read-only] Returns the coreStyles on this ContainerController.
ContainerController
  digitCase : *
TextLayoutFormat: The type of digit case used for this text.
ContainerController
  digitWidth : *
TextLayoutFormat: Type of digit width used for this text.
ContainerController
  direction : *
TextLayoutFormat: Specifies the default bidirectional embedding level of the text in the text block.
ContainerController
  dominantBaseline : *
TextLayoutFormat: Specifies which element baseline snaps to the alignmentBaseline to determine the vertical position of the element on the line.
ContainerController
  firstBaselineOffset : *
TextLayoutFormat: Specifies the baseline position of the first line in the container.
ContainerController
  flowComposer : IFlowComposer
[read-only] Returns the flow composer object that composes and highlights text into the container that this controller manages.
ContainerController
  fontFamily : *
TextLayoutFormat: The name of the font to use, or a comma-separated list of font names.
ContainerController
  fontLookup : *
TextLayoutFormat: Font lookup to use.
ContainerController
  fontSize : *
TextLayoutFormat: The size of the text in pixels.
ContainerController
  fontStyle : *
TextLayoutFormat: Style of text.
ContainerController
  fontWeight : *
TextLayoutFormat: Weight of text.
ContainerController
  format : flashx.textLayout.formats:ITextLayoutFormat
Stores the ITextLayoutFormat object that contains the attributes for this container.
ContainerController
  horizontalScrollPolicy : String
Specifies the horizontal scrolling policy, which you can set by assigning one of the constants of the ScrollPolicy class: ON, OFF, or AUTO.
ContainerController
  horizontalScrollPosition : Number
Specifies the current horizontal scroll location on the stage.
ContainerController
  interactionManager : ISelectionManager
[read-only] The InteractionManager associated with this TextFlow object.
ContainerController
  justificationRule : *
TextLayoutFormat: Rule used to justify text in a paragraph.
ContainerController
  justificationStyle : *
TextLayoutFormat: The style used for justification of the paragraph.
ContainerController
  kerning : *
TextLayoutFormat: Kerning adjusts the pixels between certain character pairs to improve readability.
ContainerController
  leadingModel : *
TextLayoutFormat: Specifies the leading model, which is a combination of leading basis and leading direction.
ContainerController
  ligatureLevel : *
TextLayoutFormat: Controls which of the ligatures that are defined in the font may be used in the text.
ContainerController
  lineBreak : *
TextLayoutFormat: Controls word wrapping within the container (adopts default value if undefined during cascade).
ContainerController
  lineHeight : *
TextLayoutFormat: Leading controls for the text.
ContainerController
  lineThrough : *
TextLayoutFormat: If true, applies strikethrough, a line drawn through the middle of the text.
ContainerController
  locale : *
TextLayoutFormat: The locale of the text.
ContainerController
  paddingBottom : *
TextLayoutFormat: Botttom inset in pixels (adopts default value if undefined during cascade).
ContainerController
  paddingLeft : *
TextLayoutFormat: Left inset in pixels (adopts default value if undefined during cascade).
ContainerController
  paddingRight : *
TextLayoutFormat: Right inset in pixels (adopts default value if undefined during cascade).
ContainerController
  paddingTop : *
TextLayoutFormat: Top inset in pixels (adopts default value if undefined during cascade).
ContainerController
  paragraphEndIndent : *
TextLayoutFormat: A Number that specifies, in pixels, the amount to indent the paragraph's end edge.
ContainerController
  paragraphSpaceAfter : *
TextLayoutFormat: A Number that specifies the amount of space, in pixels, to leave after the paragraph.
ContainerController
  paragraphSpaceBefore : *
TextLayoutFormat: A Number that specifies the amount of space, in pixels, to leave before the paragraph.
ContainerController
  paragraphStartIndent : *
TextLayoutFormat: A Number that specifies, in pixels, the amount to indent the paragraph's start edge.
ContainerController
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  renderingMode : *
TextLayoutFormat: The rendering mode used for this text.
ContainerController
  rootElement : ContainerFormattedElement
[read-only] Returns the root element that appears in the container.
ContainerController
  tabStops : *
TextLayoutFormat: Specifies the tab stops associated with the paragraph.
ContainerController
  textAlign : *
TextLayoutFormat: Alignment of lines in the paragraph relative to the container.
ContainerController
  textAlignLast : *
TextLayoutFormat: Alignment of the last (or only) line in the paragraph relative to the container in justified text.
ContainerController
  textAlpha : *
TextLayoutFormat: Alpha (transparency) value for the text.
ContainerController
  textDecoration : *
TextLayoutFormat: Decoration on text.
ContainerController
  textFlow : flashx.textLayout.elements:TextFlow
[read-only] Returns the TextFlow object whose content appears in the container.
ContainerController
  textIndent : *
TextLayoutFormat: A Number that specifies, in pixels, the amount to indent the first line of the paragraph.
ContainerController
  textJustify : *
TextLayoutFormat: Specifies options for justifying text.
ContainerController
  textLength : int
[read-only] Returns the total number of characters in the container.
ContainerController
  textRotation : *
TextLayoutFormat: Determines the number of degrees to rotate this text.
ContainerController
  trackingLeft : *
TextLayoutFormat: 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.
ContainerController
  trackingRight : *
TextLayoutFormat: 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.
ContainerController
  typographicCase : *
TextLayoutFormat: The type of typographic case used for this text.
ContainerController
  userStyles : Object
The userStyles object for a ContainerController instance.
ContainerController
  verticalAlign : *
TextLayoutFormat: Vertical alignment or justification (adopts default value if undefined during cascade).
ContainerController
  verticalScrollPolicy : String
Specifies the vertical scrolling policy, which you can set by assigning one of the constants of the ScrollPolicy class: ON, OFF, or, AUTO.
ContainerController
  verticalScrollPosition : Number
Specifies the current vertical scroll location on the stage.
ContainerController
  whiteSpaceCollapse : *
TextLayoutFormat: Collapses or preserves whitespace when importing text into a TextFlow.
ContainerController
Public Methods
 MethodDefined By
  
ContainerController(container:Sprite, compositionWidth:Number = 100, compositionHeight:Number = 100)
Constructor - creates a ContainerController instance.
ContainerController
  
Processes the Event.ACTIVATE event when the client manages events.
ContainerController
  
Handle a scroll event during a "drag" selection.
ContainerController
  
Called to request clients to begin the forwarding of mouseup and mousemove events from outside a security sandbox.
ContainerController
  
Clears the style specified by styleProp from this FlowElement.
ContainerController
  
Processes the Event.DEACTIVATE event when the client manages events.
ContainerController
  
Processes an edit event (CUT, COPY, PASTE, SELECT_ALL) when the client manages events.
ContainerController
  
Called to inform clients that the the forwarding of mouseup and mousemove events from outside a security sandbox is no longer needed.
ContainerController
  
Processes the FocusEvent.KEY_FOCUS_CHANGE and FocusEvent.MOUSE_FOCUS_CHANGE events when the client manages events.
ContainerController
  
Processes the FocusEvent.FOCUS_IN event when the client manages events.
ContainerController
  
Processes the FocusEvent.FOCUS_OUT event when the client manages events.
ContainerController
  
Returns the area that the text occupies, as reflected by the last compose or update operation.
ContainerController
  
Figure out the scroll distance required to scroll up or down by the specified number of lines.
ContainerController
  
getStyle(styleProp:String):*
Returns the value of the style specified by the styleProp parameter.
ContainerController
 Inherited
Indicates whether an object has a specified property defined.
Object
  
Processes the IMEEvent.IME_START_COMPOSITION event when the client manages events.
ContainerController
  
Marks all the text in this container as needing composing.
ContainerController
  
Determines whether the container has text that requires composing.
ContainerController
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
Processes the KeyboardEvent.KEY_DOWN event when the client manages events.
ContainerController
  
Processes the FocusEvent.KEY_FOCUS_CHANGE event when the client manages events.
ContainerController
  
Processes the Keyboard.KEY_UP event when the client manages events.
ContainerController
  
Processes the ContextMenuEvent.MENU_SELECT event when the client manages events.
ContainerController
  
Processes the MouseEvent.DOUBLE_CLICK event when the client manages events.
ContainerController
  
Processes the MouseEvent.MOUSE_DOWN event when the client manages events.
ContainerController
  
Processes the MouseEvent.MOUSE_MOVE event when the client manages events.
ContainerController
  
Client call to forward a mouseMove event from outside a security sandbox.
ContainerController
  
Processes the MouseEvent.MOUSE_OUT event when the client manages events.
ContainerController
  
Processes the MouseEvent.MOUSE_OVER event when the client manages events.
ContainerController
  
Processes the MouseEvent.MOUSE_UP event when the client manages events.
ContainerController
  
Client call to forward a mouseUp event from outside a security sandbox.
ContainerController
  
Processes the MouseEvent.MOUSE_WHEEL event when the client manages events.
ContainerController
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
scrollToRange(activePosition:int, anchorPosition:int):void
Scrolls so that the text range is visible in the container.
ContainerController
  
selectRange(anchorIndex:int, activeIndex:int):void
Sets the range of selected text in a component implementing ITextSupport.
ContainerController
  
Sets the width and height allowed for text in the container.
ContainerController
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
setStyle(styleProp:String, newValue:*):void
Sets the value of the style specified by the styleProp parameter to the value specified by the newValue parameter.
ContainerController
  
Processes the TextEvent.TEXT_INPUT event when the client manages events.
ContainerController
 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
Protected Methods
 MethodDefined By
  
Adds a flash.display.Shape object on which background shapes (such as background color) are drawn.
ContainerController
  
Adds a flash.display.DisplayObjectContainer object to which selection shapes (such as block selection highlight, cursor etc.) are added.
ContainerController
  
Adds a flash.text.engine.TextLine object as a descendant of container.
ContainerController
  
Creates a context menu for the ContainerController.
ContainerController
  
Gets the index at which the first text line must appear in its parent.
ContainerController
  
Removes the flash.display.DisplayObjectContainer object which contains selection shapes (such as block selection highlight, cursor etc.).
ContainerController
  
Removes a flash.text.engine.TextLine object from its parent.
ContainerController
  
If scrolling, sets the scroll rectangle to the container rectangle so that any lines that are halfway in view are clipped to the scrollable region.
ContainerController
Property Detail

absoluteStart

property
absoluteStart:int  [read-only]

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

Returns the first character in the container. If this is not the first container in the flow, this value is updated when the text is composed, that is when the IFlowComposer's compose() or updateAllControllers() methods are called.



Implementation
    public function get absoluteStart():int

See also

alignmentBaseline

property 
alignmentBaseline:*

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

TextLayoutFormat: 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

backgroundAlpha

property 
backgroundAlpha:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

columnState

property 
columnState:ColumnState  [read-only]

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

Returns a ColumnState object, which describes the number and characteristics of columns in the container. These values are updated when the text is recomposed, either as a result of IFlowComposer.compose() or IFlowComposer.updateAllControllers().



Implementation
    public function get columnState():ColumnState

See also

columnWidth

property 
columnWidth:*

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

TextLayoutFormat: 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

compositionHeight

property 
compositionHeight:Number  [read-only]

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

Returns the vertical extent allowed for text inside the container. The value is specified in pixels.



Implementation
    public function get compositionHeight():Number

See also

compositionWidth

property 
compositionWidth:Number  [read-only]

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

Returns the horizontal extent allowed for text inside the container. The value is specified in pixels.



Implementation
    public function get compositionWidth():Number

See also

computedFormat

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

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

Returns an ITextLayoutFormat instance with the attributes applied to this container, including the attributes inherited from its root element.



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

See also

container

property 
container:Sprite  [read-only]

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

Returns the container display object that holds the text lines for this ContainerController instance.



Implementation
    public function get container():Sprite

See also

containerControllerInitialFormat

property 
containerControllerInitialFormat:flashx.textLayout.formats:ITextLayoutFormat



Implementation
    public static function get containerControllerInitialFormat():flashx.textLayout.formats:ITextLayoutFormat
    public static function set containerControllerInitialFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void

coreStyles

property 
coreStyles:Object  [read-only]

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

Returns the coreStyles on this ContainerController. Note that the getter makes a copy of the core styles dictionary. The coreStyles object encapsulates those formats that are defined by TextLayoutFormat. The coreStyles object consists of an array of stylename-value pairs.



Implementation
    public function get coreStyles():Object

digitCase

property 
digitCase:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

flowComposer

property 
flowComposer:IFlowComposer  [read-only]

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

Returns the flow composer object that composes and highlights text into the container that this controller manages.



Implementation
    public function get flowComposer():IFlowComposer

See also

fontFamily

property 
fontFamily:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

format

property 
format:flashx.textLayout.formats:ITextLayoutFormat

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

Stores the ITextLayoutFormat object that contains the attributes for this container. The controller inherits the container properties from the TextFlow of which it is part. This property allows different controllers in the same text flow to have, for example, different column settings or padding.



Implementation
    public function get format():flashx.textLayout.formats:ITextLayoutFormat
    public function set format(value:flashx.textLayout.formats:ITextLayoutFormat):void

See also

horizontalScrollPolicy

property 
horizontalScrollPolicy:String

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

Specifies the horizontal scrolling policy, which you can set by assigning one of the constants of the ScrollPolicy class: ON, OFF, or AUTO.



Implementation
    public function get horizontalScrollPolicy():String
    public function set horizontalScrollPolicy(value:String):void

See also

horizontalScrollPosition

property 
horizontalScrollPosition:Number

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

Specifies the current horizontal scroll location on the stage. The value specifies the number of pixels from the left.



Implementation
    public function get horizontalScrollPosition():Number
    public function set horizontalScrollPosition(value:Number):void

interactionManager

property 
interactionManager:ISelectionManager  [read-only]

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

The InteractionManager associated with this TextFlow object.

Controls all selection and editing on the text. If the TextFlow is not selectable, the interactionManager is null. To make the TextFlow editable, assign a interactionManager that is both an ISelectionManager and an IEditManager. To make a TextFlow that is read-only and allows selection, assign a interactionManager that is an ISelectionManager only.



Implementation
    public function get interactionManager():ISelectionManager

See also

justificationRule

property 
justificationRule:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

rootElement

property 
rootElement:ContainerFormattedElement  [read-only]

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

Returns the root element that appears in the container. The root element could be a DivElement or TextFlow instance, for example.



Implementation
    public function get rootElement():ContainerFormattedElement

See also

tabStops

property 
tabStops:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

textFlow

property 
textFlow:flashx.textLayout.elements:TextFlow  [read-only]

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

Returns the TextFlow object whose content appears in the container. Either the textFlow and rootElement values are the same, or this is the root element's TextFlow object. For example, if the container's root element is a DivElement, the value would be the TextFlow object to which the DivElement belongs.



Implementation
    public function get textFlow():flashx.textLayout.elements:TextFlow

See also

textIndent

property 
textIndent:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

textLength

property 
textLength:int  [read-only]

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

Returns the total number of characters in the container. This can include text that is not currently in view, if the container is scrollable. This value is updated when the text is composed (when the IFlowComposer's compose() or updateAllControllers() methods are called).



Implementation
    public function get textLength():int

See also

textRotation

property 
textRotation:*

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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

TextLayoutFormat: 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

userStyles

property 
userStyles:Object

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

The userStyles object for a ContainerController instance. The getter makes a copy of the userStyles object, which is an array of stylename-value pairs.



Implementation
    public function get userStyles():Object
    public function set userStyles(value:Object):void

verticalAlign

property 
verticalAlign:*

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

TextLayoutFormat: 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

verticalScrollPolicy

property 
verticalScrollPolicy:String

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

Specifies the vertical scrolling policy, which you can set by assigning one of the constants of the ScrollPolicy class: ON, OFF, or, AUTO.



Implementation
    public function get verticalScrollPolicy():String
    public function set verticalScrollPolicy(value:String):void

See also

verticalScrollPosition

property 
verticalScrollPosition:Number

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

Specifies the current vertical scroll location on the stage. The value specifies the number of pixels from the top.



Implementation
    public function get verticalScrollPosition():Number
    public function set verticalScrollPosition(value:Number):void

whiteSpaceCollapse

property 
whiteSpaceCollapse:*

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

TextLayoutFormat: 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

ContainerController

()Constructor
public function ContainerController(container:Sprite, compositionWidth:Number = 100, compositionHeight:Number = 100)

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

Constructor - creates a ContainerController instance. The ContainerController has a default compositionWidth and compositionHeight so that some text appears in the container if you don't specify its width height.

Parameters
container:Sprite — The DisplayObjectContainer in which to manage the text lines.
 
compositionWidth:Number (default = 100) — The initial width for composing text in the container.
 
compositionHeight:Number (default = 100) — The initial height for composing text in the container.
Method Detail

activateHandler

()method
public function activateHandler(event:Event):void

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

Processes the Event.ACTIVATE event when the client manages events.

Parameters

event:Event — The Event object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its activateHandler() method with a custom activateHandler() method. The example requires an application that triggers the activateHandler() method.

package flashx.textLayout.container.examples
{
    import flash.display.Sprite;
     import flash.events.Event;
     import flashx.textLayout.container.ContainerController;
     
    public class ContainerController_activateHandlerExample extends ContainerController
    {
        public function ContainerController_activateHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
        {
            super(container, compositionWidth, compositionHeight);
        }
        override public function activateHandler(event:Event):void
        {    
            // run the TLF handler for the activate event
            super.activateHandler(event);
            // and add your own code for the event 
            trace("You are in activateHandler()");        
        }
    }
}

addBackgroundShape

()method 
protected function addBackgroundShape(shape:Shape):void

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

Adds a flash.display.Shape object on which background shapes (such as background color) are drawn. The default implementation of this method, which may be overriden, adds the object to container just before the first flash.text.engine.TextLine child, if one exists, and after the last exisiting child otherwise.

Parameters

shape:Shapeflash.display.Shape object to add

See also

addSelectionContainer

()method 
protected function addSelectionContainer(selectionContainer:DisplayObjectContainer):void

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

Adds a flash.display.DisplayObjectContainer object to which selection shapes (such as block selection highlight, cursor etc.) are added. The default implementation of this method, which may be overriden, has the following behavior: The object is added just before first flash.text.engine.TextLine child of container if one exists and the object is opaque and has normal blend mode. In all other cases, it is added as the last child of container.

Parameters

selectionContainer:DisplayObjectContainerflash.display.DisplayObjectContainer object to add

See also

addTextLine

()method 
protected function addTextLine(textLine:flash.text.engine:TextLine, index:int):void

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

Adds a flash.text.engine.TextLine object as a descendant of container. The default implementation of this method, which may be overriden, adds the object as a direct child of container at the specified index.

Parameters

textLine:flash.text.engine:TextLine — the flash.text.engine.TextLine object to add
 
index:int — insertion index of the text line in its parent

See also

autoScrollIfNecessary

()method 
public function autoScrollIfNecessary(mouseX:int, mouseY:int):void

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

Handle a scroll event during a "drag" selection.

Parameters

mouseX:int — The horizontal position of the mouse cursor on the stage.
 
mouseY:int — The vertical position of the mouse cursor on the stage.

beginMouseCapture

()method 
public function beginMouseCapture():void

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

Called to request clients to begin the forwarding of mouseup and mousemove events from outside a security sandbox.

clearStyle

()method 
public function clearStyle(styleProp:String):void

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

Clears the style specified by styleProp from this FlowElement. Sets the value to undefined.

Parameters

styleProp:String

createContextMenu

()method 
protected function createContextMenu():ContextMenu

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

Creates a context menu for the ContainerController. Use the methods of the ContextMenu class to add items to the menu.

You can override this method to define a custom context menu.

Returns
ContextMenu

See also

deactivateHandler

()method 
public function deactivateHandler(event:Event):void

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

Processes the Event.DEACTIVATE event when the client manages events.

Parameters

event:Event — The Event object.

See also

editHandler

()method 
public function editHandler(event:Event):void

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

Processes an edit event (CUT, COPY, PASTE, SELECT_ALL) when the client manages events.

Parameters

event:Event — Event object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its editHandler() method with a custom editHandler() method. The example requires an application that triggers the editHandler() method.

package flashx.textLayout.container.examples 
{
    import flash.events.Event;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    
    public class ContainerController_editHandlerExample extends ContainerController
    {
        public function ContainerController_editHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
        {
            super(container, compositionWidth, compositionHeight);
        }
        override public function editHandler(event:Event):void
        {    
            // run the TLF handler for the focus event
            super.editHandler(event);
            // and add your own code for the event 
            trace("You are in editHandler()");        
        }
    }
}

endMouseCapture

()method 
public function endMouseCapture():void

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

Called to inform clients that the the forwarding of mouseup and mousemove events from outside a security sandbox is no longer needed.

focusChangeHandler

()method 
public function focusChangeHandler(event:FocusEvent):void

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

Processes the FocusEvent.KEY_FOCUS_CHANGE and FocusEvent.MOUSE_FOCUS_CHANGE events when the client manages events.

Parameters

event:FocusEvent — The FocusEvent object.

See also

focusInHandler

()method 
public function focusInHandler(event:FocusEvent):void

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

Processes the FocusEvent.FOCUS_IN event when the client manages events.

Parameters

event:FocusEvent — The FocusEvent object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its focusInHandler() method with a custom focusInHandler() method. The example requires an application that triggers the focusInHandler() method.

package flashx.textLayout.container.examples 
{
    import flash.events.FocusEvent;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    
    public class ContainerController_focusInHandlerExample extends ContainerController
    {
        public function ContainerController_focusInHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
        {
            super(container, compositionWidth, compositionHeight);
        }
        override public function focusInHandler(event:FocusEvent):void
        {    
            // run the TLF handler for the focus event
            super.focusInHandler(event);
            // and add your own code for the event 
            trace("You are in focusInHandler()");        
        }
    }
}

focusOutHandler

()method 
public function focusOutHandler(event:FocusEvent):void

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

Processes the FocusEvent.FOCUS_OUT event when the client manages events.

Parameters

event:FocusEvent — The FocusEvent object.

See also

getContentBounds

()method 
public function getContentBounds():Rectangle

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

Returns the area that the text occupies, as reflected by the last compose or update operation. The width and the height might be estimated, if the container is scrollable and the text exceeds the visible area.

Returns
Rectangle — describes the area that the text occupies.

See also


Example  ( How to use this example )

This example uses getContentBounds() to draw a border around the text.
package flashx.textLayout.container.examples
{
    import flash.geom.Rectangle;
    import flash.display.Sprite;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;

    public class ContainerController_getContentBoundsExample extends Sprite
    {    
        private const textMarkup:String = "<flow:TextFlow xmlns:flow='http://ns.adobe.com/textLayout/2008' fontSize='08' " + 
            "textIndent='10' paragraphSpaceBefore='6' paddingTop='8' paddingLeft='8' paddingRight='8'>" +
            "<flow:p paragraphSpaceBefore='inherit'>" +
            "<flow:span>There are many </flow:span>" + 
            "<flow:span fontStyle='italic'>such</flow:span>" + 
            "<flow:span> lime-kilns in that tract of country, for the purpose of burning the white" + 
            " marble which composes a large part of the substance of the hills. Some of them, built " + 
            "years ago, and long deserted, with weeds growing in the vacant round of the interior, " + 
            "which is open to the sky, and grass and wild-flowers rooting themselves into the chinks" + 
            "of the stones, look already like relics of antiquity, and may yet be overspread with the" + 
            " lichens of centuries to come.</flow:span>" +
            "</flow:p>" +
            "</flow:TextFlow>";
        
        public function ContainerController_getContentBoundsExample(textFlow:TextFlow):void
        {        
            // Body text TextFlow and flow composer
            var textFlow:TextFlow = new TextFlow();
            textFlow = TextConverter.importToFlow(textMarkup, TextConverter.TEXT_LAYOUT_FORMAT);
            var container:Sprite = new Sprite();
            var controller:ContainerController = new ContainerController(container, 120, 200);
            container.x = 150;
            container.y = 50;
            // Add controller to text flow; add container to stage and display text
            textFlow.flowComposer.addController(controller);
            addChild(container);
            textFlow.flowComposer.updateAllControllers();
            // draw a border around the text
            drawBorder(controller);
        }
        
        private function drawBorder(controller:ContainerController):void
        {
            // get the rectangle that makes up the bounds of the content
            var bounds:Rectangle = controller.getContentBounds();
            // retrieve the container and draw the border 
            var container:Sprite = controller.container as Sprite;
            container.graphics.lineStyle(.5);
            container.graphics.moveTo(bounds.left,bounds.top);
            container.graphics.lineTo(bounds.right,bounds.top);
            container.graphics.lineTo(bounds.right,bounds.bottom);
            container.graphics.lineTo(bounds.left,bounds.bottom);
            container.graphics.lineTo(bounds.left,bounds.top);
            container.graphics.drawRect(bounds.left, bounds.top, bounds.width, bounds.height );
        }
    }
}

        

getFirstTextLineChildIndex

()method 
protected function getFirstTextLineChildIndex():int

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

Gets the index at which the first text line must appear in its parent. The default implementation of this method, which may be overriden, returns the child index of the first flash.text.engine.TextLine child of container if one exists, and that of the last child of container otherwise.

Returns
int — the index at which the first text line must appear in its parent.

See also

getScrollDelta

()method 
public function getScrollDelta(numLines:int):Number

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

Figure out the scroll distance required to scroll up or down by the specified number of lines. Negative numbers scroll upward, bringing more of the top of the TextFlow into view. Positive numbers scroll downward, bringing the next line from the bottom into full view.

When scrolling up, for example, the method makes the next line fully visible. If the next line is partially obscured and the number of lines specified is 1, the partially obscured line becomes fully visible.

Parameters

numLines:int — The number of lines to scroll.

Returns
Number — the delta amount of space to scroll

getStyle

()method 
public function getStyle(styleProp:String):*

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

Returns the value of the style specified by the styleProp parameter.

Parameters

styleProp:String — The name of the style property whose value you want.

Returns
* — The current value for the specified style.

imeStartCompositionHandler

()method 
public function imeStartCompositionHandler(event:IMEEvent):void

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

Processes the IMEEvent.IME_START_COMPOSITION event when the client manages events.

Parameters

event:IMEEvent — The IMEEvent object.

See also

flash.events.IMEEvent.IME_START_COMPOSITION

invalidateContents

()method 
public function invalidateContents():void

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

Marks all the text in this container as needing composing.


Example  ( How to use this example )

This example checks whether invalidateContents() causes the text flow to be damaged.

package flashx.textLayout.container.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.conversion.TextConverter;
    
    public class ContainerController_invalidateContentsExample extends Sprite
    {
        public function ContainerController_invalidateContentsExample()
        {
            // create container, text flow, composer, paragraph, and span
            var container:Sprite = new Sprite();
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement;
            // add container to the stage; create controller and add it to the text flow
            addChild(container);
            container.x = 100;
            container.y = 50;
            var controller:ContainerController = new ContainerController(container, 200, 200);
            textFlow.flowComposer.addController(controller);
            // set font size and add text to the span; add the span to the paragraph
            textFlow.fontSize = 16;
            span.text = "Does invalidateContents() cause this text to be damaged?";
            paragraph.addChild(span);
            textFlow.addChild(paragraph);  
            //update controller to display text
            textFlow.flowComposer.updateAllControllers(); 
            // invalidate the controller contents and check to see if they are damaged
            controller.invalidateContents();
            if(controller.isDamaged())
                span.text += "\nYes, it does.";
            else
                span.text += "\nNo, it doesn't";
            textFlow.flowComposer.updateAllControllers();   
        }
    }
}

isDamaged

()method 
public function isDamaged():Boolean

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

Determines whether the container has text that requires composing.

Returns
Boolean — true if the container requires composing.

Example  ( How to use this example )

This example checks to see if the text flow is damaged after replacing text in the span.
 

package flashx.textLayout.container.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.conversion.TextConverter;
    
    public class ContainerController_isDamagedExample extends Sprite
    {
        public function ContainerController_isDamagedExample()
        {
            // create container, composer, text flow, paragraph, and span
            var container:Sprite = new Sprite();
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement;
            // add container to the stage; create controller and add it to the text flow
            addChild(container);
            var controller:ContainerController = new ContainerController(container, 200, 700 );
            textFlow.flowComposer.addController(controller);
            //set font size, add text to the span and the paragraph to the text flow
                        textFlow.fontSize = 24;
            span.text = "Does this text flow need to be composed?";
            paragraph.addChild(span);
            textFlow.addChild(paragraph); 
            // display the text               
            textFlow.flowComposer.updateAllControllers();
            // replace 'this' with 'your' and check to see if text flow is damaged
            span.replaceText(5, 9, "your");
            if(controller.isDamaged())
            {
                span.text += " Yes it does.";
            }
            textFlow.flowComposer.updateAllControllers();   
        }
    }
}

keyDownHandler

()method 
public function keyDownHandler(event:KeyboardEvent):void

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

Processes the KeyboardEvent.KEY_DOWN event when the client manages events.

Parameters

event:KeyboardEvent — KeyboardEvent object.

See also

keyFocusChangeHandler

()method 
public function keyFocusChangeHandler(event:FocusEvent):void

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

Processes the FocusEvent.KEY_FOCUS_CHANGE event when the client manages events.

Parameters

event:FocusEvent — The FocusEvent object.

See also

keyUpHandler

()method 
public function keyUpHandler(event:KeyboardEvent):void

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

Processes the Keyboard.KEY_UP event when the client manages events.

Parameters

event:KeyboardEvent — The KeyboardEvent object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its keyUpHandler() method with a custom keyUpHandler() method. The example requires an application that triggers the keyUpHandler() method.

package flashx.textLayout.container.examples  
{
    import flash.events.KeyboardEvent;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    
    public class ContainerController_keyUpHandlerExample extends ContainerController
    {
        public function ContainerController_keyUpHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
        {
            super(container, compositionWidth, compositionHeight);
        }
        override public function keyUpHandler(event:KeyboardEvent):void
        {    
            // run the TLF handler for the KEY_UP event
            super.keyUpHandler(event);
            // and add your own code for the event 
            trace("You are in keyUpHandler()");        
        }
    }
}

menuSelectHandler

()method 
public function menuSelectHandler(event:ContextMenuEvent):void

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

Processes the ContextMenuEvent.MENU_SELECT event when the client manages events.

Parameters

event:ContextMenuEvent — ContextMenuEvent object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its menuSelectHandler() method with a custom menuSelectHandler() method. The example requires an application that triggers the menuSelectHandler() method.

package flashx.textLayout.container.examples 
{
    import flash.events.ContextMenuEvent;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
     
    public class ContainerController_menuSelectHandlerExample extends ContainerController
    {
        public function ContainerController_menuSelectHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
         {
             super(container, compositionWidth, compositionHeight);
         }
        override public function menuSelectHandler(event:ContextMenuEvent):void
        {    
            // run the TLF handler for the MENU_SELECT event
            super.menuSelectHandler(event);
            // and add your own code for the event 
            trace("You are in menuSelectHandler()");        
        }
    }
}

mouseDoubleClickHandler

()method 
public function mouseDoubleClickHandler(event:MouseEvent):void

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

Processes the MouseEvent.DOUBLE_CLICK event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its mouseDoubleClickHandler() method with a custom mouseDoubleClickHandler() method. The example requires an application that triggers the mouseDoubleClickHandler() method.

package flashx.textLayout.container.examples  
{
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    
    public class ContainerController_mouseDoubleClickHandlerExample extends ContainerController
    {
        public function ContainerController_mouseDoubleClickHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
        {
            super(container, compositionWidth, compositionHeight);
        }
        override public function mouseDoubleClickHandler(event:MouseEvent):void
        {    
            // run the TLF handler for the MOUSE_OVER event
            super.mouseDoubleClickHandler(event);
            // and add your own code for the event 
            trace("You are in mouseDoubleClickHandler()");        
        }
    }
}

mouseDownHandler

()method 
public function mouseDownHandler(event:MouseEvent):void

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

Processes the MouseEvent.MOUSE_DOWN event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also

mouseMoveHandler

()method 
public function mouseMoveHandler(event:MouseEvent):void

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

Processes the MouseEvent.MOUSE_MOVE event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also

mouseMoveSomewhere

()method 
public function mouseMoveSomewhere(event:Event):void

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

Client call to forward a mouseMove event from outside a security sandbox. Coordinates of the mouse move are not needed.

Parameters

event:Event

mouseOutHandler

()method 
public function mouseOutHandler(event:MouseEvent):void

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

Processes the MouseEvent.MOUSE_OUT event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also

mouseOverHandler

()method 
public function mouseOverHandler(event:MouseEvent):void

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

Processes the MouseEvent.MOUSE_OVER event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its mouseOverHandler() method with a custom mouseOverHandler() method. The example requires an application that triggers the mouseOverHandler() method.

package flashx.textLayout.container.examples  
{
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
    
    public class ContainerController_mouseOverHandlerExample extends ContainerController
    {
        public function ContainerController_mouseOverHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
        {
            super(container, compositionWidth, compositionHeight);
        }
        override public function mouseOverHandler(event:MouseEvent):void
        {    
            // run the TLF handler for the MOUSE_OVER event
            super.mouseOverHandler(event);
            // and add your own code for the event 
            trace("You are in mouseOverHandler()");        
        }
    }
}

mouseUpHandler

()method 
public function mouseUpHandler(event:MouseEvent):void

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

Processes the MouseEvent.MOUSE_UP event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also

mouseUpSomewhere

()method 
public function mouseUpSomewhere(event:Event):void

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

Client call to forward a mouseUp event from outside a security sandbox. Coordinates of the mouse up are not needed.

Parameters

event:Event

mouseWheelHandler

()method 
public function mouseWheelHandler(event:MouseEvent):void

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

Processes the MouseEvent.MOUSE_WHEEL event when the client manages events.

Parameters

event:MouseEvent — The MouseEvent object.

See also

removeSelectionContainer

()method 
protected function removeSelectionContainer(selectionContainer:DisplayObjectContainer):void

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

Removes the flash.display.DisplayObjectContainer object which contains selection shapes (such as block selection highlight, cursor etc.). The default implementation of this method, which may be overriden, removes the object from its parent if one exists.

Parameters

selectionContainer:DisplayObjectContainerflash.display.DisplayObjectContainer object to remove

See also

removeTextLine

()method 
protected function removeTextLine(textLine:flash.text.engine:TextLine):void

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

Removes a flash.text.engine.TextLine object from its parent. The default implementation of this method, which may be overriden, removes the object from container if it is a direct child of the latter. This method may be called even if the object is not a descendant of container. Any implementation of this method must ensure that no action is taken in this case.

Parameters

textLine:flash.text.engine:TextLine — the flash.text.engine.TextLine object to remove

See also

scrollToRange

()method 
public function scrollToRange(activePosition:int, anchorPosition:int):void

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

Scrolls so that the text range is visible in the container.

Parameters

activePosition:int — The end of the selection that is changed when you extend the selection. It can be either the start or the end of the selection, expressed as an offset from the start of the text flow.
 
anchorPosition:int — The stable end of the selection when you extend the selection. It can be either the start or the end of the selection.

selectRange

()method 
public function selectRange(anchorIndex:int, activeIndex:int):void

Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0 Flash Player 10.0

Sets the range of selected text in a component implementing ITextSupport. If either of the arguments is out of bounds the selection should not be changed. Components which wish to support inline IME should call into this method.

Parameters

anchorIndex:int — The zero-based index value of the character at the anchor end of the selection
 
activeIndex:int — The zero-based index value of the character at the active end of the selection.

setCompositionSize

()method 
public function setCompositionSize(w:Number, h:Number):void

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

Sets the width and height allowed for text in the container.

Parameters

w:Number — The width in pixels that's available for text in the container.
 
h:Number — The height in pixels that's available for text in the container.


Example  ( How to use this example )

This example sets the composition width and height with setCompositionSize().

package flashx.textLayout.container.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.conversion.TextConverter;
    
    public class ContainerController_setCompositionSizeExample extends Sprite
    {
        public function ContainerController_setCompositionSizeExample()
        {
            // create container, text flow, composer, paragraph, and span
            var container:Sprite = new Sprite();
            var textFlow:TextFlow = new TextFlow();
            var paragraph:ParagraphElement = new ParagraphElement();
            var span:SpanElement = new SpanElement;
            // add container to the stage; create controller and add it to the text flow
            addChild(container);
            container.x = 100;
            container.y = 50;
            var controller:ContainerController = new ContainerController(container);
            textFlow.flowComposer.addController(controller);
            // set font size and add text to the span; add the span to the paragraph
            textFlow.fontSize = 12;
            controller.setCompositionSize(250, 200);
            span.text = "This example uses setCompositionSize() to set compositionWidth (";
            span.text += controller.compositionWidth; 
            span.text += ") and compositionHeight ("
            span.text += controller.compositionHeight;
            span.text += "), rather than setting them with:\nnew ContainerController()";
            paragraph.addChild(span);
            // add paragraph to text flow, and display text
            textFlow.addChild(paragraph);            
            textFlow.flowComposer.updateAllControllers();       
        }
    }
}

setStyle

()method 
public function setStyle(styleProp:String, newValue:*):void

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

Sets the value of the style specified by the styleProp parameter to the value specified by the newValue parameter.

Parameters

styleProp:String — The name of the style property whose value you want to set.
 
newValue:* — The value that you want to assign to the style.

textInputHandler

()method 
public function textInputHandler(event:flash.events:TextEvent):void

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

Processes the TextEvent.TEXT_INPUT event when the client manages events.

Parameters

event:flash.events:TextEvent — The TextEvent object.

See also


Example  ( How to use this example )

This example extends ContainerController to override its textInputHandler() method with a custom textInputHandler() method. The example requires an application that triggers the textInputHandler() method.

package flashx.textLayout.container.examples   
{
    import flash.events.TextEvent;
    import flash.display.Sprite;
    import flashx.textLayout.container.ContainerController;
 
    public class ContainerController_textInputHandlerExample extends ContainerController
    {
        public function ContainerController_textInputHandlerExample(container:Sprite, compositionWidth:Number=100, compositionHeight:Number=100)
         {
             super(container, compositionWidth, compositionHeight);
         }
        override public function textInputHandler(event:TextEvent):void
        {    
            // run the TLF handler for the textInput event
            super.textInputHandler(event);
            // and add your own code for the event - e.g. only allow alpha characters
            trace("You are in textInputHandler()");
            
        }
    }
}

updateVisibleRectangle

()method 
protected function updateVisibleRectangle():void

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

If scrolling, sets the scroll rectangle to the container rectangle so that any lines that are halfway in view are clipped to the scrollable region. If not scrolling, clear the scroll rectangle so that no clipping occurs.

ContainerControllerExample1.as

This example displays a text flow in two circles that are linked containers, meaning that the text that overflows the first container automatically flows into the second container. Notice that there are two containers and controllers but one text flow.

package flashx.textLayout.container.examples 
{
    import flash.display.Sprite;
    import flashx.textLayout.compose.StandardFlowComposer;
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.TextFlow;

    public class ContainerControllerExample1 extends Sprite
    {        
        private const textMarkup:String = "<flow:TextFlow xmlns:flow='http://ns.adobe.com/textLayout/2008' fontSize='8' " + 
                "textIndent='10' paragraphSpaceBefore='6' paddingTop='8' paddingLeft='8' paddingRight='8'>" +
            "<flow:p paragraphSpaceBefore='inherit'>" +
                "<flow:span>There are many </flow:span>" + 
                "<flow:span fontStyle='italic'>such</flow:span>" + 
                "<flow:span> lime-kilns in that tract of country, for the purpose of burning the white" + 
                    " marble which composes a large part of the substance of the hills. Some of them, built " + 
                    "years ago, and long deserted, with weeds growing in the vacant round of the interior, " + 
                    "which is open to the sky, and grass and wild-flowers rooting themselves into the chinks" + 
                    "of the stones, look already like relics of antiquity, and may yet be overspread with the" + 
                    " lichens of centuries to come. Others, where the lime-burner still feeds his daily and " + 
                    "nightlong fire, afford points of interest to the wanderer among the hills, who seats " + 
                    "himself on a log of wood or a fragment of marble, to hold a chat with the solitary man. " + 
                    "It is a lonesome, and, when the character is inclined to thought, may be an intensely " + 
                    "thoughtful occupation; as it proved in the case of Ethan Brand, who had mused to such " + 
                    "strange purpose, in days gone by, while the fire in this very kiln was burning.</flow:span>" +
            "</flow:p>" +
            "<flow:p paragraphSpaceBefore='inherit'>" +
                "<flow:span>" + 
                    "The man who now watched the fire was of a different order, and troubled himself with no " + 
                    "thoughts save the very few that were requisite to his business. At frequent intervals, " + 
                    "he flung back the clashing weight of the iron door, and, turning his face from the " + 
                    "insufferable glare, thrust in huge logs of oak, or stirred the immense brands with a " + 
                    "long pole. Within the furnace were seen the curling and riotous flames, and the burning " + 
                    "marble, almost molten with the intensity of heat; while without, the reflection of the " + 
                    "fire quivered on the dark intricacy of the surrounding forest, and showed in the " + 
                    "foreground a bright and ruddy little picture of the hut, the spring beside its door, the " + 
                    "athletic and coal-begrimed figure of the lime-burner, and the halffrightened child, " + 
                    "shrinking into the protection of his father's shadow. And when again the iron door was " + 
                    "closed, then reappeared the tender light of the half-full moon, which vainly strove to" + 
                    "trace out the indistinct shapes of the neighboring mountains; and, in the upper sky, " + 
                    "there was a flitting congregation of clouds, still faintly tinged with the rosy sunset, " + 
                    "though thus far down into the valley the sunshine had vanished long and long ago.</flow:span>" + 
            "</flow:p>" +
        "</flow:TextFlow>";
        public function ContainerControllerExample1()
        {
            // create the TextFlow, containers, and container controllers
            var textFlow:TextFlow;
            var container:Sprite = new Sprite();
            var container2:Sprite = new Sprite();
            var controllerOne:ContainerController = new ContainerController(container, 200, 210);
            var controllerTwo:ContainerController = new ContainerController(container2, 200, 220);
            // import the text flow from markup using TextConverter and assign a StandardFlowComposer
            textFlow = TextConverter.importToFlow(textMarkup, TextConverter.TEXT_LAYOUT_FORMAT);
            textFlow.flowComposer = new StandardFlowComposer();
            // draw the container circles, add them to the stage and position them
            container.graphics.beginFill(0xFFCC00);
            container.graphics.drawCircle(100, 100, 140);
            container.graphics.endFill();
            container2.graphics.beginFill(0xFF0000);
            container2.graphics.drawCircle(100, 100, 140);
            container2.graphics.endFill();            
            addChild(container);
            addChild(container2);
            container.x = 25;
            container.y = 100;
            container2.x = 280;
            container2.y = 100;    
            // add the controllers to the text flow and update them to display the text
            textFlow.flowComposer.addController(controllerOne);
            textFlow.flowComposer.addController(controllerTwo);
            textFlow.flowComposer.updateAllControllers();
        }    
    }
}

ContainerControllerExample2.as

This example displays two text flows, headings and body text, in two containers. The example creates columns for the body text and implements scrolling. The resizeHandler() method resizes the containers and composes the text flows when changes occur to the size of the stage.

package flashx.textLayout.container.examples 
{
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.events.Event;
    import flash.geom.Rectangle;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.container.ScrollPolicy;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.SelectionManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;

    public class ContainerControllerExample2 extends Sprite
    {    
        // these variables are accessible to both methods in the class
        private var headingFlow:TextFlow;
        private var bodyFlow:TextFlow;
        private var headController:ContainerController;
        private var bodyController:ContainerController;
        
        private const headingMarkup:String = "<flow:TextFlow xmlns:flow='http://ns.adobe.com/textLayout/2008'>" +
                "<flow:p textAlign='center'>" +
                    "<flow:span fontFamily='Georgia' fontSize='36'>Ethan Brand</flow:span><flow:br/>" +
                    "<flow:span fontSize='8' fontStyle='italic'>by </flow:span>" +
                    "<flow:span fontSize='12' fontStyle='italic'>Nathaniel Hawthorne</flow:span>" +    
                "</flow:p>" +
            "</flow:TextFlow>";
        private const bodyMarkup:String = "<flow:TextFlow xmlns:flow='http://ns.adobe.com/textLayout/2008' fontSize='8' " + 
                "textIndent='10' paragraphSpaceBefore='6' paddingTop='8' paddingBottom='8' paddingLeft='8' paddingRight='8'>" +
            "<flow:p paragraphSpaceBefore='inherit' >" +
                "<flow:span>There are many </flow:span>" + 
                "<flow:span fontStyle='italic'>such</flow:span>" + 
                "<flow:span> lime-kilns in that tract of country, for the purpose of burning the white" + 
                    " marble which composes a large part of the substance of the hills. Some of them, built " + 
                    "years ago, and long deserted, with weeds growing in the vacant round of the interior, " + 
                    "which is open to the sky, and grass and wild-flowers rooting themselves into the chinks " + 
                    "of the stones, look already like relics of antiquity, and may yet be overspread with the" + 
                    " lichens of centuries to come. Others, where the lime-burner still feeds his daily and " + 
                    "nightlong fire, afford points of interest to the wanderer among the hills, who seats " + 
                    "himself on a log of wood or a fragment of marble, to hold a chat with the solitary man. " + 
                    "It is a lonesome, and, when the character is inclined to thought, may be an intensely " + 
                    "thoughtful occupation; as it proved in the case of Ethan Brand, who had mused to such " + 
                    "strange purpose, in days gone by, while the fire in this very kiln was burning.</flow:span>" +
            "</flow:p>" +
            "<flow:p paragraphSpaceBefore='inherit'>" +
                "<flow:span>" + 
                    "The man who now watched the fire was of a different order, and troubled himself with no " + 
                    "thoughts save the very few that were requisite to his business. At frequent intervals, " + 
                    "he flung back the clashing weight of the iron door, and, turning his face from the " + 
                    "insufferable glare, thrust in huge logs of oak, or stirred the immense brands with a " + 
                    "long pole. Within the furnace were seen the curling and riotous flames, and the burning " + 
                    "marble, almost molten with the intensity of heat; while without, the reflection of the " + 
                    "fire quivered on the dark intricacy of the surrounding forest, and showed in the " + 
                    "foreground a bright and ruddy little picture of the hut, the spring beside its door, the " + 
                    "athletic and coal-begrimed figure of the lime-burner, and the halffrightened child, " + 
                    "shrinking into the protection of his father's shadow. And when again the iron door was " + 
                    "closed, then reappeared the tender light of the half-full moon, which vainly strove to " + 
                    "trace out the indistinct shapes of the neighboring mountains; and, in the upper sky, " + 
                    "there was a flitting congregation of clouds, still faintly tinged with the rosy sunset, " + 
                    "though thus far down into the valley the sunshine had vanished long and long ago.</flow:span>" + 
            "</flow:p>" +
        "</flow:TextFlow>";
        public function ContainerControllerExample2()
        {
            // align the stage and add a listener (resizeHandler) for RESIZE events
            stage.align = StageAlign.TOP_LEFT;
            stage.addEventListener(flash.events.Event.RESIZE, resizeHandler);
            // create heading text flow, import heading text, and assign composer
            headingFlow = new TextFlow();
            headingFlow = TextConverter.importToFlow(headingMarkup, TextConverter.TEXT_LAYOUT_FORMAT);
            // create body text flow, import body text, and assign flow composer
            bodyFlow = new TextFlow();
            bodyFlow = TextConverter.importToFlow(bodyMarkup, TextConverter.TEXT_LAYOUT_FORMAT);
            // create heading container, add controller, position container and add to stage
            var headContainer:Sprite = new Sprite();
            headController = new ContainerController(headContainer, 300, 50);
            headingFlow.flowComposer.addController(headController);    
            headContainer.x = 120;
            headContainer.y = 20;
            addChild(headContainer);
            // update controller to display heading text
            headingFlow.flowComposer.updateAllControllers();
            // create container for body text and position it
            var bodyContainer:Sprite = new Sprite();
            bodyController = new ContainerController(bodyContainer, 300, 200);
            bodyContainer.x = 125;
            bodyContainer.y = 85;
            // create container format to specify columns
            var bodyContainerFormat:TextLayoutFormat = new TextLayoutFormat();
            bodyContainerFormat.columnWidth = 120;
            bodyContainerFormat.columnGap = 15;
            bodyController.format = bodyContainerFormat;
            // enable scrolling
            bodyController.verticalScrollPolicy = ScrollPolicy.AUTO;
            bodyFlow.interactionManager = new SelectionManager();
            // add controller, add container to stage, and display body text
            bodyFlow.flowComposer.addController(bodyController);
            addChild(bodyContainer);
            bodyFlow.flowComposer.updateAllControllers();
        }
        
        private function resizeHandler(event:Event):void
        {
            const verticalGap:Number = 25;
            const stagePadding:Number = 16;
            var stageWidth:Number = stage.stageWidth - stagePadding;
            var stageHeight:Number = stage.stageHeight - stagePadding;
            var headlineWidth:Number = stageWidth;
            var headlineContainerHeight:Number = stageHeight;
            // Initial compose to get height of headline after resize
            headController.setCompositionSize(headlineWidth, headlineContainerHeight);
            headingFlow.flowComposer.compose();
            var rect:Rectangle = headController.getContentBounds();
            headlineContainerHeight = rect.height;
            // Resize and place headline text container
            // Call setCompositionSize() again with updated headline height
            headController.setCompositionSize(headlineWidth, headlineContainerHeight );
            headController.container.x = stagePadding / 2;
            headController.container.y = stagePadding / 2;
            headingFlow.flowComposer.updateAllControllers();
            // Resize and place body text container
            var bodyContainerHeight:Number = (stageHeight - verticalGap -
            headlineContainerHeight);
            bodyController.setCompositionSize(stageWidth, bodyContainerHeight );
            bodyController.container.x = (stagePadding/2);
            bodyController.container.y = (stagePadding/2) + headlineContainerHeight +
                verticalGap;
            bodyFlow.flowComposer.updateAllControllers();
        }
    }
}