Package | fl.events |
Class | public class SliderEvent |
Inheritance | SliderEvent ![]() |
SliderEvent.CHANGE
: dispatched after there is a change in the position of the slider.SliderEvent.THUMB_DRAG
: dispatched when a user drags the thumb of the slider.SliderEvent.THUMB_PRESS
: dispatched when a user presses the thumb of the slider.SliderEvent.THUMB_RELEASE
: dispatched when the user releases the thumb of the slider.See also
Property | Defined by | ||
---|---|---|---|
clickTarget : String [read-only]
Gets a string that indicates whether the slider thumb or a slider track was pressed.
| SliderEvent | ||
keyCode : Number [read-only]
Gets the key code for the key that was pressed to trigger the event.
| SliderEvent | ||
triggerEvent : String [read-only]
Gets the type of device that was used to send the input.
| SliderEvent | ||
value : Number [read-only]
Gets the new value of the slider, based on its position.
| SliderEvent |
Method | Defined by | ||
---|---|---|---|
SliderEvent(type:String, value:Number, clickTarget:String, triggerEvent:String, keyCode:int = 0)
Creates a new SliderEvent object with the specified parameters.
| SliderEvent | ||
clone():Event
Creates a copy of the SliderEvent object and sets the value of each parameter to match
the original.
| SliderEvent | ||
toString():String
Returns a string that contains all the properties of the SliderEvent object.
| SliderEvent |
Constant | Defined by | ||
---|---|---|---|
CHANGE : String = "change" [static]
Defines the value of the
type property of a change event object. | SliderEvent | ||
THUMB_DRAG : String = "thumbDrag" [static]
Defines the value of the
type property of a thumbDrag event
object. | SliderEvent | ||
THUMB_PRESS : String = "thumbPress" [static]
Defines the value of the
type property of a thumbPress
event object. | SliderEvent | ||
THUMB_RELEASE : String = "thumbRelease" [static]
Defines the value of the
type property of a thumbRelease
event object. | SliderEvent |
clickTarget | property |
clickTarget:String
[read-only]
Gets a string that indicates whether the slider thumb or a slider track was pressed.
A value of SliderEventClickTarget.THUMB
indicates that the slider thumb was
pressed; a value of SliderEventClickTarget.TRACK
indicates that the slider
track was pressed.
public function get clickTarget():String
See also
keyCode | property |
keyCode:Number
[read-only]Gets the key code for the key that was pressed to trigger the event. A key code is a numeric value that identifies the key that was pressed.
Implementation public function get keyCode():Number
See also
triggerEvent | property |
triggerEvent:String
[read-only]
Gets the type of device that was used to send the input. A value of InteractionInputType.MOUSE
indicates that a mouse was the source of the input; a value of InteractionInputType.KEYBOARD
indicates that a keyboard was the source of the input.
public function get triggerEvent():String
See also
value | property |
value:Number
[read-only]Gets the new value of the slider, based on its position.
Implementation public function get value():Number
SliderEvent | () | constructor |
public function SliderEvent(type:String, value:Number, clickTarget:String, triggerEvent:String, keyCode:int = 0)
Creates a new SliderEvent object with the specified parameters.
Parameterstype:String — The event type; this value identifies the action that triggered the event.
|
|
value:Number — The new value of the slider.
|
|
clickTarget:String — Indicates whether a slider thumb or the slider track was
pressed. A value of SliderEventClickTarget.THUMB indicates that
the slider thumb was pressed; a value of SliderEventClickTarget.TRACK
indicates that the slider track was pressed.
|
|
triggerEvent:String — A String that indicates the source of the input. A value of
InteractionInputType.MOUSE indicates that the mouse was the source of input;
a value of InteractionInputType.KEYBOARD indicates that the keyboard was
the source of input.
|
|
keyCode:int (default = 0 ) — If the event was triggered by a key press, this value is the key code
that identifies that key.
|
clone | () | method |
public override function clone():Event
Creates a copy of the SliderEvent object and sets the value of each parameter to match the original.
ReturnsEvent — A copy of the current SliderEvent instance.
|
toString | () | method |
public override function toString():String
Returns a string that contains all the properties of the SliderEvent object. The string is in the following format:
[SliderEvent type=value value=value
bubbles=value cancelable=value keycode=value
triggerEvent=value clickTarget=value
]
String — A string representation of the SliderEvent object.
|
CHANGE | constant |
public static const CHANGE:String = "change"
Defines the value of the type
property of a change
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default
behavior to cancel. |
clickTarget | Identifies whether the slider track or a slider thumb was pressed. |
currentTarget | The object that is actively processing the event object with an event listener. |
keyCode | If the event was triggered by a key press, the code for the key that was pressed. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |
triggerEvent | The type of device that triggered the event. A value
of InteractionInputType.MOUSE indicates that a mouse was the source of input;
a value of InteractionInputType.KEYBOARD indicates that a keyboard was
the source of input. |
value | The value of the slider after the event. |
THUMB_DRAG | constant |
public static const THUMB_DRAG:String = "thumbDrag"
Defines the value of the type
property of a thumbDrag
event
object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default
behavior to cancel. |
clickTarget | Identifies whether the slider track or a slider thumb was pressed. |
currentTarget | The object that is actively processing the event object with an event listener. |
keyCode | If the event was triggered by a key press, the code for the key that was pressed. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |
triggerEvent | The type of device that triggered the event. A value
of InteractionInputType.MOUSE indicates that a mouse was the source of the
input; a value of InteractionInputType.KEYBOARD indicates that a keyboard
was the source of the input. |
value | The value of the slider after the event. |
See also
THUMB_PRESS | constant |
public static const THUMB_PRESS:String = "thumbPress"
Defines the value of the type
property of a thumbPress
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default
behavior to cancel. |
clickTarget | Identifies whether the slider track or a slider thumb was pressed. |
currentTarget | The object that is actively processing the event object with an event listener. |
keyCode | If the event was triggered by a key press, the code for the key that was pressed. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |
triggerEvent | The type of device that triggered the event. A value
of InteractionInputType.MOUSE indicates that a mouse was the source of the
input; a value of InteractionInputType.KEYBOARD indicates that a keyboard
was the source of the input. |
value | The value of the slider after the event. |
See also
THUMB_RELEASE | constant |
public static const THUMB_RELEASE:String = "thumbRelease"
Defines the value of the type
property of a thumbRelease
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default
behavior to cancel. |
clickTarget | Identifies whether the slider track or a slider thumb was pressed. |
currentTarget | The object that is actively processing the event object with an event listener. |
keyCode | If the event was triggered by a key press, the code for the key that was pressed. |
target | The object that dispatched the event. The target is
not always the object listening for the event. Use the currentTarget
property to access the object that is listening for the event. |
triggerEvent | The type of device that triggered the event. A value
of InteractionInputType.MOUSE indicates that a mouse was the source of the
input; a value of InteractionInputType.KEYBOARD indicates that a keyboard
was the source of the input. |
value | The value of the slider after the event. |
See also