flashx.textLayout.container

# TextContainerManager - AS3

Package | flashx.textLayout.container
Class | public class TextContainerManager
Inheritance | TextContainerManager EventDispatcher Object
Implements | ISWFContext, IInteractionEventHandler, ISandboxSupport

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Consider using TextContainerManager for better performance in cases where there is a one container per TextFlow, and the TextFlow is not the main focus, is static text, or is infrequently selected. Good for text in form fields, for example.

Related API Elements

ContainerController

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | compositionHeight : Number Returns the vertical extent allowed for text inside the container. | TextContainerManager
|  | compositionWidth : Number Returns the horizontal extent allowed for text inside the container. | TextContainerManager
|  | configuration : IConfiguration [read-only] The Configuration object for this TextContainerManager. | TextContainerManager
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | container : Sprite [read-only] Returns the container (DisplayObjectContainer) that holds the text that this TextContainerManager manages. | TextContainerManager
|  | defaultConfiguration : IConfiguration [static] [read-only] The default configuration for this TextContainerManager. | TextContainerManager
|  | editingMode : String Editing mode of this TextContainerManager. | TextContainerManager
|  | horizontalScrollPolicy : String Controls whether the factory generates all text lines or stops when the container bounds are filled. Specifies the horizontal scrolling policy, which you can set by assigning one of the constants of the ScrollPolicy class: ON, OFF, or AUTO. | TextContainerManager
|  | horizontalScrollPosition : Number Specifies the current horizontal scroll location on the stage. | TextContainerManager
|  | hostFormat : flashx.textLayout.formats:ITextLayoutFormat Sets the format when display just a string. | TextContainerManager
|  | numLines : int [read-only] The total number of lines composed in the flow. | TextContainerManager
|  | swfContext : ISWFContext Optional ISWFContext instance used to make FTE calls as needed in the proper swf context. | TextContainerManager
|  | verticalScrollPolicy : String Controls whether the factory generates all text lines or stops when the container bounds are filled. Specifies the vertical scrolling policy, which you can set by assigning one of the constants of the ScrollPolicy class: ON, OFF, or, AUTO. | TextContainerManager
|  | verticalScrollPosition : Number Specifies the current vertical scroll location on the stage. | TextContainerManager

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | TextContainerManager(container:Sprite, configuration:IConfiguration = null) Constructor function - creates a TextContainerManager instance. | TextContainerManager
|  | activateHandler(event:Event):void Processes the Event.ACTIVATE event when the client manages events. | TextContainerManager
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | beginInteraction():ISelectionManager Returns the current ISelectionManager instance. | TextContainerManager
|  | beginMouseCapture():void Called to request clients to begin the forwarding of mouseup and mousemove events from outside a security sandbox. | TextContainerManager
|  | compose():void Composes the container text; calls either the factory or updateAllControllers(). | TextContainerManager
|  | deactivateHandler(event:Event):void Processes the Event.DEACTIVATE event when the client manages events. | TextContainerManager
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | drawBackgroundAndSetScrollRect(scrollX:Number, scrollY:Number):Boolean Returns true if it has filled in the container's scrollRect property. | TextContainerManager
|  | editHandler(event:Event):void Processes an edit event (CUT, COPY, PASTE, SELECT_ALL) when the client manages events. | TextContainerManager
|  | endInteraction():void Terminates interaction. | TextContainerManager
|  | endMouseCapture():void Called to inform clients that the the forwarding of mouseup and mousemove events from outside a security sandbox is no longer needed. | TextContainerManager
|  | focusChangeHandler(event:FocusEvent):void Processes the FocusEvent.KEY_FOCUS_CHANGE and FocusEvent.MOUSE_FOCUS_CHANGE events when the client manages events. | TextContainerManager
|  | focusInHandler(event:FocusEvent):void Process a focusIn event. | TextContainerManager
|  | focusOutHandler(event:FocusEvent):void Processes the FocusEvent.FOCUS_OUT event when the client manages events. | TextContainerManager
|  | getContentBounds():Rectangle Creates a rectangle that shows where the last call to either the compose() method or the updateContainer() method placed the text. | TextContainerManager
|  | getLineAt(index:int):flash.text.engine:TextLine Return the TextLine at the index from array of composed lines. | TextContainerManager
|  | getScrollDelta(numLines:int):Number Figure out the scroll distance required to scroll up or down by the specified number of lines. | TextContainerManager
|  | getText(separator:String = " "):String Returns the current text using a separator between paragraphs. | TextContainerManager
|  | getTextFlow():flashx.textLayout.elements:TextFlow The current TextFlow. | TextContainerManager
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | imeStartCompositionHandler(event:IMEEvent):void Processes the IME_START_COMPOSITION event when the client manages events. | TextContainerManager
|  | invalidateSelectionFormats():void Call this if you change the selection formats (SelectionFormat) and want the interactionManager to update. | TextContainerManager
|  | invalidateUndoManager():void Call this if you are editing, and want to reset the undo manager used for editing. | TextContainerManager
|  | isDamaged():Boolean Returns true if the content needs composing. | TextContainerManager
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | keyDownHandler(event:KeyboardEvent):void Processes the KeyboardEvent.KEY_DOWN event when the client manages events. | TextContainerManager
|  | keyFocusChangeHandler(event:FocusEvent):void Processes the FocusEvent.KEY_FOCUS_CHANGE event when the client manages events. | TextContainerManager
|  | keyUpHandler(event:KeyboardEvent):void Processes the Keyboard.KEY_UP event when the client manages events. | TextContainerManager
|  | menuSelectHandler(event:ContextMenuEvent):void Processes the ContextMenuEvent.MENU_SELECT event when the client manages events. | TextContainerManager
|  | mouseDoubleClickHandler(event:MouseEvent):void Processes the MouseEvent.DOUBLE_CLICK event when the client manages events. | TextContainerManager
|  | mouseDownHandler(event:MouseEvent):void Processes the MouseEvent.MOUSE_DOWN event when the client manages events. | TextContainerManager
|  | mouseMoveHandler(event:MouseEvent):void Processes the MouseEvent.MOUSE_MOVE event when the client manages events. | TextContainerManager
|  | mouseMoveSomewhere(e:Event):void Client call to forward a mouseMove event from outside a security sandbox. | TextContainerManager
|  | mouseOutHandler(event:MouseEvent):void Processes the MouseEvent.MOUSE_OUT event when the client manages events. | TextContainerManager
|  | mouseOverHandler(event:MouseEvent):void Process a mouseOver event. | TextContainerManager
|  | mouseUpHandler(event:MouseEvent):void Processes the MouseEvent.MOUSE_UP event when the client manages events. | TextContainerManager
|  | mouseUpSomewhere(e:Event):void Client call to forward a mouseUp event from outside a security sandbox. | TextContainerManager
|  | mouseWheelHandler(event:MouseEvent):void Processes the MouseEvent.MOUSE_WHEEL event when the client manages events. | TextContainerManager
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | resetLine(textLine:flash.text.engine:TextLine):void | TextContainerManager
|  | scrollToRange(activePosition:int, anchorPosition:int):void Scrolls so that the text range is visible in the container. | TextContainerManager
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | setText(text:String):void Sets the text property to the specified String. | TextContainerManager
|  | setTextFlow(textFlow:flashx.textLayout.elements:TextFlow):void Sets a TextFlow into this TextContainerManager replacing any existing TextFlow and discarding the current text. | TextContainerManager
|  | softKeyboardActivatingHandler(event:Event):void Processes the SOFT_KEYBOARD_ACTIVATING event when the client manages events. | TextContainerManager
|  | textInputHandler(event:flash.events:TextEvent):void Processes the TextEvent.TEXT_INPUT event when the client manages events. | TextContainerManager
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | updateContainer():Boolean Updates the display; calls either the factory or updateAllControllers(). | TextContainerManager
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Protected Methods

