Limits to left/right stage offsets?

I’m building a sort of pan/zoom map viewer. It has a pan/zoom widget with a slider and a draggable highlighted area for navigation.


(note: don’t close the pan/zoom widget, or you’ll have to refresh the page to get it back)

At “extreme magnification”, areas of the UILoader (which contains the map image background) blank out in what seems like a rectangular pattern.

As zooming increases it seems that only a smaller and smaller rectangle of the image is displayed (usually close to the middle).

This “clipping” seems to always start once the UILoader passes 8,000 pixels in width.

Here’s the code for the pan/zoomer (“zoom_pane” is the highlighted area over the “pan_zoom_map” in the widget):

var background_map:UILoader = new UILoader();
background_map.source = “map_of_rome.gif”;
background_map.scaleContent = true;

var pan_zoom_slider:Slider = new Slider();
pan_zoom_slider.snapInterval = 1;
pan_zoom_slider.tickInterval = 1;
pan_zoom_slider.minimum = 1;
pan_zoom_slider.maximum = 100;

function panZoomSlideChange(e:SliderEvent):void
zoom_pane.reSize((e.value / 100) * pan_zoom_map_width, (e.value / 100) * pan_zoom_map_height);
background_map.setSize(Math.round((1 / (e.value / 100)) * background_map_max_zoom_out_width), Math.round((1 / (e.value / 100)) * background_map_max_zoom_out_height));

zoom_pane.addEventListener(Event.ENTER_FRAME, ZoomPanePostion);

function ZoomPanePostion(e:Event):void
background_map.move(-(background_map_max_zoom_out_width * zoom_pane.x) / zoom_pane.width, -(background_map_max_zoom_out_height * zoom_pane.y) / zoom_pane.height);

Any ideas what’s causing this behavior?

Thanks, Doug