 
 package spark.components
 {
+import flash.events.MouseEvent;
 import flash.geom.Point;
-    
+
+import mx.core.EventPriority;
 import mx.core.mx_internal;
 import mx.events.PropertyChangeEvent;
 import mx.events.ResizeEvent;
-    
+
 import spark.components.supportClasses.ScrollBar;
+import spark.core.IViewport;
 import spark.core.NavigationUnit;
-import spark.core.IViewport;
 
 use namespace mx_internal;
 

            maximum = viewport.contentWidth - viewportWidth;
        }
    }
}
}

     */
    override public function set viewport(newViewport:IViewport):void
    {
        
        const oldViewport:IViewport = super.viewport;
        if (oldViewport == newViewport)
            return;
        
        if (oldViewport)
        {
            oldViewport.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
            removeEventListener(MouseEvent.MOUSE_WHEEL, hsb_mouseWheelHandler, true);
        }
        
        super.viewport = newViewport;
        
        if (newViewport)
        {
            updateMaximumAndPageSize()
            value = newViewport.horizontalScrollPosition;
            
            // The HSB viewport mouse wheel listener is added at a low priority so that 
            // if a VSB installs a listener it will run first and cancel the event.
            newViewport.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, false, EventPriority.DEFAULT_HANDLER);

            // The HSB mouse wheel listener stops propagation and redispatches its event, 
            // so we listen during the capture phase.
            addEventListener(MouseEvent.MOUSE_WHEEL, hsb_mouseWheelHandler, true); 
        }
    }      
    