| Method | Defined By
--- | --- | ---
|  | createContextMenu():ContextMenu Creates a ContextMenu for the TextContainerManager. | TextContainerManager
|  | createEditManager(undoManager:IUndoManager):IEditManager Create an edit manager to use for editing. | TextContainerManager
|  | createSelectionManager():ISelectionManager Create a selection manager to use for selection. | TextContainerManager
|  | getFocusedSelectionFormat():SelectionFormat Returns the focusedSelectionFormat - by default get it from the configuration. | TextContainerManager
|  | getInactiveSelectionFormat():SelectionFormat Returns the inactiveSelectionFormat - by default get it from the configuration This can be overridden in the subclass to supply a different SelectionFormat | TextContainerManager
|  | getUndoManager():IUndoManager Returns the undo manager to use. | TextContainerManager
|  | getUnfocusedSelectionFormat():SelectionFormat Returns the unfocusedSelectionFormat - by default get it from the configuration You can override this method in the subclass to supply a different SelectionFormat. | TextContainerManager

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | click | Dispatched when any link is clicked. | TextContainerManager
|  | compositionComplete | Dispatched after every recompose. | TextContainerManager
|  | damage | Dispatched by a TextFlow object each time it is damaged | TextContainerManager
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher
|  | flowOperationBegin | Defines the value of the type property of a flowOperationBegin event object. | TextContainerManager
|  | flowOperationComplete | Defines the value of the type property of a flowOperationComplete event object. | TextContainerManager
|  | flowOperationEnd | Defines the value of the type property of a flowOperationEnd event object. | TextContainerManager
|  | inlineGraphicStatusChanged | Dispatched when a InlineGraphicElement is resized due to having width or height as auto or percent and the graphic has finished loading. | TextContainerManager
|  | mouseDown | Dispatched when the mouse is pressed down over any link. | TextContainerManager
|  | mouseMove | Dispatched when the mouse passes over any link. | TextContainerManager
|  | mouseUp | Dispatched when the mouse is released over any link. | TextContainerManager
|  | rollOut | Dispatched when the mouse goes out of any link. | TextContainerManager
|  | rollOver | Dispatched when the mouse first enters any link. | TextContainerManager
|  | scroll | Dispatched by a TextFlow object after text is scrolled within a controller container. | TextContainerManager
|  | selectionChange | Dispatched whenever the selection is changed. | TextContainerManager
|  | updateComplete | Dispatched by a TextFlow object each time a container has had new DisplayObjects added or updated as a result of composition. | TextContainerManager

