class BaseSlider
package feathers.controls.supportClasses
extends FeathersControl › MeasureSprite › ValidatingSprite
implements IRange
extended by HSlider, VSlider
Base class for slider components.
1.0.0
.See:
Variables
liveDragging:Bool = true
Determines if the slider dispatches the Event.CHANGE
event every time
that the thumb moves while dragging, or only after the user stops
dragging.
In the following example, live dragging is disabled:
slider.liveDragging = false;
1.0.0
.maximum:Float = 1.0
The slider's value cannot be larger than the maximum.
In the following example, the maximum is set to 100.0
:
slider.minimum = 0.0;
slider.maximum = 100.0;
slider.step = 1.0;
slider.value = 12.0;
1.0.0
.See:
maximumPadding:Float = 0.0
The space, measured in pixels, between the maximum position of the thumb and the the maximum edge of the track. May be negative to optionally extend the draggable range of the thumb beyond the track's bounds.
In the following example, maximum padding is set to 20 pixels:
slider.maximumPadding = 20.0;
1.0.0
.See:
minimum:Float = 0.0
The slider's value cannot be smaller than the minimum.
In the following example, the minimum is set to -100.0
:
slider.minimum = -100.0;
slider.maximum = 100.0;
slider.step = 1.0;
slider.value = 50.0;
1.0.0
.See:
minimumPadding:Float = 0.0
The space, measured in pixels, between the minimum position of the thumb and the the minimum edge of the track. May be negative to optionally extend the draggable range of the thumb beyond the track's bounds.
In the following example, minimum padding is set to 20 pixels:
slider.minimumPadding = 20.0;
1.0.0
.See:
secondaryTrackSkin:DisplayObject = null
The skin to use for the slider's optional secondary track. If a slider has one track, it will fill the entire length of the slider. If a slider has a track and a secondary track, the primary track will stretch between the minimum edge of the slider and the location of the slider's thumb, while the secondary track will stretch from the location of the slider's thumb to the maximum edge of the slider.
In the following example, a track skin and a secondary track skin are passed to the slider:
var skin = new RectangleSkin();
skin.fill = SolidColor(0xaaaaaa);
slider.trackSkin = skin;
var skin = new RectangleSkin();
skin.fill = SolidColor(0xcccccc);
slider.secondaryTrackSkin = skin;
1.0.0
.See:
step:Float = 0.0
As the slider's thumb is dragged, the value
is snapped to the nearest
multiple of step
. If step
is 0.0
, the value
is not snapped.
In the following example, the step is changed to 1.0
:
slider.minimum = 0.0;
slider.maximum = 100.0;
slider.step = 1.0;
slider.value = 10.0;
1.0.0
.See:
thumbSkin:DisplayObject = null
The skin to use for the slider's thumb.
In the following example, a thumb skin is passed to the slider:
var skin = new RectangleSkin();
skin.fill = SolidColor(0xcccccc);
slider.thumbSkin = skin;
1.0.0
.See:
trackSkin:DisplayObject = null
The skin to use for the slider's track.
In the following example, a track skin is passed to the slider:
var skin = new RectangleSkin();
skin.fill = SolidColor(0xcccccc);
slider.trackSkin = skin;
1.0.0
.See:
value:Float = 0.0
The value of the slider, which must be between the minimum
and the
maximum
.
In the following example, the value is changed to 12.0
:
slider.minimum = 0.0;
slider.maximum = 100.0;
slider.step = 1.0;
slider.value = 12.0;
1.0.0
.See: