Hslider

In this tutorial you'll come to know about the horizontal slider option of flex. We'll see how to set the range of the slider, as well as we will come to know how to put the labels on the slider using labels option etc.

Hslider

Hslider

     

In this tutorial you'll come to know about the horizontal slider option of flex. We'll see how to set the range of the slider, as well as we will come to know how to put the labels on the slider using labels option etc.

 

 

 

 

 

 

 

 

 

 

 

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    <![CDATA[
    import mx.controls.HSlider;
    public function myslide(sld:HSlider):void
    {
    var rand:int=(Math.floor(Math.random()*10));
    sld.setThumbValueAt(0,rand);
    }
   
    ]]>
 
  </mx:Script>
  <mx:Panel id="panel" title="Horizontal Slider">
  <mx:HSlider id="s" labels="[1,2,3,4,5,6,7,8,9]" />
  <mx:Button id="b" label="change the value" click="myslide(s)"/>
  </mx:Panel>
</mx:Application>