Property Detail

### compositionHeight

property

`compositionHeight:Number`

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.

After setting this property, the text in the container is damaged and requires composing.

Implementation
`public function get compositionHeight():Number`
`public function set compositionHeight(value:Number):void`

### compositionWidth

property

`compositionWidth:Number`

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.

After setting this property, the text in the container is damaged and requires composing.

Implementation
`public function get compositionWidth():Number`
`public function set compositionWidth(value:Number):void`

### configuration

property

`configuration:IConfiguration` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The Configuration object for this TextContainerManager.

Implementation
`public function get configuration():IConfiguration`

Related API Elements

IConfiguration

### container

property

`container:Sprite` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns the container (DisplayObjectContainer) that holds the text that this TextContainerManager manages.

Implementation
`public function get container():Sprite`

Related API Elements

ContainerController.container

### defaultConfiguration

property

`defaultConfiguration:IConfiguration` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The default configuration for this TextContainerManager. Column and padding attributes are set to `FormatValue.INHERIT`.

Implementation
`public static function get defaultConfiguration():IConfiguration`

Related API Elements

IConfiguration
FormatValue.INHERIT

### editingMode

property

`editingMode:String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Editing mode of this TextContainerManager. Modes are reading only, reading and selection permitted, and editing (reading, selection, and writing) permitted. Use the constant values of the EditingMode class to set this property.

Default value is READ_WRITE.

Implementation
`public function get editingMode():String`
`public function set editingMode(value:String):void`

Related API Elements

EditingMode

### horizontalScrollPolicy

property

`horizontalScrollPolicy:String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Controls whether the factory generates all text lines or stops when the container bounds are filled.

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`

### 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`

### hostFormat

property

`hostFormat:flashx.textLayout.formats:ITextLayoutFormat`

