3 Replies Latest reply on Aug 9, 2010 5:14 PM by danpeleg

    HSlider missing event?


      I'm using HSlider events: thumbPress & thmbRelease,

      But there is another option of moving along the slider,

      by clicking the slider somwhere...


      There is no event to catch this?

      if there is what is it please?

        • 1. Re: HSlider missing event?



          You are missing the change event.




          <?xml version="1.0"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                      import mx.controls.Alert;
                      private function onChange():void
                          Alert.show("Working fine....");
                      maximum="100" change="onChange()"/>






          Pls let me know if you have any issue.





          with Regards,


          Shardul Singh Bartwal

          • 2. Re: HSlider missing event?
            danpeleg Level 1

            Not really i tried that event...

            it runs everytime the slider changes his value..


            even when im using the thumb and i made my slider move along with a movie so it calls the change event all the time...


            there is another event or method that i can use?

            • 3. Re: HSlider missing event?
              danpeleg Level 1



              I have a slider, with those thumb events:



              protected function slider_thumbPress():void





              private function slider_thumbRelease():void


                   player.seekTo(Math.floor(slider.value), true);





              Now this events only occure when you click the thumb, but i want the movie to move also when you click somewhere on the slider.

              so i used this event:



              protected function slider_mouseDownHandler(event:MouseEvent):void



                   var posX:Number = event.localX;

                   var totalX:Number = 430;

                   var dur:Number = player.getDuration();

                   player.seekTo(Math.floor((posX / totalX) * dur), true);





              Now they are conflicting each other...

              There is a way to fix it?