Package | flashx.textLayout.elements |
Class | public class TextFlow |
Inheritance | TextFlow ContainerFormattedElement ParagraphFormattedElement FlowGroupElement FlowElement Object |
Implements | flash.events.IEventDispatcher |
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
A TextFlow object can have ParagraphElement, ListElement and DivElement objects as children. A div (DivElement object) represents a group of paragraphs (ParagraphElement objects). A ListElement contains ListItemElement objects which in turn contain one or more ParagraphElement objects. A paragraph can have SpanElement, InlineGraphicElement, LinkElement, and TCYElement objects as children.
A span (SpanElement) is a range of text in a paragraph that has the same attributes. An image
(InlineGraphicElement) represents an arbitrary graphic that appears as a single character in a line of text. A
LinkElement represents a hyperlink, or HTML a
tag, and it can contain multiple spans. A TCYElement object
is used in Japanese text when there is a small run of text that appears perpendicular to the line, as in a horizontal
run within a vertical line. A TCYElement also can contain multiple spans.
TextFlow also derives from the ContainerFormattedElement class, which is the root class for all container-level block elements.
The following illustration shows the relationship of other elements, such as spans and paragraphs, to the TextFlow object.
Each TextFlow object has a corresponding Configuration object that allows you to specify initial character and
paragraph formats and the initial container format. It also allows you to specify attributes for selection, links,
focus, and scrolling. When you supply a Configuration object as parameter to the TextFlow()
constructor, it creates a read-only snapshot that you can access through the TextFlow.configuration
property. After creation, you can't change the TextFlow's configuration. If you do not specify a Configuration, you
can access the default configuration through the TextFlow.defaultConfiguration
property.
Default MXML PropertymxmlChildren
See also
Property | Defined By | ||
---|---|---|---|
alignmentBaseline : *
TextLayoutFormat:
Specifies the baseline to which the dominant baseline aligns. | FlowElement | ||
backgroundAlpha : *
TextLayoutFormat:
Alpha (transparency) value for the background (adopts default value if undefined during cascade). | FlowElement | ||
backgroundColor : *
TextLayoutFormat:
Background color of the text (adopts default value if undefined during cascade). | FlowElement | ||
baselineShift : *
TextLayoutFormat:
Amount to shift the baseline from the dominantBaseline value. | FlowElement | ||
blockProgression : *
TextLayoutFormat:
Specifies a vertical or horizontal progression of line placement. | FlowElement | ||
borderBottomColor : *
TextLayoutFormat:
Color of the bottom border (adopts default value if undefined during cascade). | FlowElement | ||
borderBottomPriority : *
TextLayoutFormat:
Specifies the priority when drawing cell boundaries. | FlowElement | ||
borderBottomWidth : *
TextLayoutFormat:
Bottom border width in pixels (adopts default value if undefined during cascade)
Legal values are numbers from 0 to 128 and FormatValue.INHERIT.
Default value is undefined indicating not set.
If undefined during the cascade this property will have a value of 0.
| FlowElement | ||
borderLeftColor : *
TextLayoutFormat:
Color of the left border (adopts default value if undefined during cascade). | FlowElement | ||
borderLeftPriority : *
TextLayoutFormat:
Specifies the priority when drawing cell boundaries. | FlowElement | ||
borderLeftWidth : *
TextLayoutFormat:
Left border width in pixels (adopts default value if undefined during cascade)
Legal values are numbers from 0 to 128 and FormatValue.INHERIT.
Default value is undefined indicating not set.
If undefined during the cascade this property will have a value of 0.
| FlowElement | ||
borderRightColor : *
TextLayoutFormat:
Color of the right border (adopts default value if undefined during cascade). | FlowElement | ||
borderRightPriority : *
TextLayoutFormat:
Specifies the priority when drawing cell boundaries. | FlowElement | ||
borderRightWidth : *
TextLayoutFormat:
Right border width in pixels (adopts default value if undefined during cascade)
Legal values are numbers from 0 to 128 and FormatValue.INHERIT.
Default value is undefined indicating not set.
If undefined during the cascade this property will have a value of 0.
| FlowElement | ||
borderTopColor : *
TextLayoutFormat:
Color of the top border (adopts default value if undefined during cascade). | FlowElement | ||
borderTopPriority : *
TextLayoutFormat:
Specifies the priority when drawing cell boundaries. | FlowElement | ||
borderTopWidth : *
TextLayoutFormat:
Top border width in pixels (adopts default value if undefined during cascade)
Legal values are numbers from 0 to 128 and FormatValue.INHERIT.
Default value is undefined indicating not set.
If undefined during the cascade this property will have a value of 0.
| FlowElement | ||
breakOpportunity : *
TextLayoutFormat:
Controls where lines are allowed to break when breaking wrapping text into multiple lines. | FlowElement | ||
cellPadding : *
TextLayoutFormat:
cellPadding specifies the amount of space between the border of the cell and its contents. | FlowElement | ||
cellSpacing : *
TextLayoutFormat:
cellSpacing specifies how much space the user agent should leave between the left side of the table and the left-hand side of the leftmost column, the top of the table and the top side of the topmost row, and so on for the right and bottom of the table. | FlowElement | ||
cffHinting : *
TextLayoutFormat:
The type of CFF hinting used for this text. | FlowElement | ||
clearFloats : *
TextLayoutFormat:
Controls how text wraps around a float. | FlowElement | ||
color : *
TextLayoutFormat:
Color of the text. | FlowElement | ||
columnBreakAfter : *
TextLayoutFormat:
Controls column after before the element. | FlowElement | ||
columnBreakBefore : *
TextLayoutFormat:
Controls column break before the element. | FlowElement | ||
columnCount : *
TextLayoutFormat:
Number of text columns (adopts default value if undefined during cascade). | FlowElement | ||
columnGap : *
TextLayoutFormat:
Specifies the amount of gutter space, in pixels, to leave between the columns (adopts default value if undefined during cascade). | FlowElement | ||
columnWidth : *
TextLayoutFormat:
Column width in pixels (adopts default value if undefined during cascade). | FlowElement | ||
computedFormat : ITextLayoutFormat [read-only]
Returns the computed format attributes that are in effect for this element. | FlowElement | ||
configuration : IConfiguration [read-only]
The Configuration object for this TextFlow object. | TextFlow | ||
containerBreakAfter : *
TextLayoutFormat:
Controls container after before the element. | FlowElement | ||
containerBreakBefore : *
TextLayoutFormat:
Controls container break before the element. | FlowElement | ||
coreStyles : Object [read-only] Returns the coreStyles on this FlowElement. | FlowElement | ||
defaultConfiguration : Configuration [static] Default configuration for all new TextFlow objects if the configuration is not specified. | TextFlow | ||
digitCase : *
TextLayoutFormat:
The type of digit case used for this text. | FlowElement | ||
digitWidth : *
TextLayoutFormat:
Type of digit width used for this text. | FlowElement | ||
direction : *
TextLayoutFormat:
Specifies the default bidirectional embedding level of the text in the text block. | FlowElement | ||
dominantBaseline : *
TextLayoutFormat:
Specifies which element baseline snaps to the alignmentBaseline to determine the vertical position of the element on the line. | FlowElement | ||
firstBaselineOffset : *
TextLayoutFormat:
Specifies the baseline position of the first line in the container. | FlowElement | ||
flowComposer : IFlowComposer [override] Manages the containers for this element. | TextFlow | ||
fontFamily : *
TextLayoutFormat:
The name of the font to use, or a comma-separated list of font names. | FlowElement | ||
fontLookup : *
TextLayoutFormat:
Font lookup to use. | FlowElement | ||
fontSize : *
TextLayoutFormat:
The size of the text in pixels. | FlowElement | ||
fontStyle : *
TextLayoutFormat:
Style of text. | FlowElement | ||
fontWeight : *
TextLayoutFormat:
Weight of text. | FlowElement | ||
format : ITextLayoutFormat TextLayoutFormat properties applied directly to this element. | FlowElement | ||
formatResolver : IFormatResolver A callback function for resolving element styles. | TextFlow | ||
frame : *
TextLayoutFormat:
frame specifies which sides of the frame surrounding a table will be visible. | FlowElement | ||
generation : uint [read-only]
The generation number for this TextFlow object. | TextFlow | ||
hostFormat : ITextLayoutFormat The TextLayoutFormat object for this TextFlow object. | TextFlow | ||
id : String
Assigns an identifying name to the element, making it possible to set a style for the element
by referencing the id. | FlowElement | ||
interactionManager : ISelectionManager
The InteractionManager associated with this TextFlow object. | TextFlow | ||
justificationRule : *
TextLayoutFormat:
Rule used to justify text in a paragraph. | FlowElement | ||
justificationStyle : *
TextLayoutFormat:
The style used for justification of the paragraph. | FlowElement | ||
kerning : *
TextLayoutFormat:
Kerning adjusts the pixels between certain character pairs to improve readability. | FlowElement | ||
leadingModel : *
TextLayoutFormat:
Specifies the leading model, which is a combination of leading basis and leading direction. | FlowElement | ||
ligatureLevel : *
TextLayoutFormat:
Controls which of the ligatures that are defined in the font may be used in the text. | FlowElement | ||
lineBreak : *
TextLayoutFormat:
Controls word wrapping within the container (adopts default value if undefined during cascade). | FlowElement | ||
lineHeight : *
TextLayoutFormat:
Leading controls for the text. | FlowElement | ||
lineThrough : *
TextLayoutFormat:
If true, applies strikethrough, a line drawn through the middle of the text. | FlowElement | ||
linkActiveFormat : *
TextLayoutFormat:
Defines the formatting attributes used for links in normal state. | FlowElement | ||
linkHoverFormat : *
TextLayoutFormat:
Defines the formatting attributes used for links in hover state, when the mouse is within the bounds (rolling over) a link. | FlowElement | ||
linkNormalFormat : *
TextLayoutFormat:
Defines the formatting attributes used for links in normal state. | FlowElement | ||
listAutoPadding : *
TextLayoutFormat:
This specifies an auto indent for the start edge of lists when the padding value of the list on that side is auto. | FlowElement | ||
listMarkerFormat : *
TextLayoutFormat:
Defines the formatting attributes list markers. | FlowElement | ||
listStylePosition : *
TextLayoutFormat:
Legal values are ListStylePosition.INSIDE, ListStylePosition.OUTSIDE, FormatValue.INHERIT.
Default value is undefined indicating not set.
If undefined during the cascade this property will inherit its value from an ancestor. | FlowElement | ||
listStyleType : *
TextLayoutFormat:
Legal values are ListStyleType.UPPER_ALPHA, ListStyleType.LOWER_ALPHA, ListStyleType.UPPER_ROMAN, ListStyleType.LOWER_ROMAN, ListStyleType.NONE, ListStyleType.DISC, ListStyleType.CIRCLE, ListStyleType.SQUARE, ListStyleType.BOX, ListStyleType.CHECK, ListStyleType.DIAMOND, ListStyleType.HYPHEN, ListStyleType.ARABIC_INDIC, ListStyleType.BENGALI, ListStyleType.DECIMAL, ListStyleType.DECIMAL_LEADING_ZERO, ListStyleType.DEVANAGARI, ListStyleType.GUJARATI, ListStyleType.GURMUKHI, ListStyleType.KANNADA, ListStyleType.PERSIAN, ListStyleType.THAI, ListStyleType.URDU, ListStyleType.CJK_EARTHLY_BRANCH, ListStyleType.CJK_HEAVENLY_STEM, ListStyleType.HANGUL, ListStyleType.HANGUL_CONSTANT, ListStyleType.HIRAGANA, ListStyleType.HIRAGANA_IROHA, ListStyleType.KATAKANA, ListStyleType.KATAKANA_IROHA, ListStyleType.LOWER_ALPHA, ListStyleType.LOWER_GREEK, ListStyleType.LOWER_LATIN, ListStyleType.UPPER_ALPHA, ListStyleType.UPPER_GREEK, ListStyleType.UPPER_LATIN, FormatValue.INHERIT.
Default value is undefined indicating not set.
If undefined during the cascade this property will inherit its value from an ancestor. | FlowElement | ||
locale : *
TextLayoutFormat:
The locale of the text. | FlowElement | ||
marginBottom : *
TextLayoutFormat:
bottom margin in pixels (adopts default value if undefined during cascade). | FlowElement | ||
marginLeft : *
TextLayoutFormat:
left margin in pixels(adopts default value if undefined during cascade). | FlowElement | ||
marginRight : *
TextLayoutFormat:
right margin in pixels (adopts default value if undefined during cascade). | FlowElement | ||
marginTop : *
TextLayoutFormat:
top margin in pixels (adopts default value if undefined during cascade). | FlowElement | ||
maxCellHeight : *
TextLayoutFormat:
Maximum height of a table cell. | FlowElement | ||
minCellHeight : *
TextLayoutFormat:
Minimum height of a table cell. | FlowElement | ||
mxmlChildren : Array
Appends an array of children to this object. | FlowGroupElement | ||
numChildren : int [read-only]
Returns the number of FlowElement children that this FlowGroupElement object has. | FlowGroupElement | ||
paddingBottom : *
TextLayoutFormat:
Bottom inset in pixels. | FlowElement | ||
paddingLeft : *
TextLayoutFormat:
Left inset in pixels. | FlowElement | ||
paddingRight : *
TextLayoutFormat:
Right inset in pixels. | FlowElement | ||
paddingTop : *
TextLayoutFormat:
Top inset in pixels. | FlowElement | ||
paragraphEndIndent : *
TextLayoutFormat:
A Number that specifies, in pixels, the amount to indent the paragraph's end edge. | FlowElement | ||
paragraphSpaceAfter : *
TextLayoutFormat:
A Number that specifies the amount of space, in pixels, to leave after the paragraph. | FlowElement | ||
paragraphSpaceBefore : *
TextLayoutFormat:
A Number that specifies the amount of space, in pixels, to leave before the paragraph. | FlowElement | ||
paragraphStartIndent : *
TextLayoutFormat:
A Number that specifies, in pixels, the amount to indent the paragraph's start edge. | FlowElement | ||
parent : FlowGroupElement [read-only] Returns the parent of this FlowElement object. | FlowElement | ||
parentElement : FlowGroupElement The parent element is the element that the TextFlow is nested inside (such as a TableCellElement). | TextFlow | ||
parentRelativeEnd : int [read-only] Returns the relative end of this FlowElement object in the parent. | FlowElement | ||
parentRelativeStart : int [read-only] Returns the relative start of this FlowElement object in the parent. | FlowElement | ||
renderingMode : *
TextLayoutFormat:
The rendering mode used for this text. | FlowElement | ||
rules : *
TextLayoutFormat:
rules specifies which rules will appear between cells within a table. | FlowElement | ||
styleName : *
TextLayoutFormat:
Assigns an identifying class to the element, making it possible to set a style for the element by referencing the styleName. | FlowElement | ||
styles : Object [read-only] Returns the styles on this FlowElement. | FlowElement | ||
tableColumnWidth : *
TextLayoutFormat:
Width of table column specifies a default width for each column spanned by the current COL element. | FlowElement | ||
tableWidth : *
TextLayoutFormat:
Width of table element specifies the desired width of the entire table and is intended for visual user agents. | FlowElement | ||
tabStops : *
TextLayoutFormat:
Specifies the tab stops associated with the paragraph. | FlowElement | ||
textAlign : *
TextLayoutFormat:
Alignment of lines in the paragraph relative to the container. | FlowElement | ||
textAlignLast : *
TextLayoutFormat:
Alignment of the last (or only) line in the paragraph relative to the container in justified text. | FlowElement | ||
textAlpha : *
TextLayoutFormat:
Alpha (transparency) value for the text. | FlowElement | ||
textDecoration : *
TextLayoutFormat:
Decoration on text. | FlowElement | ||
textIndent : *
TextLayoutFormat:
A Number that specifies, in pixels, the amount to indent the first line of the paragraph. | FlowElement | ||
textJustify : *
TextLayoutFormat:
Specifies options for justifying text. | FlowElement | ||
textLength : int [read-only]
Returns the total length of text owned by this FlowElement object and its children. | FlowElement | ||
textRotation : *
TextLayoutFormat:
Determines the number of degrees to rotate this text. | FlowElement | ||
tracking : Object [write-only]
Sets the tracking and is synonymous with the trackingRight property. | FlowElement | ||
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. | FlowElement | ||
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. | FlowElement | ||
typeName : String
Each FlowElement has a typeName. | FlowElement | ||
typographicCase : *
TextLayoutFormat:
The type of typographic case used for this text. | FlowElement | ||
userStyles : Object Allows you to read and write user styles on a FlowElement object. | FlowElement | ||
verticalAlign : *
TextLayoutFormat:
Vertical alignment or justification (adopts default value if undefined during cascade). | FlowElement | ||
whiteSpaceCollapse : *
TextLayoutFormat:
Collapses or preserves whitespace when importing text into a TextFlow. | FlowElement | ||
wordSpacing : *
TextLayoutFormat:
Specifies the optimum, minimum, and maximum spacing (as a multiplier of the width of a normal space) between words to use during justification. | FlowElement |
Method | Defined By | ||
---|---|---|---|
TextFlow(config:IConfiguration = null)
Constructor - creates a new TextFlow instance. | TextFlow | ||
Appends a child FlowElement object. | FlowGroupElement | ||
Adds a child FlowElement object at the specified index position. | FlowGroupElement | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void | TextFlow | ||
clearStyle(styleProp:String):void Clears the style specified by the styleProp parameter from this FlowElement object. | FlowElement | ||
deepCopy(relativeStart:int = 0, relativeEnd:int = -1):FlowElement
Makes a deep copy of this FlowElement object, including any children, copying the content between the two specified
character positions and returning the copy as a FlowElement object. | FlowElement | ||
dispatchEvent(event:Event):Boolean | TextFlow | ||
equalUserStyles(otherElement:FlowElement):Boolean Compare the userStyles of this with otherElement's userStyles. | FlowElement | ||
findChildIndexAtPosition(relativePosition:int):int
Given a relative text position, find the index of the first child FlowElement that contains the relative position. | FlowGroupElement | ||
findLeaf(relativePosition:int):FlowLeafElement
Given a relative text position, find the leaf element that contains the position. | FlowGroupElement | ||
getAbsoluteStart():int
Returns the start location of the element in the text flow as an absolute index. | FlowElement | ||
getCharAtPosition(relativePosition:int):String
Returns the character at the specified position, relative to this FlowElement object. | FlowElement | ||
getCharCodeAtPosition(relativePosition:int):int Returns the character code at the specified position, relative to this FlowElement. | FlowElement | ||
getChildAt(index:int):FlowElement
Returns the FlowElement child at the specified index. | FlowGroupElement | ||
getChildIndex(child:FlowElement):int
Searches in children for the specified FlowElement object and returns its index position. | FlowGroupElement | ||
getElementByID(idName:String):FlowElement Returns an element whose id property matches the idName parameter. | TextFlow | ||
getElementRelativeStart(ancestorElement:FlowElement):int
Returns the start of this element relative to an ancestor element. | FlowElement | ||
getElementsByStyleName(styleNameValue:String):Array Returns all elements that have styleName set to styleNameValue. | TextFlow | ||
getElementsByTypeName(typeNameValue:String):Array Returns all elements that have typeName set to typeNameValue. | TextFlow | ||
Returns the first FlowLeafElement descendant of this group. | FlowGroupElement | ||
Returns the last FlowLeafElement descendent of this group. | FlowGroupElement | ||
Returns the next FlowElement sibling in the text flow hierarchy. | FlowElement | ||
Returns the ParagraphElement object associated with this element. | FlowElement | ||
FlowElement | |||
Returns the previous FlowElement sibling in the text flow hierarchy. | FlowElement | ||
getStyle(styleProp:String):* Returns the value of the style specified by the styleProp parameter, which specifies
the style name and can include any user style name. | FlowElement | ||
getText(relativeStart:int = 0, relativeEnd:int = -1, paragraphSeparator:String = ):String [override] | FlowGroupElement | ||
Climbs the text flow hierarchy to return the root TextFlow object for the element. | FlowElement | ||
hasEventListener(type:String):Boolean | TextFlow | ||
initialized(document:Object, id:String):void Called for MXML objects after the implementing object has been created and all component properties specified on the MXML tag have been initialized. | FlowElement | ||
invalidateAllFormats():void Invalidates all formatting information for the TextFlow, forcing it to be recomputed. | TextFlow | ||
isInTable():Boolean | FlowElement | ||
nestedInTable():Boolean | TextFlow | ||
Removes the specified child FlowElement object from the group. | FlowGroupElement | ||
removeChildAt(index:uint):FlowElement
Removes the child FlowElement object at the specified index position. | FlowGroupElement | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void | TextFlow | ||
replaceChildren(beginChildIndex:int, endChildIndex:int, ... rest):void
Replaces child elements in the group with the specified new elements. | FlowGroupElement | ||
setBorderColor(color:uint):void | FlowElement | ||
setBorderWidth(width:Number):void | FlowElement | ||
setStyle(styleProp:String, newValue:*):void Sets the style specified by the styleProp parameter to the value specified by the
newValue parameter. | FlowElement | ||
shallowCopy(relativeStart:int = 0, relativeEnd:int = -1):FlowElement
Makes a copy of this FlowElement object, copying the content between two specified character positions. | FlowElement | ||
splitAtIndex(childIndex:int):FlowGroupElement
Splits this object at the position specified by the childIndex parameter. | FlowGroupElement | ||
splitAtPosition(relativePosition:int):FlowElement
Splits this FlowElement object at the position specified by the relativePosition parameter, which is
a relative position in the text for this element. | FlowElement | ||
willTrigger(type:String):Boolean | TextFlow |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when any link is clicked. | TextFlow | |||
Dispatched after every recompose. | TextFlow | |||
Dispatched by a TextFlow object each time it is damaged You can use this event to find out that the TextFlow has changed, but do not access the TextFlow itself when this event is sent out. | TextFlow | |||
Defines the value of the type property of a flowOperationBegin event object. | TextFlow | |||
Defines the value of the type property of a flowOperationComplete event object. | TextFlow | |||
Defines the value of the type property of a flowOperationEnd event object. | TextFlow | |||
Dispatched when a InlineGraphicElement is resized due to having width or height as auto or percent and the graphic has finished loading. | TextFlow | |||
Dispatched when the mouse is pressed down over any link. | TextFlow | |||
Dispatched when the mouse passes over any link. | TextFlow | |||
Dispatched when the mouse is released over any link. | TextFlow | |||
Dispatched when the mouse goes out of any link. | TextFlow | |||
Dispatched when the mouse first enters any link. | TextFlow | |||
Dispatched by a TextFlow object after text is scrolled within a controller container. | TextFlow | |||
Dispatched whenever the selection is changed. | TextFlow | |||
Dispatched by a TextFlow object each time a container has had new DisplayObjects added or updated as a result of composition. | TextFlow |
configuration | property |
configuration:IConfiguration
[read-only] Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The Configuration object for this TextFlow object. The Configuration object specifies the initial character and paragraph formats, the initial container format, and attributes for selection highlighting, links, focus, and scrolling.
If you do not specify a Configuration object, Text Layout Framework uses a default Configuration object, which
is referenced by the defaultConfiguration
property.
public function get configuration():IConfiguration
See also
defaultConfiguration | property |
public static var defaultConfiguration:Configuration
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Default configuration for all new TextFlow objects if the configuration is not specified.
See also
flowComposer | property |
flowComposer:IFlowComposer
[override] Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Manages the containers for this element.
The TextLines that are created from the element appear as children of the container. The flowComposer manages the containers, and as the text is edited it adds lines to and removes lines from the containers. The flowComposer also keeps track of some critical attributes, such as the width and height to compose to, whether scrolling is on, and so on.
The container and flowComposer
are closely related. If you reset flowComposer
,
the container is reset to the new flowComposer's container. Likewise if the container is reset,
flowComposer
is reset to the container's new flowComposer.
public function get flowComposer():IFlowComposer
public function set flowComposer(value:IFlowComposer):void
See also
formatResolver | property |
formatResolver:IFormatResolver
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
A callback function for resolving element styles. You can use this to provide styling using CSS or named styles, for example.
public function get formatResolver():IFormatResolver
public function set formatResolver(value:IFormatResolver):void
See also
generation | property |
generation:uint
[read-only] Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The generation number for this TextFlow object. The undo and redo operations use the generation number to validate that it's legal to undo or redo an operation. The generation numbers must match.
Each model change increments generation
so if the generation number changes, you know the
TextFlow model has changed.
public function get generation():uint
hostFormat | property |
hostFormat:ITextLayoutFormat
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The TextLayoutFormat object for this TextFlow object. This enables several optimizations for reusing host formats. For example;
textFlowA.hostFormat = textFlowB.hostFormat
hostFormat
.
For example, the following lines do not set the font size to 24 because
the font size is set after the TextLayoutFormat object has been assigned to hostFormat
.
format = new TextLayoutFormat() textFlow.hostFormat = format format.fontSize = 24;
public function get hostFormat():ITextLayoutFormat
public function set hostFormat(value:ITextLayoutFormat):void
See also
interactionManager | property |
interactionManager:ISelectionManager
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.
public function get interactionManager():ISelectionManager
public function set interactionManager(value:ISelectionManager):void
See also
parentElement | property |
parentElement:FlowGroupElement
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The parent element is the element that the TextFlow is nested inside (such as a TableCellElement). This property is for support of nested TextFlows to handle things like selection and editing.
public function get parentElement():FlowGroupElement
public function set parentElement(value:FlowGroupElement):void
TextFlow | () | Constructor |
public function TextFlow(config:IConfiguration = null)
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Constructor - creates a new TextFlow instance.
If you provide a config
parameter, the contents of the Configuration object are copied and
you cannot make changes. You can access configuration settings, however, through the
configuration
property. If the config
parameter is null, you can access the default
configuration settings through the defaultConfiguration
property.
The Configuration object provides a mechanism for setting configurable default attributes on a TextFlow. While you can't make changes to the Configuration object, you can override default attributes, if necessary, by setting the attributes of TextFlow and its children.
Parametersconfig:IConfiguration (default = null ) — Specifies the configuration to use for this TextFlow object. If it's null, use
TextFlow.defaultConfiguration to access configuration values.
|
See also
addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Parameters
type:String | |
listener:Function | |
useCapture:Boolean (default = false )
| |
priority:int (default = 0 )
| |
useWeakReference:Boolean (default = false )
|
dispatchEvent | () | method |
public function dispatchEvent(event:Event):Boolean
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Parameters
event:Event |
Boolean |
getBackgroundManager | () | method |
tlf_internal function getBackgroundManager():BackgroundManager
Returns
BackgroundManager |
getElementByID | () | method |
public function getElementByID(idName:String):FlowElement
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Returns an element whose id
property matches the idName
parameter. Provides
the ability to apply a style based on the id
.
For example, the following line sets the style "color" to 0xFF0000 (red), for the
element having the id
span1.
textFlow.getElementByID("span1").setStyle("color", 0xFF0000);
Note: In the following code, p.addChild(s)
removes s
from its original parent and adds it to p
, the new parent.
var s:SpanElement = new SpanElement(); var p:ParagraphElement = new ParagraphElement(); ... s = textFlow.getElementByID("span3") as SpanElement; p.addChild(s); textFlow.addChild(p);
Parameters
idName:String — The id value of the element to find.
|
FlowElement — The element whose id matches idName .
|
See also
getElementsByStyleName | () | method |
public function getElementsByStyleName(styleNameValue:String):Array
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Returns all elements that have styleName
set to styleNameValue
.
Parameters
styleNameValue:String — The name of the style for which to find elements that have it set.
|
Array — An array of the elements whose styleName value matches styleNameValue . For example,
all elements that have the style name "color".
|
See also
getElementsByTypeName | () | method |
public function getElementsByTypeName(typeNameValue:String):Array
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Returns all elements that have typeName
set to typeNameValue
.
Parameters
typeNameValue:String — The name of the style for which to find elements that have it set.
|
Array — An array of the elements whose typeName value matches typeNameValue . For example,
all elements that have the type name "foo". A typeName is the TextFlow markup tag (such as the
<p> tag for ParagraphElements).
|
See also
hasEventListener | () | method |
public function hasEventListener(type:String):Boolean
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Parameters
type:String |
Boolean |
invalidateAllFormats | () | method |
public function invalidateAllFormats():void
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Invalidates all formatting information for the TextFlow, forcing it to be recomputed. Call this method when styles have changed.
See also
nestedInTable | () | method |
public function nestedInTable():Boolean
ReturnsBoolean |
removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Parameters
type:String | |
listener:Function | |
useCapture:Boolean (default = false )
|
willTrigger | () | method |
public function willTrigger(type:String):Boolean
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Parameters
type:String |
Boolean |
click | Event |
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 |
flashx.textLayout.events.CompositionCompleteEvent
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Dispatched after every recompose.
damage | Event |
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 You can use this event to find out that the TextFlow has changed, but do not access the TextFlow itself when this event is sent out. This event is sent when TextFlow changes are partially complete, so it can be in an inconsistent state: some changes have been mad already, and other changes are still pending. Get the information you need from the event, and make required changes after control returns to your application.
flowOperationBegin | Event |
flashx.textLayout.events.FlowOperationEvent
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 |
flashx.textLayout.events.FlowOperationEvent
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 |
flashx.textLayout.events.FlowOperationEvent
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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. It can also be used to alter the selection, but cannot be used to alter the TextFlow itself.
updateComplete | Event |
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.