Sets the format when display just a string. If displaying a TextFlow this has no immediate effect. The supplied ITextLayoutFormat is not copied. Modifying it without calling this setter has indeterminate effects.

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

### numLines

property

`numLines:int` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The total number of lines composed in the flow. By default TLF does not compose the entire flow and this value may be innacruate. Use composeToPosition to get all lines composed.

Implementation
`public function get numLines():int`

### swfContext

property

`swfContext:ISWFContext`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Optional ISWFContext instance used to make FTE calls as needed in the proper swf context.

Implementation
`public function get swfContext():ISWFContext`
`public function set swfContext(value:ISWFContext):void`

Related API Elements

flashx.textLayout.compose.ISWFContext

### verticalScrollPolicy

property

`verticalScrollPolicy:String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Controls whether the factory generates all text lines or stops when the container bounds are filled.

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`

### 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`
Constructor Detail

### TextContainerManager

()
Constructor

`public function TextContainerManager(container:Sprite, configuration:IConfiguration = null)`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Constructor function - creates a TextContainerManager instance. For best results:

1. Start with TextContainerManager.defaultConfiguration and modify it
2. Share the same Configuration among many InputManagers

Parameters

| `container:Sprite` — The DisplayObjectContainer in which to manage the text lines.
| `configuration:IConfiguration` (default = `null`)`` — - The IConfiguration instance to use with this TextContainerManager instance.

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.

Related API Elements

Event.ACTIVATE

### beginInteraction

()
method

`public function beginInteraction():ISelectionManager`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns the current ISelectionManager instance. Converts to TextFlow instance and creates one if necessary.

Returns

| `ISelectionManager` — the interaction manager for this TextContainerManager instance.

Related API Elements

ISelectionManager

### 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.

### compose

()
method

`public function compose():void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Composes the container text; calls either the factory or `updateAllControllers()`.

### createContextMenu

()
method

`protected function createContextMenu():ContextMenu`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Creates a ContextMenu for the TextContainerManager. 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` — the created context menu.

Related API Elements

ContextMenu

### createEditManager

()
method

`protected function createEditManager(undoManager:IUndoManager):IEditManager`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Create an edit manager to use for editing. Override this method if you have a custom EditManager that you want to use in place of the default.

Parameters

| `undoManager:IUndoManager` — IUndoManager instance for the EditManager being created.

Returns

| `IEditManager` — the editing manager for this TextContainerManager instance.

### createSelectionManager

()
method

`protected function createSelectionManager():ISelectionManager`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Create a selection manager to use for selection. Override this method if you have a custom SelectionManager that you want to use in place of the default.

Returns

| `ISelectionManager` — a new SelectionManager instance.

### 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.

Related API Elements

Event.DEACTIVATE

### drawBackgroundAndSetScrollRect

()
method

`public function drawBackgroundAndSetScrollRect(scrollX:Number, scrollY:Number):Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns `true` if it has filled in the container's scrollRect property. This method enables you to test whether `scrollRect` is set without actually accessing the `scrollRect` property which can possibly create a performance issue.

Override this method to draw a background or a border. Overriding this method can be tricky as the scrollRect must be set as specified.

Parameters

| `scrollX:Number` — The starting horizontal position of the scroll rectangle.
| `scrollY:Number` — The starting vertical position of the scroll rectangle.

Returns

| `Boolean` — `true` if it has created the `scrollRect` object.

### 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.

Related API Elements

Event

### endInteraction

()
method

`public function endInteraction():void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Terminates interaction.

Related API Elements

ISelectionManager

### 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.

Related API Elements

FocusEvent.KEY_FOCUS_CHANGE
FocusEvent.MOUSE_FOCUS_CHANGE

### focusInHandler

()
method

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

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Process a focusIn event.

Parameters

| `event:FocusEvent`

### 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.

Related API Elements

FocusEvent.FOCUS_OUT

### getContentBounds

()
method

`public function getContentBounds():Rectangle`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Creates a rectangle that shows where the last call to either the `compose()` method or the `updateContainer()` method placed the text.

Returns

| `Rectangle` — the bounds of the content

Related API Elements

