      */
     protected function system_mouseMoveHandler(event:MouseEvent):void
     {
-        var newValue:Number = calculateNewValue(value, event);
-
-        positionThumb(valueToPosition(newValue));
-        
+        var p:Point = track.globalToLocal(new Point(event.stageX, event.stageY));
+        var newValue:Number = pointToValue(p.x - clickOffset.x, p.y - clickOffset.y);
+        newValue = nearestValidValue(newValue, snapInterval);
+
         if (newValue != value)
         {
-            setValue(newValue);
+            setValue(newValue); 
             dispatchEvent(new TrackBaseEvent(TrackBaseEvent.THUMB_DRAG));
             dispatchEvent(new Event(Event.CHANGE));   
         }
-        
+    
         event.updateAfterEvent();
     }
     

            track.removeEventListener(ResizeEvent.RESIZE, track_resizeHandler);
        }
    }
    
    /**
     *  Return the value corresponding to a position on the track. 
     *  The value is calculated by
     *  finding what fraction of the logical track the <code>position</code>
     *  represents, and then multiplying that by 
     *  the range of possible values for the track.
     *
     *  @param position A position on the track.
     *
     *  @return A value, between <code>minimum</code> and <code>maximum</code>, 
     *  corresponding to <code>position</code>.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function positionToValue(position:Number):Number
    {
        var posRange:Number = trackSize - thumbSize;

        if (posRange == 0) // Divide by 0 error.
            return minimum;

        var range:Number = maximum - minimum;
        var value:Number = minimum + position * (range / posRange);
        return value;
    }
    
    /**
     *  Return the position of the thumb button on the track
     *  corresponding to a given value. 
     *  
     *  <p>Calculate the thumb button position by finding 
     *  the fraction of the range of possible values that 
     *  <code>value</code> represents, and then multiplying that by
     *  the logical track size, minus the logical thumb size.</p>
     *
     *  @param value A value, between <code>minimum</code> and <code>maximum</code>.
     *
     *  @return A position on the track corresponding to <code>value</code>.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function valueToPosition(value:Number):Number
    {
        var range:Number = maximum - minimum;
        
        if (range <= 0) // Divide by 0 error or nonsense
            return 0;
        var posRange:Number = trackSize - thumbSize;
        var thumbPos:Number = (value - minimum) * (posRange / range);
        
        return thumbPos;
    }
    
    /**
     *  Returns a position on the track. 
     *  The <code>localX</code> and <code>localY</code>
     *  values represent the location in the local coordinate system of the
     *  track. 
     *
     *  <p>Subclasses must override this method and return the
     *  appropriate value. Values should not be clamped to
     *  the ends of the track, as that clamping will happen later, prior
     *  to setting position of the thumb button.</p>
     *
     *  @param localX The X-location in the local coordinate system of the
     *  track.
     *
     *  @param localY The Y-location in the local coordinate system of the
     *  track.
     *
     *  @return The posisiton on the track.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function pointToPosition(localX:Number, localY:Number):Number
    {
        return 0;
    }

    /**
     *  Set the position of the thumb button. 
     *
     *  <p>Subclasses should override this method to position 
     *  the thumb button.</p>
     *
     *  @param thumbPos The new position of the thumb button.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function positionThumb(thumbPos:Number):void {}
    
    /**
     *  Sets the size of the thumb button.
     *  
     *  <p>Subclasses should override this method to size 
     *  the thumb button.</p>
     *
     *  @param thumbSize The new size of the thumb button.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function sizeThumb(thumbSize:Number):void {}

    /**
     *  Returns the size of the thumb button
     *  given the current setting of the range, 
     *  <code>trackSize</code>, or other settings.
     *  Subclasses should override this to calculate the correct size in
     *  the units of position.
     * 
     *  @return The size of the thumb button. 
     *  The default size is 0.
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function calculateThumbSize():Number
    {
        return 0;
    }

    /**
     *  From a MouseEvent object that contains the 
     *  position where the thumb button was dragged to, and
     *  the previous position of the thumb button, 
     *  return the value corresponding to the new position. 
     *  The value is restricted to the range defined by the 
     *  <code>minimum</code> and <code>maximum</code> values. 
     *
     *  <p>This method usually should not be overridden.</p>
     *
     *  @param prevValue The previous position of the thumb button.
     *
     *  @param event A MouseEvent object.
     *
     *  @return The value that corresponds to the new track position
     *  as calculated by the <code>nearestValidValue()</code> method.  
     *  
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     */
    protected function calculateNewValue(prevValue:Number, event:MouseEvent):Number
    {
        var pt:Point = new Point(event.stageX, event.stageY);
        pt = track.globalToLocal(pt);
        var movePos:Number = pointToPosition(pt.x - clickOffset.x, 
                                             pt.y - clickOffset.y);
        var newValue:Number = positionToValue(movePos);
        var roundedValue:Number = nearestValidValue(newValue, valueInterval);
        return roundedValue;
    }
    
    /**
     *  @private
     */ 
    override protected function focusInHandler(event:FocusEvent):void
    {
        super.focusInHandler(event);
        
    	addSystemHandlers(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler, stage_mouseWheelHandler);
    }
    
    /**
     *  @private
     */
    override protected function focusOutHandler(event:FocusEvent):void
    {
        super.focusOutHandler(event);
        
    	removeSystemHandlers(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler, stage_mouseWheelHandler);
    }
    
    /**
     *  @private
     */
    override protected function updateDisplayList(w:Number, h:Number):void
    {
        super.updateDisplayList(w, h);
        completeTrackLayout();
    }

    //--------------------------------------------------------------------------
    // 
    // Event Handlers
    //
    //--------------------------------------------------------------------------
    
    /**
     *  Set <code>thumbSize</code> to the value of <code>calculateThumbSize()</code>
     *  and then size and position the thumb with <code>sizeThumb()</code> and 
     *  <code>positionThumb</code>.
     *   
     *  We're assuming that the track's skin will layout the thumb at its default size
     *  and position.   
     * 
     *  We complete the layout here, when either the track or thumb
     *  has changed size, or when the track's display list is updated, 
     *  by recomputing the thumb's size and position.  
     * 
     *  @langversion 3.0
     *  @playerversion Flash 10
     *  @playerversion AIR 1.5
     *  @productversion Flex 4
     * 
     */
    protected function completeTrackLayout():void
    {
        thumbSize = calculateThumbSize();
        sizeThumb(thumbSize);
        positionThumb(valueToPosition(value));
    }
    
    /**
     *  @private
     */
    private function track_resizeHandler(event:Event):void
    {
        completeTrackLayout();
    }

    /**

     */
    private function thumb_resizeHandler(event:Event):void
    {
        updateSkinDisplayList();
    }
    
    /**
