Package | flashx.textLayout.elements |
Class | public class FlowElement |
Inheritance | FlowElement Object |
Implements | ITextLayoutFormat |
Subclasses | FlowGroupElement, FlowLeafElement |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The root of a composable FlowElement tree is always a TextFlow object. Leaf elements of the tree are always subclasses of the FlowLeafElement class. All leaves arranged in a composable TextFlow have a ParagraphElement ancestor.
You cannot create a FlowElement object directly. Invoking new FlowElement()
throws an error
exception.
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 | ||
breakOpportunity : *
TextLayoutFormat:
Controls where lines are allowed to break when breaking wrapping text into multiple lines. | FlowElement | ||
cffHinting : *
TextLayoutFormat:
The type of CFF hinting used for this text. | FlowElement | ||
color : *
TextLayoutFormat:
Color of the text. | 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 : flashx.textLayout.formats:ITextLayoutFormat [read-only]
Returns the computed format attributes that are in effect for this element. | FlowElement | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
coreStyles : Object [read-only] Returns the core styles on a FlowElement instance. | FlowElement | ||
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 | ||
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 : flashx.textLayout.formats:ITextLayoutFormat TextLayoutFormat properties applied directly to this element. | FlowElement | ||
id : String
Assigns an identifying name to the element, making it possible to set a style for the element
by referencing the id. | FlowElement | ||
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 : * Defines the formatting attributes used for links in active state, when the mouse is down on a link. | FlowElement | ||
linkHoverFormat : * Defines the formatting attributes used for links in hover state, when the mouse is within the bounds (rolling over) a link. | FlowElement | ||
linkNormalFormat : * Defines the formatting attributes used for links in normal state. | FlowElement | ||
locale : *
TextLayoutFormat:
The locale of the text. | FlowElement | ||
paddingBottom : *
TextLayoutFormat:
Botttom inset in pixels (adopts default value if undefined during cascade). | FlowElement | ||
paddingLeft : *
TextLayoutFormat:
Left inset in pixels (adopts default value if undefined during cascade). | FlowElement | ||
paddingRight : *
TextLayoutFormat:
Right inset in pixels (adopts default value if undefined during cascade). | FlowElement | ||
paddingTop : *
TextLayoutFormat:
Top inset in pixels (adopts default value if undefined during cascade). | 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 | ||
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 | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
renderingMode : *
TextLayoutFormat:
The rendering mode used for this text. | FlowElement | ||
styleName : String
Assigns an identifying class to the element, making it possible to set a style for the element
by referencing the styleName. | 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 | ||
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 |
Method | Defined By | ||
---|---|---|---|
Base class - invoking new FlowElement() throws an error exception. | FlowElement | ||
Clears the style specified by the styleProp parameter from this FlowElement object. | 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 | ||
Compare the userStyles of this with otherElement's userStyles. | FlowElement | ||
Returns the start location of the element in the text flow as an absolute index. | FlowElement | ||
Returns the character at the specified position, relative to this FlowElement object. | FlowElement | ||
Returns the character code at the specified position, relative to this FlowElement. | FlowElement | ||
Returns the start of this element relative to an ancestor element. | FlowElement | ||
Returns the next FlowElement sibling in the text flow hierarchy. | FlowElement | ||
Returns the ParagraphElement object associated with this element. | FlowElement | ||
Returns the previous FlowElement sibling in the text flow hierarchy. | FlowElement | ||
Returns the value of the style specified by the styleProp parameter, which specifies
the style name and can include any user style name. | FlowElement | ||
Gets the specified range of text from a flow element. | FlowElement | ||
Climbs the text flow hierarchy to return the root TextFlow object for the element. | FlowElement | ||
Indicates whether an object has a specified property defined. | Object | ||
Called for MXML objects after the implementing object has been created and all component properties specified on the MXML tag have been initialized. | FlowElement | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Sets the style specified by the styleProp parameter to the value specified by the
newValue parameter. | FlowElement | ||
Makes a copy of this FlowElement object, copying the content between two specified character positions. | 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 | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object |
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.
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
|
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
computedFormat | property |
computedFormat:flashx.textLayout.formats:ITextLayoutFormat
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the computed format attributes that are in effect for this element. Takes into account the inheritance of attributes from parent elements.
Implementation
public function get computedFormat():flashx.textLayout.formats:ITextLayoutFormat
See also
coreStyles | property |
coreStyles:Object
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the core styles on a FlowElement instance. Returns a copy of the core styles.
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.
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.
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:
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.
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.
Legal values as a string are flashx.textLayout.formats.BaselineOffset.AUTO, flashx.textLayout.formats.BaselineOffset.ASCENT, flashx.textLayout.formats.BaselineOffset.LINE_HEIGHT, flashx.textLayout.formats.FormatValue.INHERIT and numbers from 0 to 1000.
Default value is undefined indicating not set.
If undefined during the cascade this property will inherit its value from an ancestor. If no ancestor has set this property, it will have a value of AUTO.
Implementation
public function get firstBaselineOffset():*
public function set firstBaselineOffset(value:any):void
Throws
RangeError — when set value is not within range for this property
|
See also
fontFamily | property |
fontFamily:*
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
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
TextLayoutFormat properties applied directly to this element.
Each element may have properties applied to it as part of its format. Properties applied to this element override properties inherited from the parent. Properties applied to this element will in turn be inherited by element's children if they are not overridden on the child. If no properties are applied to the element, this will be null.
Implementation
public function get format():flashx.textLayout.formats:ITextLayoutFormat
public function set format(value:flashx.textLayout.formats:ITextLayoutFormat):void
See also
id | property |
id:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Assigns an identifying name to the element, making it possible to set a style for the element
by referencing the id
. For example, the following line sets the color for
a SpanElement object that has an id of span1:
textFlow.getElementByID("span1").setStyle("color", 0xFF0000);
Implementation
public function get id():String
public function set id(value:String):void
See also
impliedElement | property |
impliedElement:Boolean
Implementation
tlf_internal function get impliedElement():Boolean
tlf_internal function set impliedElement(value:Boolean):void
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.
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:
Leading Direction:
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.
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%.
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
|
linkActiveFormat | property |
linkActiveFormat:*
Defines the formatting attributes used for links in active state, when the mouse is down on a link. This value will cascade down the hierarchy and apply to any links that are descendants. Equivalent to setStyle(linkActiveFormat,value). Expects a dictionary of properties. Converts an array of objects with key and value as members to a dictionary.
Implementation
public function get linkActiveFormat():*
public function set linkActiveFormat(value:any):void
linkHoverFormat | property |
linkHoverFormat:*
Defines the formatting attributes used for links in hover state, when the mouse is within the bounds (rolling over) a link. This value will cascade down the hierarchy and apply to any links that are descendants. Equivalent to setStyle(linkHoverFormat,value). Expects a dictionary of properties. Converts an array of objects with key and value as members to a dictionary.
Implementation
public function get linkHoverFormat():*
public function set linkHoverFormat(value:any):void
linkNormalFormat | property |
linkNormalFormat:*
Defines the formatting attributes used for links in normal state. This value will cascade down the hierarchy and apply to any links that are descendants. Equivalent to setStyle(linkNormalFormat,value). Expects a dictionary of properties. Converts an array of objects with key and value as members to a dictionary.
Implementation
public function get linkNormalFormat():*
public function set linkNormalFormat(value:any):void
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
|
parent | property |
parent:FlowGroupElement
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the parent of this FlowElement object. Every FlowElement has at most one parent.
Implementation
public function get parent():FlowGroupElement
parentRelativeEnd | property |
parentRelativeEnd:int
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the relative end of this FlowElement object in the parent. If the parent is null this is always equal to textLength
. If
the parent is not null, the value is the sum of the text lengths of this and all previous siblings, which is effectively
the first character in the next FlowElement object.
Implementation
public function get parentRelativeEnd():int
See also
parentRelativeStart | property |
parentRelativeStart:int
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the relative start of this FlowElement object in the parent. If parent is null, this value is always zero. If parent is not null, the value is the sum of the text lengths of all previous siblings.
Implementation
public function get parentRelativeStart():int
See also
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
styleName | property |
styleName:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Assigns an identifying class to the element, making it possible to set a style for the element
by referencing the styleName
.
Implementation
public function get styleName():String
public function set styleName(value:String):void
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
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 length of text owned by this FlowElement object and its children. If an element has no text, the
value of textLength
is usually zero.
ParagraphElement objects have a final span with a paragraph terminator character for the last
SpanElement object.The paragraph terminator is included in the value of the textLength
of that
SpanElement object and all its parents. It is not included in text
property of the SpanElement
object.
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
tracking | property |
tracking:Object
[write-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Sets the tracking and is synonymous with the trackingRight
property. Specified as a number of
pixels or a percent of fontSize
.
Implementation
public function set tracking(value:Object):void
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:
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 |
Allows you to read and write user styles on a FlowElement object. Note that reading this property makes a copy of the user-styles dictionary.
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
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
FlowElement | () | Constructor |
public function FlowElement()
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Base class - invoking new FlowElement()
throws an error exception.
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 the styleProp
parameter from this FlowElement object. Sets
the value to undefined
.
Parameters
styleProp:String — The name of the style to clear.
|
See also
Example ( How to use this example )
clearStyle()
sets the value of a style to undefined
but that an inherited value can still be applied to the style.
package flashx.textLayout.elements.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; public class FlowElement_clearStyleExample extends Sprite{ public function FlowElement_clearStyleExample() { // create a container and a TextFlow object var container:Sprite = new Sprite(); this.addChild(container); var textFlow:TextFlow = new TextFlow(); // create a paragraph and set lineThrough style to true var paragraph:ParagraphElement = new ParagraphElement(); paragraph.setStyle("color", 204); // create two spans of text var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); var span3:SpanElement = new SpanElement(); span1.text = "After calling clearStyle(), the value of color for span1 is: "; span2.text = " but the value of span1.getStyle() for color is "; span3.text = " because getStyle() returns the inherited value that's applied to the style."; span1.clearStyle("color"); // undefined span1.text += span1.color; paragraph.addChild(span1); paragraph.addChild(span2); span2.text += span1.getStyle("color"); //204 paragraph.addChild(span3); textFlow.addChild(paragraph); // add controller, then update controller to display text var firstController:ContainerController = new ContainerController(container, 200, 200 ); textFlow.flowComposer.addController(firstController); textFlow.flowComposer.updateAllControllers(); } } }
deepCopy | () | method |
public function deepCopy(relativeStart:int = 0, relativeEnd:int = -1):FlowElement
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
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.
With no arguments, deepCopy()
defaults to copying the entire element.
Parameters
relativeStart:int (default = 0 ) — relative text position of the first character to copy. First position is 0.
| |
relativeEnd:int (default = -1 ) — relative text position of the last character to copy. A value of -1 indicates copy to end.
|
FlowElement — the object created by the deep copy operation.
|
See also
Example ( How to use this example )
package flashx.textLayout.elements.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; public class FlowElement_deepCopyExample extends Sprite{ public function FlowElement_deepCopyExample() { // create a container and add it to the stage var container:Sprite = new Sprite(); this.stage.addChild(container); // create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); // add text to the spans and spans to the paragraph span1.text = "Hello, "; span2.text = "World!"; p.fontSize = 48; p.addChild(span1); p.addChild(span2); // make a deep copy of paragraph p, starting at relative offset 3; copy to end var p2:ParagraphElement = p.deepCopy(3, -1) as ParagraphElement; // add copied paragraph (p2) to textflow; add composer and controller // and update controller to display text textFlow.addChild(p2); var controller:ContainerController = new ContainerController(container, 200, 200 ); textFlow.flowComposer.addController(controller); textFlow.flowComposer.updateAllControllers(); // 'lo, World!' } } }
doComputeTextLayoutFormat | () | method |
tlf_internal function doComputeTextLayoutFormat():flashx.textLayout.formats:TextLayoutFormatValueHolder
Returnsflashx.textLayout.formats:TextLayoutFormatValueHolder |
equalUserStyles | () | method |
public function equalUserStyles(otherElement:FlowElement):Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Compare the userStyles of this with otherElement's userStyles.
Parameters
otherElement:FlowElement — the FlowElement object with which to compare user styles
|
Boolean — true if the user styles are equal; false otherwise.
|
See also
getAbsoluteStart | () | method |
public function getAbsoluteStart():int
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the start location of the element in the text flow as an absolute index. The first character in the flow is position 0.
Returnsint — The index of the start of the element from the start of the TextFlow object.
|
See also
Example ( How to use this example )
span2.getAbsoluteStart()
to obtain the starting position
of span2.
package flashx.textLayout.elements.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; public class FlowElement_getAbsoluteStartExample extends Sprite { public function FlowElement_getAbsoluteStartExample() { // create a container and add it to the stage var container:Sprite = new Sprite(); this.stage.addChild(container); // create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); // add text to the spans, spans to the paragraph, and paragraph to the text flow span1.text = "The start of span2 "; span2.text = "in this paragraph is at index: "; p.fontSize = 20; p.addChild(span1); p.addChild(span2); textFlow.addChild(p); // find the starting position of span2 and update controller to display text span2.text += span2.getAbsoluteStart(); // 19 var controller:ContainerController = new ContainerController(container, 200, 200 ); textFlow.flowComposer.addController(controller); textFlow.flowComposer.updateAllControllers(); } } }
getCharAtPosition | () | method |
public function getCharAtPosition(relativePosition:int):String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the character at the specified position, relative to this FlowElement object. The first character is at relative position 0.
Parameters
relativePosition:int — The relative position of the character in this FlowElement object.
|
String — String containing the character.
|
See also
Example ( How to use this example )
package flashx.textLayout.elements.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; public class FlowElement_getCharAtPositionExample extends Sprite { public function FlowElement_getCharAtPositionExample() { // create a container and a controller for it and add it to the stage var container:Sprite = new Sprite(); var controller:ContainerController = new ContainerController( container, 400, 200 ); this.stage.addChild( container ); //create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); // add text to the two spans, calling getCharAtPosition() to return the // character at relative position 27 in the first span span1.text = "The character at offset 27 in this paragraph is: "; span2.text = span1.getCharAtPosition(27) + "."; // i // add spans to paragraph p p.addChild(span1); p.addChild(span2); // add paragraph p to text flow and update controller to display it textFlow.addChild(p); textFlow.flowComposer.addController( controller ); textFlow.flowComposer.updateAllControllers(); } } }
getCharCodeAtPosition | () | method |
public function getCharCodeAtPosition(relativePosition:int):int
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the character code at the specified position, relative to this FlowElement. The first character is at relative position 0.
Parameters
relativePosition:int — The relative position of the character in this FlowElement object.
|
int — the Unicode value for the character at the specified position.
|
See also
Example ( How to use this example )
package flashx.textLayout.elements.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; public class FlowElement_getCharCodeAtPositionExample extends Sprite { public function FlowElement_getCharCodeAtPositionExample() { // create a container and a controller for it and add it to the stage var container:Sprite = new Sprite(); var controller:ContainerController = new ContainerController( container, 400, 200 ); this.stage.addChild( container ); //create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); // add text to spans; use getCharCodeAtPosition() to add char code from pos. 16 // of span1 span1.text = "The character code at offset 16 in this paragraph is: "; span2.text = String(span1.getCharCodeAtPosition(16)) + "."; // 100 (d) // add spans to paragraph p p.addChild(span1); p.addChild(span2); // add paragraph p to text flow and update controller to display it textFlow.addChild(p); textFlow.flowComposer.addController( controller ); textFlow.flowComposer.updateAllControllers(); } } }
getElementRelativeStart | () | method |
public function getElementRelativeStart(ancestorElement:FlowElement):int
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the start of this element relative to an ancestor element. Assumes that the
ancestor element is in the parent chain. If the ancestor element is the parent, this is the
same as this.parentRelativeStart
. If the ancestor element is the grandparent, this is the same as
parentRelativeStart
plus parent.parentRelativeStart
and so on.
Parameters
ancestorElement:FlowElement — The element from which you want to find the relative start of this element.
|
int — the offset of this element.
|
See also
Example ( How to use this example )
getElementRelativeStart()
to determine the
relative starting position of a link within a paragraph.
package flashx.textLayout.elements.examples { import flash.display.Sprite; import flashx.textLayout.container.ContainerController; import flashx.textLayout.elements.LinkElement; import flashx.textLayout.elements.ParagraphElement; import flashx.textLayout.elements.SpanElement; import flashx.textLayout.elements.TextFlow; public class FlowElement_getElementRelativeStartExample extends Sprite { public function FlowElement_getElementRelativeStartExample() { // create a container and a controller for it and add it to the stage var container:Sprite = new Sprite(); var controller:ContainerController = new ContainerController( container, 400, 200 ); this.stage.addChild( container ); //create TextFlow, ParagraphElement, SpanElement, and LinkElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var link:LinkElement = new LinkElement(); var span2:SpanElement = new SpanElement(); var span3:SpanElement = new SpanElement(); // add text to first two spans span1.text = "The relative start of the link SpanElement ("; span2.text = ") in this paragraph is at position "; // create link span, add text and corresponding URL and add to link var linkSpan:SpanElement = new SpanElement(); linkSpan.text = "Adobe's website"; link.href = "http://www.adobe.com"; link.addChild(linkSpan); // add first span, link, and second span to paragraph p p.addChild(span1); p.addChild(link); p.addChild(span2); // call getElementRelativeStart() to get start of linkSpan and add to span 3 span3.text = String(linkSpan.getElementRelativeStart(p)) + "."; // 44. p.addChild(span3); // add paragraph p to text flow and update controller to display it textFlow.addChild(p); textFlow.flowComposer.addController( controller ); textFlow.flowComposer.updateAllControllers(); } } }
getNextSibling | () | method |
public function getNextSibling():FlowElement
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the next FlowElement sibling in the text flow hierarchy.
ReturnsFlowElement — the next FlowElement object of the same type, or null if there is no sibling.
|
See also
Example ( How to use this example )
span2.getNextSibling()
to red.
package flashx.textLayout.elements.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; public class FlowElement_getNextSiblingExample extends Sprite { public function FlowElement_getNextSiblingExample() { // create a container and add it to the stage var container:Sprite = new Sprite(); this.stage.addChild(container); // create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); var nextSpanElement:SpanElement = new SpanElement(); // add text, set font size, add spans to paragraph, add paragraph to text flow span1.text = "Hello, "; span2.text = "World!"; p.fontSize = 48; p.addChild(span1); p.addChild(span2); textFlow.addChild(p); // get next SpanElement for span1 and set its color to red; display text nextSpanElement = SpanElement(span1.getNextSibling()); nextSpanElement.color = 0xCC0000; textFlow.flowComposer.addController(new ContainerController(this,stage.stageWidth,stage.stageHeight)); textFlow.flowComposer.updateAllControllers(); } } }
getParagraph | () | method |
public function getParagraph():ParagraphElement
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the ParagraphElement object associated with this element. It looks up the text flow hierarchy and returns the first ParagraphElement object.
ReturnsParagraphElement — the ParagraphElement object that's associated with this FlowElement object.
|
See also
Example ( How to use this example )
getParagraph()
to return the ParagraphElement
for a LinkElement object.
package flashx.textLayout.elements.examples { import flash.display.Sprite; import flashx.textLayout.container.ContainerController; import flashx.textLayout.elements.ParagraphElement; import flashx.textLayout.elements.LinkElement; import flashx.textLayout.elements.SpanElement; import flashx.textLayout.elements.TextFlow; public class FlowElement_getParagraphExample extends Sprite { public function FlowElement_getParagraphExample() { // create a container and a controller for it and add to the stage var container:Sprite = new Sprite(); var controller:ContainerController = new ContainerController( container, 400, 200 ); this.stage.addChild( container ); //create TextFlow, ParagraphElement, SpanElement, and LinkElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var link:LinkElement = new LinkElement(); var span2:SpanElement = new SpanElement(); // add text to first span span1.text = "Text that includes a link to "; // create link span, add text and corresponding URL and add to link var linkSpan:SpanElement = new SpanElement(); linkSpan.text = "Adobe's website"; link.href = "http://www.adobe.com"; link.addChild(linkSpan); // add text to second span and add spans and link to paragraph p span2.text = ". Notice that paragraph p2 is identical to paragraph p."; p.addChild(span1); p.addChild(link); p.addChild(span2); // call getParagraph() to retrieve paragaph for LinkElement var p2:ParagraphElement = link.getParagraph(); // add paragraph p2 to the text flow and display it textFlow.addChild(p2); textFlow.flowComposer.addController( controller ); textFlow.flowComposer.updateAllControllers(); } } }
getPreviousSibling | () | method |
public function getPreviousSibling():FlowElement
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the previous FlowElement sibling in the text flow hierarchy.
ReturnsFlowElement — the previous FlowElement object of the same type, or null if there is no previous sibling.
|
See also
Example ( How to use this example )
span2.getPreviousSibling()
to red.
package flashx.textLayout.elements.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; public class FlowElement_getPreviousSiblingExample extends Sprite { public function FlowElement_getPreviousSiblingExample() { // create a container and add it to the stage var container:Sprite = new Sprite(); this.stage.addChild(container); // create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); var prevSpanElement:SpanElement = new SpanElement(); // add text, set font size, add spans to paragraph, add paragraph to text flow span1.text = "Hello, "; span2.text = "World!"; p.fontSize = 48; p.addChild(span1); p.addChild(span2); textFlow.addChild(p); // get previous SpanElement for span2 and set its color to red; display text prevSpanElement = SpanElement(span2.getPreviousSibling()); prevSpanElement.color = 0xCC0000; textFlow.flowComposer.addController(new ContainerController(this,400,200)); textFlow.flowComposer.updateAllControllers(); } } }
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, which specifies
the style name and can include any user style name. Accesses an existing span, paragraph, text flow,
or container style. Searches the parent tree if the style's value is undefined
on a
particular element.
Parameters
styleProp:String — The name of the style whose value is to be retrieved.
|
* — The value of the specified style. The type varies depending on the type of the style being
accessed. Returns undefined if the style is not set.
|
See also
Example ( How to use this example )
getStyle()
to determine whether the lineThrough
style
is applied to a span.
package flashx.textLayout.elements.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; public class FlowElement_getStyleExample extends Sprite { public function FlowElement_getStyleExample() { // create a container and a TextFlow object var container:Sprite = new Sprite(); this.stage.addChild(container); var textFlow:TextFlow = new TextFlow(); // create a paragraph and set lineThrough style to true var paragraph:ParagraphElement = new ParagraphElement(); paragraph.setStyle("lineThrough", true); // create two spans of text var p1Span1:SpanElement = new SpanElement(); var p1Span2:SpanElement = new SpanElement(); p1Span1.text = "It was a dark and stormy night. "; p1Span2.text = "The quick red fox jumped over the lazy brown dog."; paragraph.addChild(p1Span1); paragraph.addChild(p1Span2); // call getStyle() for 1st span to see if lineThrough is on if(p1Span1.getStyle("lineThrough") == true) p1Span1.setStyle("lineThrough", false) // if so, turn it off for this span textFlow.addChild(paragraph); // add composer and controller, then update controller to display text var controller:ContainerController = new ContainerController(container, 200, 200 ); textFlow.flowComposer.addController(controller); textFlow.flowComposer.updateAllControllers(); } } }
getText | () | method |
public function getText(relativeStart:int = 0, relativeEnd:int = -1, paragraphSeparator:String = " "):String
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Gets the specified range of text from a flow element.
Parameters
relativeStart:int (default = 0 ) — The starting position of the range of text to be retrieved, relative to the start of the FlowElement
| |
relativeEnd:int (default = -1 ) — The ending position of the range of text to be retrieved, relative to the start of the FlowElement, -1 for up to the end of the element
| |
paragraphSeparator:String (default = " ") — character to put between paragraphs
|
String — The requested text.
|
getTextFlow | () | method |
public function getTextFlow():flashx.textLayout.elements:TextFlow
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Climbs the text flow hierarchy to return the root TextFlow object for the element.
Returnsflashx.textLayout.elements:TextFlow — The root TextFlow object for this FlowElement object.
|
See also
Example ( How to use this example )
getTextFlow()
with a LinkElement object to
return its root TextFlow.
package flashx.textLayout.elements.examples { import flash.display.Sprite; import flashx.textLayout.container.ContainerController; import flashx.textLayout.elements.ParagraphElement; import flashx.textLayout.elements.LinkElement; import flashx.textLayout.elements.SpanElement; import flashx.textLayout.elements.TextFlow; public class FlowElement_getTextFlowExample extends Sprite { public function FlowElement_getTextFlowExample() { // create a container and a controller for it and add to the stage var container:Sprite = new Sprite(); var controller:ContainerController = new ContainerController(container, 400, 200); this.stage.addChild( container ); //create TextFlow, ParagraphElement, SpanElement, and LinkElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var link:LinkElement = new LinkElement(); var span2:SpanElement = new SpanElement(); // add text to first span span1.text = "Text that includes a link to "; // create link span, add text and corresponding URL and add to link var linkSpan:SpanElement = new SpanElement(); linkSpan.text = "Adobe's website"; link.href = "http://www.adobe.com"; link.addChild(linkSpan); // add text to second span, add spans and link to paragraph p, and // add paragraph p to textFlow span2.text = ". Notice that textFlow2 is identical to textFlow."; p.addChild(span1); p.addChild(link); p.addChild(span2); textFlow.addChild(p); // use getTextFlow() with LinkElement to return its TextFlow; update controller // and display it var textFlow2:TextFlow = link.getTextFlow(); textFlow2.flowComposer.addController( controller ); textFlow2.flowComposer.updateAllControllers(); } } }
initialized | () | method |
public function 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.
Parameters
document:Object — The MXML document that created the object.
| |
id:String — The identifier used by document to refer to this object.
|
setStyle | () | method |
public function setStyle(styleProp:String, newValue:*):void
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Sets the style specified by the styleProp
parameter to the value specified by the
newValue
parameter. You can set a span, paragraph, text flow, or container style, including
any user name-value pair.
Note: If you assign a custom style, Text Layout Framework can import and export it but compiled MXML cannot support it.
Parameters
styleProp:String — The name of the style to set.
| |
newValue:* — The value to which to set the style.
|
See also
Example ( How to use this example )
setStyle()
to set the color on a span and to set the
font style for the text flow to italic.
package flashx.textLayout.elements.examples { import flash.display.Sprite; import flash.text.engine.FontPosture; import flashx.textLayout.container.ContainerController; import flashx.textLayout.elements.ParagraphElement; import flashx.textLayout.elements.SpanElement; import flashx.textLayout.elements.TextFlow; public class FlowElement_setStyleExample extends Sprite { public function FlowElement_setStyleExample() { // create a container and a controller for it and add it to the stage var container:Sprite = new Sprite(); var controller:ContainerController = new ContainerController( container, 400, 200 ); this.stage.addChild( container ); // create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); // add text to the spans span1.text = "Hello, "; span2.text = "World!"; // set the color style for span2 and add spans to paragraph p span2.setStyle("color", 0xCC0000); p.addChild(span1); p.addChild(span2); // add paragraph to text flow, set fontStyle for the text flow to italic, // and update controller to display the paragraph textFlow.addChild(p); textFlow.setStyle("fontStyle", FontPosture.ITALIC); textFlow.flowComposer.addController( controller ); textFlow.flowComposer.updateAllControllers(); } } }
shallowCopy | () | method |
public function shallowCopy(relativeStart:int = 0, relativeEnd:int = -1):FlowElement
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Makes a copy of this FlowElement object, copying the content between two specified character positions.
It returns the copy as a new FlowElement object. Unlike deepCopy()
, shallowCopy()
does
not copy any of the children of this FlowElement object.
With no arguments, shallowCopy()
defaults to copying all of the content.
Parameters
relativeStart:int (default = 0 ) — The relative text position of the first character to copy. First position is 0.
| |
relativeEnd:int (default = -1 ) — The relative text position of the last character to copy. A value of -1 indicates copy to end.
|
FlowElement — the object created by the copy operation.
|
See also
Example ( How to use this example )
package flashx.textLayout.elements.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; public class FlowElement_shallowCopyExample extends Sprite { public function FlowElement_shallowCopyExample() { // create a container and add it to the stage var container:Sprite = new Sprite(); this.stage.addChild(container); // create TextFlow, ParagraphElement, and SpanElement objects var textFlow:TextFlow = new TextFlow(); var p:ParagraphElement = new ParagraphElement(); var span1:SpanElement = new SpanElement(); var span2:SpanElement = new SpanElement(); var span3:SpanElement = new SpanElement(); // add text to the spans, spans to the paragraph span1.text = "paragraph2 has "; span3.text = " children, so it would display nothing." p.fontSize = 20; p.addChild(span1); p.addChild(span2); p.addChild(span3); // create paragraph p2 as a shallow copy of paragraph p var p2:ParagraphElement = p.shallowCopy(3, -1) as ParagraphElement; // add the number of children that p2 has to span2 for paragraph p span2.text += p2.numChildren; // 0 // add paragraph p to textFlow and update controller to display it textFlow.addChild(p); var controller:ContainerController = new ContainerController(container, 200, 200 ); textFlow.flowComposer.addController(controller); textFlow.flowComposer.updateAllControllers(); } } }
splitAtPosition | () | method |
public function splitAtPosition(relativePosition:int):FlowElement
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Splits this FlowElement object at the position specified by the relativePosition
parameter, which is
a relative position in the text for this element. This method splits only SpanElement and FlowGroupElement
objects.
Parameters
relativePosition:int — the position at which to split the content of the original object, with the first position being 0.
|
FlowElement — the new object, which contains the content of the original object, starting at the specified position.
|
Throws
RangeError — if relativePosition is greater than textLength , or less than 0.
|
Thu May 20 2010, 02:19 AM -07:00