compose()
updateContainer()

### getFocusedSelectionFormat

()
method

`protected function getFocusedSelectionFormat():SelectionFormat`

Returns the focusedSelectionFormat - by default get it from the configuration. This can be overridden in the subclass to supply a different SelectionFormat

Returns

| `SelectionFormat`

### getInactiveSelectionFormat

()
method

`protected function getInactiveSelectionFormat():SelectionFormat`

Returns the inactiveSelectionFormat - by default get it from the configuration This can be overridden in the subclass to supply a different SelectionFormat

Returns

| `SelectionFormat`

### getLineAt

()
method

`public function getLineAt(index:int):flash.text.engine:TextLine`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Return the TextLine at the index from array of composed lines.

Parameters

| `index:int` — Finds the line at this index position in the text.

Returns

| `flash.text.engine:TextLine` — the TextLine that occurs at the specified index.

### 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

### getText

()
method

`public function getText(separator:String = " "):String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns the current text using a separator between paragraphs. The separator can be specified with the `separator` argument. The default value of the `separator` argument is the Unicode character `'PARAGRAPH SEPARATOR' (U+2029)`.

Calling the setter discards any attached TextFlow. Any selection is lost.

Parameters

| `separator:String` (default = "`` ")`` — String to set between paragraphs.

Returns

| `String`

### getTextFlow

()
method

`public function getTextFlow():flashx.textLayout.elements:TextFlow`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

The current TextFlow. Converts this to a full TextFlow representation if it isn't already one.

Returns

| `flashx.textLayout.elements:TextFlow` — the current TextFlow object

### getUndoManager

()
method

`protected function getUndoManager():IUndoManager`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns the undo manager to use. By default, creates a unique undo manager. You can override this method in the subclass if you want to customize the undo manager (for example, to use a shared undo manager for multiple TextContainerManager instances).

Returns

| `IUndoManager` — new IUndoManager instance.

### getUnfocusedSelectionFormat

()
method

`protected function getUnfocusedSelectionFormat():SelectionFormat`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns the unfocusedSelectionFormat - by default get it from the configuration You can override this method in the subclass to supply a different SelectionFormat.

Returns

| `SelectionFormat`

### imeStartCompositionHandler

()
method

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

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 1.5

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

Parameters

| `event:IMEEvent` — The IMEEvent object.

Related API Elements

IMEEvent.IME_START_COMPOSITION

### invalidateSelectionFormats

()
method

`public function invalidateSelectionFormats():void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Call this if you change the selection formats (SelectionFormat) and want the interactionManager to update.

### invalidateUndoManager

()
method

`public function invalidateUndoManager():void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Call this if you are editing, and want to reset the undo manager used for editing.

### isDamaged

()
method

`public function isDamaged():Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Returns `true` if the content needs composing.

Returns

| `Boolean` — `true` if the content needs composing; `false` otherwise.

### 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.

Related API Elements

KeyboardEvent.KEY_DOWN

### 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.

### 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.

Related API Elements

KeyboardEvent.KEY_UP

### 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.

Related API Elements

ContextMenuEvent.MENU_SELECT

### 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.

Related API Elements

MouseEvent.DOUBLE_CLICK

### 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.

Related API Elements

MouseEvent.MOUSE_DOWN

### 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.

Related API Elements

MouseEvent.MOUSE_MOVE

### mouseMoveSomewhere

()
method

`public function mouseMoveSomewhere(e: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

| `e: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.

Related API Elements

MouseEvent.MOUSE_OUT

### mouseOverHandler

()
method

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

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Process a mouseOver event.

Parameters

| `event:MouseEvent`

Related API Elements

MouseEvent.MOUSE_OVER

### 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.

Related API Elements

MouseEvent.MOUSE_UP

### mouseUpSomewhere

()
method

`public function mouseUpSomewhere(e: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

| `e: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.

Related API Elements

MouseEvent.MOUSE_WHEEL

### resetLine

()
method

`public function resetLine(textLine:flash.text.engine:TextLine):void`

Parameters

| `textLine:flash.text.engine:TextLine`

### 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.

### setText

