title: power meter gauge animation
body: <p>i am currently working on a power gauge in flash for a fishing game in which a user mouse inputs determine the vertical power of a gauge,there is a container rectangle MC, and a meter rectangle made of 1 height, the meter height is adjusted according to the difference calculated from the mouseStart event, and mouseMove event, is there a better way of making the calculations? because currently a slight difference will result in a big "jump" in the meter .</p>
  
  <p>functions of the rod.</p>
  
  <pre><code>private function touchStarted(evt:MouseEvent):void
          {
              startY = evt.stageY;
  
          }
          private function rotateTurret(evt:MouseEvent):void 
          {
              trace("rot "+rotation);
              endY = evt.stageY;
  
              if (startY != 0)
              {
              difference = startY-endY  ;
              txt.text = difference.toString();
              _powerMeter.increment(difference);
              }
                   }
  </code></pre>
  
  <p>power meter function</p>
  
  <pre><code>private function loop(e:Event):void
      {
  
  
          fill.height += _diff;
  
          if (fill.height &gt;= 200 )
              fill.height = 200;
          if (fill.height &lt; 0)
              fill.height = 0;        
  
      }
  
      public function increment(value:Number):void
      {
          _diff = value;
      }
  </code></pre>