Mini Map Selection Box

I have a main window with a minimap of the main window…I have created a transparent minimap selection box that shows the view of the main window…so when you zoom in on the main window…the selection box in the minimap shrinks to depict the current view of the main window…The zoom works fine with the proportions and all…however, when I pan the main map, the minimap selection window does not pan proportionally…it is close, but not right on, so it does not outline the correct view of the main window in the minimap…my approach to this was to create a proportion variable to apply to the x and y changes…

[AS]
var propX:Number;
var propY:Number;

propX = container_m._width/container._width;
propY = container_m._height/container._height;

miniWin._x -= (dx*propX);
miniWin._y -= (dy*propY);

[/AS]

this does not work quite right…please help…