Package | flashx.textLayout.elements |
Class | public class TextRange |
Inheritance | TextRange Object |
Subclasses | SelectionState |
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
anchorPosition
,
and the point that is to be modified by actions, activePosition
. As block selections are
modified and extended anchorPosition
remains fixed and activePosition
is modified.
The anchor position may be placed in the text before or after the active position.
Related API Elements
Public Properties
Property | Defined By | ||
---|---|---|---|
absoluteEnd : int End of the selection, as an absolute position in the TextFlow. | TextRange | ||
absoluteStart : int Start of the selection, as an absolute position in the TextFlow. | TextRange | ||
activePosition : int Active position of the selection, as an absolute position in the TextFlow. | TextRange | ||
anchorPosition : int Anchor position of the selection, as an absolute position in the TextFlow. | TextRange | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
textFlow : flashx.textLayout.elements:TextFlow Returns the TextFlow associated with the selection. | TextRange |
Public Methods
Method | Defined By | ||
---|---|---|---|
Constructor - creates a new TextRange instance. | TextRange | ||
Indicates whether an object has a specified property defined. | Object | ||
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 | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Update the range with new anchor or active position values. | TextRange | ||
Returns the primitive value of the specified object. | Object |
Property Detail
absoluteEnd | property |
absoluteStart | property |
activePosition | property |
anchorPosition | property |
textFlow | property |
textFlow:flashx.textLayout.elements:TextFlow
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Returns the TextFlow associated with the selection.
Implementation
public function get textFlow():flashx.textLayout.elements:TextFlow
public function set textFlow(value:flashx.textLayout.elements:TextFlow):void
Constructor Detail
TextRange | () | Constructor |
public function TextRange(root:flashx.textLayout.elements:TextFlow, anchorIndex:int, activeIndex:int)
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Constructor - creates a new TextRange instance. A TextRange can be (-1,-1), indicating no range, or a pair of
values from 0 to TextFlow.textLength
.
root:flashx.textLayout.elements:TextFlow — the TextFlow associated with the selection.
| |
anchorIndex:int — the index position of the anchor in the selection. The first position in the text is position 0.
| |
activeIndex:int — the index position of the active location in the selection. The first position in the text is position 0.
|
Related API Elements
Method Detail
updateRange | () | method |
public function updateRange(newAnchorPosition:int, newActivePosition:int):Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Update the range with new anchor or active position values.
Parameters
newAnchorPosition:int — the anchor index of the selection.
| |
newActivePosition:int — the active index of the selection.
|
Boolean — true if selection is changed.
|
Mon Nov 28 2011, 06:48 AM -08:00