Package | com.ghostwire.ui.controls |
Class | public class uiSlider |
Inheritance | uiSlider ![]() ![]() |
Subclasses | uiVSlider |
uiSlider
component allows the user to select a value within a range by sliding a thumb
along a horizontal track.
You cannot change the orientation of a uiSlider
instance - it is always horizontal. If
you need a vertical slider, use the uiVSlider
class.
The value
of a uiSlider
moves from lower to higher values as the thumb
moves from left-to-right (ie the minimum
is at the left, maximum
is at the
right). You may set the inverted
property to true
if you wish to reverse
the positions of the minimum
and maximum
values.
"padding" Property
Always 0
- attempting to set this property will throw an error.
"range" Property
You need to access the values represented by the component via the range
property.
For example, range.value
, range.minimum
, range.maximum
, etc.
To modify the minimum
and maximum
parameters, use the
range.resize(minimum,maximum)
method.
"skin" Property
The default value is "Slider"
and the asset(s) used are:
Slider.png SliderThumb.png
Key Navigation
While the component has focus, the user may use the END
key to move the thumb to the
range.maximum
position and the HOME
key to the range.minimum
position. The arrow keys can also be used to increment/decrement the value. Holding down the
SHIFT
key uses the range.page
value for increment/decrement.
~ This class is available in Aspire UI Components Lite Edition ~
See also
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : uiComponent
Indicates the
uiComponent instance that contains this instance. | uiComponent | |
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
| uiComponent | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | height : Number
Indicates the current
height of the component. | uiComponent | |
inverted : Boolean
Indicates whether the positions of the
maximum and minimum values are
reversed. | uiSlider | ||
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : Object
Indicates the thickness of the interior space from the edge of the component to the content area,
which is where child components, if any, are contained.
| uiComponent | |
range : uiRange
[read-only]
Indicates the
uiRange object used to determine the bounds of this slider. | uiSlider | ||
repeatDelay : uint = 500
Indicates the number of milliseconds to wait after the slider track is first pressed down before
the thumb is automatically moved repeatedly over time towards the pressed location.
| uiSlider | ||
repeatInterval : uint = 35
Indicates how often the thumb movement will repeat while the track is being pressed down.
| uiSlider | ||
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
![]() | textStyle : String
Indicates the style to use for
uiText instances contained in this component. | uiComponent | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
updateDelay : int
Indicates the time in milliseconds that must pass where no slider thumb motion occurs before the
value property is updated. | uiSlider | ||
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent |
Method | Defined by | ||
---|---|---|---|
Constructor - creates a new
uiSlider instance. | uiSlider | ||
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its
tabEnabled property set to true , otherwise this method will fail
silently. | uiComponent | |
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
| uiComponent | |
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the range.value has changed. | uiSlider | |||
![]() |
Dispatched when the component's visible property is changed from true to
false via calling the setVisible() method. | uiComponent | ||
![]() |
Dispatched when the component's position within its parent container has changed via calling the
move() method. | uiComponent | ||
![]() |
Dispatched when the component's size has changed via calling the setSize() method. | uiComponent | ||
![]() |
Dispatched when the component's visible property is changed from false to
true via calling the setVisible() method. | uiComponent |
inverted | property |
public var inverted:Boolean
Indicates whether the positions of the maximum
and minimum
values are
reversed. By default, the value
moves from lower to higher values as the thumb moves
from left-to-right (or top-to-bottom in the case of a uiVSlider
). The reverse is true
if the inverted
property is set to true
.
range | property |
range:uiRange
[read-only]
Indicates the uiRange
object used to determine the bounds of this slider.
This property is read-only. To modify the minimum
and maximum
parameters of this component, use the resize(min,max)
method of the uiRange
object. For example, range.resize(16,60). Likewise, you must set the
value
via range.value
.
public function get range():uiRange
See also
repeatDelay | property |
public var repeatDelay:uint = 500
Indicates the number of milliseconds to wait after the slider track is first pressed down before
the thumb is automatically moved repeatedly over time towards the pressed location. If the user
releases the mouse or move the mouse outside the component before this timeout, the movement is
canceled. The speed of the movement is determined by the repeatInterval
property.
The default value is 500
.
repeatInterval | property |
public var repeatInterval:uint = 35
Indicates how often the thumb movement will repeat while the track is being pressed down. This property is in milliseconds and represents the interval in between thumb movements. Therefore, the lower the value, the faster the movement.
The default value is 35
.
updateDelay | property |
public var updateDelay:int
Indicates the time in milliseconds that must pass where no slider thumb motion occurs before the
value
property is updated. By default, this property is 0
which means
that the value
property is updated continuously as the user moves the slider thumb
(thereby dispatching a "change" event continously as the value changes). If this property is set
to -1
, the value
property is updated only after the user releases the
slider thumb. Therefore, if your application needs to perform CPU intensive tasks whenever the
slider value is updated, setting this property to a non-zero value can improve performance
(because unnecessary updates would be reduced).
The default value is 0
.
uiSlider | () | constructor |
public function uiSlider(range:uiRange = null)
Constructor - creates a new uiSlider
instance.
range:uiRange (default = null ) — [Optional] A uiRange object specifying the initial value and limits of
the slider. If undefined, a new uiRange object with default bounds will be used. You
can access this uiRange object via the range property.
|
change | event |