0 Replies Latest reply on Dec 15, 2008 9:26 AM by spacehog

    My thumbs are broken

    spacehog Level 1
      The thumbs on my hslider are no longer responding to a button click event since I installed a changeWatcher. Infact it doesn't even look like the click event occurs anymore. Here is the code for the button, the function it runs on the click event and the hSlider. This works fine (when I click the button the thumbs advance the appropriate amount:

      public function move_Thumbs(m:int):void{
      var move:int;
      move = nBegin + m;
      set_Thumbs(move);
      lblmsg.text="Click";
      }
      public function set_Thumbs(t1:int):void{
      nBegin = t1;
      nEnd = t1 + 120;
      }

      <mx:HSlider id="dateFilter_sldr"
      width="100%"
      thumbCount="2"
      allowThumbOverlap="false"
      minimum="1" maximum="{arrLen}"
      dataTipFormatFunction="formatSliderDataTip" showDataTip="true"
      values="{[nBegin,nEnd]}"
      tickInterval="24" snapInterval="24"
      allowTrackClick="true" liveDragging="true"
      creationComplete="hearFinished(event)"
      visible="true"/>

      <mx:Button label="&gt;" click="move_Thumbs(168)" width="35" height="100" id="btnNext" fontSize="16"/>

      Now when I add a changeWatcher to the code the button click event no longer works. I have it watching for when the values of the thumbs change:

      public function initWatcher():void
      {
      ChangeWatcher.watch(dateFilter_sldr,"values",changeWatcher);
      }
      public function changeWatcher(c:Event):void
      {
      filterFlatDP(c);
      lblmsg.text = "Change Watcher activated";
      }