title: Mouse move panning
body: <p>I'm trying to scroll a series of thumbnails horizontally based on the mouseX position. I can get it to scroll but it's very choppy and for some reason it's not reading my start and end numbers so it will stop scrolling. Can anyone point me in the right direction? Thanks.</p>
  
  <pre><code>var thumbBounds:Object = new Object(); 
  thumbBounds = thumbContainer.getBounds(this); 
  thumbContainer.addEventListener(MouseEvent.MOUSE_OVER, setScrolling); 
  
  private function setScrolling(me:MouseEvent):void         
  {             
      thumbContainer.removeEventListener(MouseEvent.MOUSE_OVER, setScrolling);
      stage.addEventListener(Event.ENTER_FRAME, scrollThumbs);         
  } 
  
  private function scrollThumbs(e:Event):void         
  {             
      if(mouseX &lt;= thumbBounds.x || mouseX &gt; thumbBounds.width || 
         mouseX &lt; thumbBounds.y || mouseX &gt; thumbBounds.height)
      {                 
          thumbContainer.addEventListener(MouseEvent.MOUSE_OVER, setScrolling); 
          stage.removeEventListener(Event.ENTER_FRAME, scrollThumbs);             
      } 
  
      if(thumbContainer.x &gt;= 0)             
      {                 
          thumbContainer.x = 0;             
      }             
  
      if(thumbContainer.x &lt;= -842)            
      {                 
          thumbContainer.x = -842;            
      }             
  
      var xdist:Number = new Number();             
      xdist = mouseX - 382;             
      thumbContainer.x += Math.round(-xdist / 10);         
  }
  </code></pre>