1 Reply Latest reply on Feb 12, 2010 12:12 PM by archemedia

    Tip only show on some points?

    mark416 Level 1

      <mx:HSlider id="hsView"    minimum="25" maximum="1000"  width="470" value="500" visible="true"
            tickValues ="[25, 100, 200, 500, 1000]" labels="[25 , '500', '1,000' ]"   x="0" y="73" />

       

      May I only show tip at 25, 100, 200, 500 and 1000 and I do not want to show Tip when slider on ther points?

       

      Thanks

       

      Mark

        • 1. Re: Tip only show on some points?
          archemedia Level 4

          You can set the dataTipFormatFunction to a custom function. In that function you can write code to set the datatip to anything you want:

           

           

          private function myDataTipFunction(value:Number):String

          {

               //add code here: compare value to the tickValues and return the nearest value

               //value holds the current value of the slider

               //return a string

          }

              <mx:HSlider id="hsView"    minimum="25" maximum="1000"  width="470" value="500" visible="true"
                tickValues ="[25, 100, 200, 500, 1000]" labels="[25 , '500', '1,000' ]"   x="0" y="73"
               dataTipFormatFunction="myDataTipFunction"/>

           

          Dany