selectionState:SelectionState
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
An object of type SelectionState that represents the selected range associated with this SelectionEvent.
You can use this property, along with the ElementRange class, to create an ElementRange
instance that represents the range of selected text.
You can use the following line of code to create an instance of the
ElementRange class that represents the range of selected text
(the ev
variable represents the event object, and the conditional operator
is used to guard against a null
value for the selectionState
property):
// Find selected element range
var range:ElementRange = ev.selectionState ?
ElementRange.createElementRange(ev.selectionState.textFlow,
ev.selectionState.absoluteStart, ev.selectionState.absoluteEnd) : null;
Implementation public function get selectionState():SelectionState
public function set selectionState(value:SelectionState):void
See also
public function SelectionEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, selectionState:SelectionState = null)
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
Creates an event object that contains information about a flow operation.
Parameters | type:String — The type of the event. Event listeners can access this information through the
inherited type property. There is only one type of SelectionEvent:
SelectionEvent.SELECTION_CHANGE ;
|
|
| bubbles:Boolean (default = false ) — Indicates whether an event is a bubbling event.This event does not bubble.
|
|
| cancelable:Boolean (default = false ) — Indicates whether the behavior associated with the event can be prevented.
|
|
| selectionState:SelectionState (default = null ) — An object of type ElementRange that describes the range of text selected.
|
public static const SELECTION_CHANGE:String = selectionChange
Language Version : | ActionScript 3.0 |
Runtime Versions : | Flash Player 10, AIR 1.5 |
The SelectionEvent.SELECTION_CHANGE constant defines the value of the
type property of the event object for a selection event.