1 Reply Latest reply on Jan 16, 2007 8:47 AM by generate_random_num

    HSlider Position

    colin.light Level 1
      Can somebody tell me how to animate the HSlider to a specified position using actionscript 3.0?

      I have an AS component with a number of HSliders on it which represent a colour profile. I'd like to be able to set the profile and have all the sliders to animate into position at the same time. I've achieved this effect in flash using as 2 and the tween class. Not sure how to implement this in AS 3.

      Any help would be appreciated.
        • 1. Re: HSlider Position
          generate_random_num
          Couple of ways to change the slider position:

          slider.value = number

          or if you're using multiple thumbs:

          slider.setThumbValueAt(0, number)

          where the first parameter tells you which thumb to use. To set the two thumbs you would do:

          slider.setThumbValueAt(0,number)
          slider.setThumbValueAt(1,number+10)

          To animate, just run through a loop.