Wondering if anyone knows how to get the difference between the scrollRect x 
position relative to the components edges?

I am building a pancontrol, similar to the ones found Google Maps or Yahoo 
Maps, for quick navigation.

In order to setup my pancontrol I need to find out the following given this 
code:

<Application...
......

<mx:Canvas id="compHolder" width="100%" height="100%" 
horizontalScrollPolicy="off" verticalScrollPolicy="off" >
                <components:myComp id="vis" 
                width="100%" height="100%" 
                horizontalScrollPolicy="off" verticalScrollPolicy="off" 
                backgroundAlpha="0"
                scrollRect="{rec}" 
                cacheAsBitmap="true"
                mouseUp="handleVisMouseUp()"
                /> 
        </mx:Canvas>

I need to find the distance or gap between the vis.scrollRect x&y position 
relative to the vis x&y position.  My application width & height are 600 x 600. 
Vis width and height are 3000 x 900 so they extend off screen. I am using the 
scrollRect to limit what is viewable. But in order build my pancontrol I need 
to find the diff between the X & Y of the scrollRect in relation to the X&Y of 
the Vis. So how far off left, right, bottom, and top of the visible area does 
Vis extend. I need those numbers in pixels.

TIA, J

Reply via email to