| Package | com.bit101.components |
| Class | public class UISlider |
| Inheritance | UISlider Component flash.display.Sprite |
| Subclasses | HUISlider, VUISlider |
| Property | Defined by | ||
|---|---|---|---|
![]() | height : Number | Component | |
| label : String | UISlider | ||
| labelPrecision : int | UISlider | ||
| maximum : Number | UISlider | ||
| minimum : Number | UISlider | ||
| value : Number | UISlider | ||
![]() | width : Number | Component | |
![]() | x : Number
Overrides the setter for x to always place the component on a whole pixel.
| Component | |
![]() | y : Number
Overrides the setter for y to always place the component on a whole pixel.
| Component | |
| Property | Defined by | ||
|---|---|---|---|
![]() | _height : Number = 0 | Component | |
| _label : Label | UISlider | ||
| _slider : Slider | UISlider | ||
| _sliderClass : Class | UISlider | ||
| _valueLabel : Label | UISlider | ||
![]() | _width : Number = 0 | Component | |
| Method | Defined by | ||
|---|---|---|---|
|
UISlider(parent:DisplayObjectContainer = null, x:Number = 0, y:Number = 0, label:String = "", defaultEventHandler:Function = null)
Constructor
| UISlider | ||
|
draw():void
Draws the visual ui of this component.
| UISlider | ||
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
| Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
| Component | |
![]() |
setSize(w:Number, h:Number):void
Sets the size of the component.
| Component | |
|
setSliderParams(min:Number, max:Number, value:Number):void
Convenience method to set the three main parameters in one shot.
| UISlider | ||
| Method | Defined by | ||
|---|---|---|---|
|
addChildren():void
Creates and adds the child display objects of this component.
| UISlider | ||
|
formatValueLabel():void
Formats the value of the slider to a string based on the current level of precision.
| UISlider | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
| Component | |
![]() |
init():void
Initilizes the component.
| Component | |
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
| Component | |
|
positionLabel():void
Positions the label when it has changed.
| UISlider | ||
| _label | property |
protected var _label:Label
| label | property |
label:String [read-write]Implementation
public function get label():String
public function set label(value:String):void
| labelPrecision | property |
labelPrecision:int [read-write]Implementation
public function get labelPrecision():int
public function set labelPrecision(value:int):void
| maximum | property |
maximum:Number [read-write]Implementation
public function get maximum():Number
public function set maximum(value:Number):void
| minimum | property |
minimum:Number [read-write]Implementation
public function get minimum():Number
public function set minimum(value:Number):void
| _slider | property |
protected var _slider:Slider
| _sliderClass | property |
protected var _sliderClass:Class
| value | property |
value:Number [read-write]Implementation
public function get value():Number
public function set value(value:Number):void
| _valueLabel | property |
protected var _valueLabel:Label
| UISlider | () | constructor |
public function UISlider(parent:DisplayObjectContainer = null, x:Number = 0, y:Number = 0, label:String = "", defaultEventHandler:Function = null)Constructor
Parametersparent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this UISlider.
|
|
x:Number (default = 0) — The x position to place this component.
|
|
y:Number (default = 0) — The y position to place this component.
|
|
label:String (default = "") — The initial string to display as this component's label.
|
|
defaultEventHandler:Function (default = null) — The event handling function to handle the default event for this component (change in this case).
|
| addChildren | () | method |
protected override function addChildren():voidCreates and adds the child display objects of this component.
| draw | () | method |
public override function draw():voidDraws the visual ui of this component.
| formatValueLabel | () | method |
protected function formatValueLabel():voidFormats the value of the slider to a string based on the current level of precision.
| positionLabel | () | method |
protected function positionLabel():voidPositions the label when it has changed. Implemented in child classes.
| setSliderParams | () | method |
public function setSliderParams(min:Number, max:Number, value:Number):voidConvenience method to set the three main parameters in one shot.
Parametersmin:Number — The minimum value of the slider.
|
|
max:Number — The maximum value of the slider.
|
|
value:Number — The value of the slider.
|