Set the value and range

Set the range:

<js:Slider minimum="0" maximum="25"/>

Set the current value:

<js:Slider value="5"/>

Snap to specific values:

<js:Slider snapInterval="5"/>

Listen to events

Listen for changes to the value property:

<js:Slider id="slider" valueChange="onValueChange(event)"/>
<fx:Script>
<![CDATA[
private function onValueChange(event:Event):void
{
trace("value change:", slider.value);
}
]]>
</fx:Script>
  • No labels