 
 package spark.components
 {
+import flash.geom.Point;
+
 import mx.core.mx_internal;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;

        if (!thumb || !track)
            return;

        var trackPos:Number = track.getLayoutBoundsY();
        var trackSize:Number = track.getLayoutBoundsHeight();
        var range:Number = maximum - minimum;

        var thumbPos:Number = 0;
        var thumbSize:Number = trackSize;
        if (range > 0)
        {

            {
                thumbSize = thumb ? thumb.height : 0;
            }
            
            // calculate new thumb position.
            thumbPosTrackY = (value - minimum) * ((trackSize - thumbSize) / range);
        }

        if (getStyle("fixedThumbSize") === false)
            thumb.setLayoutBoundsSize(NaN, thumbSize);
        if (getStyle("autoThumbVisibility") === true)
            thumb.visible = thumbSize < trackSize;
        
        // convert thumb position to parent's coordinates.
        thumbPos = track.localToGlobal(new Point(0, thumbPosTrackY));
        thumbPosParentY = thumb.parent.globalToLocal(thumbPos).y;
        
        thumb.setLayoutBoundsPosition(thumb.getLayoutBoundsX(), Math.round(thumbPosParentY));
    }
    
    
