Packageqnx.fuse.ui.slider
Classpublic class VolumeSlider
InheritanceVolumeSlider Inheritance Slider Inheritance SliderBase Inheritance UIComponent Inheritance flash.display.MovieClip

The VolumeSlider component provides the functionality for implementing a volume control.

The VolumeSlider component is fundamentally similar to the Slider component except that it implemements a customized look and feel:

A volume slider control.

View the examples

See also

Slider


Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
Gets or sets a value that determines whether the control is active and enabled.
Slider
  audioBoostEnabled : Boolean
Gets or sets a value that enables AudioBoost visuals on the VolumeSlider.
VolumeSlider
 InheritedexplicitHeight : Number
[read-only]
UIComponent
 InheritedexplicitWidth : Number
[read-only]
UIComponent
 InheritedincludeInLayout : Boolean
Specifies if the component should be included in it's parent containers layout.
UIComponent
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
 Inheritedmaximum : Number
Gets or sets the maximum value of the slider.
Slider
  maxUnboostedAudioLevel : Number
Gets or sets the maximum value of the VolumeSlider when audioBoostEnabled is set to true.
VolumeSlider
 InheritedminHeight : Number
Sets the minimum preferred height of the control.
UIComponent
 Inheritedminimum : Number
Gets or sets the minimum value of the slider.
Slider
 InheritedminWidth : Number
Sets the minimum preferred width of the control.
UIComponent
 Inheritedvalue : Number
Gets or sets the current value of the slider.
Slider
Protected Properties
 PropertyDefined By
 InheriteddisplayListIsInvalid : Boolean = false
UIComponent
 InheritedpropertiesAreInvalid : Boolean = false
UIComponent
 InheritedsizeChange : Boolean
UIComponent
 InheritedstateChanged : Boolean
UIComponent
Public Methods
 MethodDefined By
  
Creates a VolumeSlider instance.
VolumeSlider
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
UIComponent
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
UIComponent
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
 Inherited
setFillSkin(skin:Object):void
Sets the fill skin for the slider.
SliderBase
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
setThumbSkin(skin:Object):void
Sets the skin for the slider thumb button.
SliderBase
 Inherited
setTrackSkin(skin:Object):void
Sets the skin for the track of the slider.
SliderBase
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent
Protected Methods
 MethodDefined By
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
[override] Measures the size of the component so that it can be reported to the layout framework for laying the component out properly.
SliderBase
 Inherited
drawFill():void
Draws the fill of the slider.
SliderBase
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
[override] Called when the position of the thumb on the x axis has changed.
Slider
 Inherited
[override] Called when the thumb has been pressed by the user.
Slider
 Inherited
[override] Called when the thumb has been released by the user.
Slider
 Inherited
[override] Called when the thumb has been pressed by the user.
Slider
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override] Sets the size and position of the children of the component.
Slider
Events
 Event Summary Defined By
 Inherited Dispatched when a drag event ends.Slider
 Inherited Dispatched when a drag event starts.Slider
 Inherited Dispatched when the slider is moved by the user.Slider
Property Detail
audioBoostEnabledproperty
audioBoostEnabled:Boolean

Gets or sets a value that enables AudioBoost visuals on the VolumeSlider. When set to true, the slider is allowed to travel to its maximum value. Otherwise, its maximum is clamped at maxUnboostedAudioLevel.


Implementation
    public function get audioBoostEnabled():Boolean
    public function set audioBoostEnabled(value:Boolean):void
maxUnboostedAudioLevelproperty 
maxUnboostedAudioLevel:Number

Gets or sets the maximum value of the VolumeSlider when audioBoostEnabled is set to true.


Implementation
    public function get maxUnboostedAudioLevel():Number
    public function set maxUnboostedAudioLevel(value:Number):void
Constructor Detail
VolumeSlider()Constructor
public function VolumeSlider()

Creates a VolumeSlider instance.

Examples
In the following example, a VolumeSlider instance is created and added to the stage. Event listeners are added to listen for slider movement events.
     
package
{
    import flash.display.Sprite;
    
    import qnx.fuse.ui.events.SliderEvent;
    import qnx.fuse.ui.slider.VolumeSlider;
    
    [SWF(height="600", width="1024", frameRate="30",
     backgroundColor="#FFFFFF")]
    public class sliderSample extends Sprite
    {
        
        private var myVSlider:VolumeSlider;
        
        public function sliderSample()
        {
            initializeUI();
        }
        
        private function initializeUI():void
        {
            myVSlider =  new VolumeSlider();
            myVSlider.setPosition(300, 300);
            myVSlider.minimum = 0;
            myVSlider.maximum = 100;
            myVSlider.value = 50;
            // listen to the when the slider moves
            myVSlider.addEventListener( SliderEvent.MOVE, sliderChange );
            // listen to the when the slider starts to move
            myVSlider.addEventListener( SliderEvent.START, sliderStart );
            // listen to the end of the slider event
            myVSlider.addEventListener( SliderEvent.END, sliderStop );
            this.addChild( myVSlider );
        }
        
        private function sliderChange( event:SliderEvent ) : void
        {
            var newlevel:int = Math.round( event.target.value );
            trace( "slider value: ", newlevel );
        }
        
        private function sliderStart( event:SliderEvent ) : void
        {
            var newlevel:int = Math.round( event.target.value );
            trace( "started moving at: ", newlevel );
        }
        
        private function sliderStop( event:SliderEvent ) : void
        {
            var newlevel:int = Math.round( event.target.value );
            trace( "stopped moving at: ", newlevel );
        }
    }
}