| Package | qnx.fuse.ui.slider |
| Class | public class VolumeSlider |
| Inheritance | VolumeSlider Slider SliderBase UIComponent flash.display.MovieClip |
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:
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | active : 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 | ||
![]() | explicitHeight : Number [read-only] | UIComponent | |
![]() | explicitWidth : Number [read-only] | UIComponent | |
![]() | includeInLayout : Boolean
Specifies if the component should be included in it's parent containers layout. | UIComponent | |
![]() | layoutData : Object
Returns the layout data for the object. | UIComponent | |
![]() | maximum : 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 | ||
![]() | minHeight : Number
Sets the minimum preferred height of the control. | UIComponent | |
![]() | minimum : Number
Gets or sets the minimum value of the slider. | Slider | |
![]() | minWidth : Number
Sets the minimum preferred width of the control. | UIComponent | |
![]() | value : Number
Gets or sets the current value of the slider. | Slider | |
| Method | Defined By | ||
|---|---|---|---|
Creates a VolumeSlider instance. | VolumeSlider | ||
![]() | 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 | |
![]() | destroy():void
Call this method when you want to have your object collected by the garbage collector. | UIComponent | |
![]() | getSizeOptions():int | UIComponent | |
![]() | invalidateDisplayList():void
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered. | UIComponent | |
![]() | invalidateProperties():void
Calling this method results in a call to the components validateProperties() method before the display list is rendered. | UIComponent | |
![]() | measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement | UIComponent | |
![]() | setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting
the explicitWidth and explicitHeight. | UIComponent | |
![]() | setFillSkin(skin:Object):void
Sets the fill skin for the slider. | SliderBase | |
![]() | setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified
by the arguments. | UIComponent | |
![]() | setPosition(x:Number, y:Number):void
Sets the x and y position of the component. | UIComponent | |
![]() | setThumbSkin(skin:Object):void
Sets the skin for the slider thumb button. | SliderBase | |
![]() | setTrackSkin(skin:Object):void
Sets the skin for the track of the slider. | SliderBase | |
![]() | validateDisplayList():void
Validates the display list of the component by calling the updateDisplayList(). | UIComponent | |
![]() | validateNow():void
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary. | UIComponent | |
![]() | validateProperties():void
Validates the properties of the component by calling the commitProperties() method. | UIComponent | |
| audioBoostEnabled | property |
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.
public function get audioBoostEnabled():Boolean public function set audioBoostEnabled(value:Boolean):void| maxUnboostedAudioLevel | property |
maxUnboostedAudioLevel:Number
Gets or sets the maximum value of the VolumeSlider when audioBoostEnabled is
set to true.
public function get maxUnboostedAudioLevel():Number public function set maxUnboostedAudioLevel(value:Number):void| VolumeSlider | () | Constructor |
public function VolumeSlider()
Creates a VolumeSlider instance.
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 );
}
}
}