()
method

`public function setText(text:String):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Sets the `text` property to the specified String. Discards any attached TextFlow. Any selection is lost.

Parameters

| `text:String` — the String to set

### setTextFlow

()
method

`public function setTextFlow(textFlow:flashx.textLayout.elements:TextFlow):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Sets a TextFlow into this TextContainerManager replacing any existing TextFlow and discarding the current text.

Parameters

| `textFlow:flashx.textLayout.elements:TextFlow`

### softKeyboardActivatingHandler

()
method

`public function softKeyboardActivatingHandler(event:Event):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.2, AIR 1.5

Processes the `SOFT_KEYBOARD_ACTIVATING` event when the client manages events.

Parameters

| `event:Event` — The SoftKeyboardEvent object.

Related API Elements

SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING

### 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.

Related API Elements

TextEvent.TEXT_INPUT

### updateContainer

()
method

`public function updateContainer():Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Updates the display; calls either the factory or updateAllControllers().

Returns

| `Boolean` — true if anything changed.

Event Detail

### click

Event

Event Object Type: `flashx.textLayout.events.FlowElementMouseEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when any link is clicked.

### compositionComplete

Event

Event Object Type: `flashx.textLayout.events.CompositionCompleteEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched after every recompose.

### damage

Event

Event Object Type: `flashx.textLayout.events.DamageEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched by a TextFlow object each time it is damaged

### flowOperationBegin

Event

Event Object Type: `flashx.textLayout.events.FlowOperationEvent`
property FlowOperationEvent.type = `flashx.textLayout.events.FlowOperationEvent.FLOW_OPERATION_BEGIN`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Defines the value of the `type` property of a `flowOperationBegin` event object. Dispatched before an operation is executed. Cancelling this event blocks the operation.

### flowOperationComplete

Event

Event Object Type: `flashx.textLayout.events.FlowOperationEvent`
property FlowOperationEvent.type = `flashx.textLayout.events.FlowOperationEvent.FLOW_OPERATION_COMPLETE`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Defines the value of the `type` property of a `flowOperationComplete` event object. Dispatched after all operations including pending and composite operations are completed, composition is finished and the display is scrolled.

### flowOperationEnd

Event

Event Object Type: `flashx.textLayout.events.FlowOperationEvent`
property FlowOperationEvent.type = `flashx.textLayout.events.FlowOperationEvent.FLOW_OPERATION_END`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Defines the value of the `type` property of a `flowOperationEnd` event object. Dispatched after an operation completes. Any errors are stored in `OperationEvent.error`. If there is an error, cancelling this event blocks the rethrow of the error. Generally speaking all errors are likely to be fatal.

Changing an operation at this time (after it has been executed) may fail.

### inlineGraphicStatusChanged

Event

Event Object Type: `flashx.textLayout.events.StatusChangeEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when a InlineGraphicElement is resized due to having width or height as auto or percent and the graphic has finished loading.

### mouseDown

Event

Event Object Type: `flashx.textLayout.events.FlowElementMouseEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the mouse is pressed down over any link.

### mouseMove

Event

Event Object Type: `flashx.textLayout.events.FlowElementMouseEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the mouse passes over any link.

### mouseUp

Event

Event Object Type: `flashx.textLayout.events.FlowElementMouseEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the mouse is released over any link.

### rollOut

Event

Event Object Type: `flashx.textLayout.events.FlowElementMouseEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the mouse goes out of any link.

### rollOver

Event

Event Object Type: `flashx.textLayout.events.FlowElementMouseEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched when the mouse first enters any link.

### scroll

Event

Event Object Type: `flashx.textLayout.events.TextLayoutEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched by a TextFlow object after text is scrolled within a controller container.

### selectionChange

Event

Event Object Type: `flashx.textLayout.events.SelectionEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched whenever the selection is changed. Primarily used to update selection-dependent user interface.

### updateComplete

Event

Event Object Type: `flashx.textLayout.events.UpdateCompleteEvent`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10, AIR 1.5

Dispatched by a TextFlow object each time a container has had new DisplayObjects added or updated as a result of composition.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00