I don't know of any example code.  Are you trying to do anything different from 
the other map applications out there?

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of flexaustin
Sent: Thursday, September 24, 2009 10:01 PM
To: [email protected]
Subject: [flexcoders] Re: scrollRect ???



Alex, thanks. Do you happen to know of any articles or examples on creating a 
satellite view pan/zoom control?

Jason

--- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex 
Harui <aha...@...> wrote:
>
> I'm pretty sure scrollrects are always positioned at 0,0. It essentially 
> creates a mask of a certain size, positions it at 0,0, then only shows the 
> pixels that would otherwise be displayed at x,y at 0,0
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On 
> Behalf Of flexaustin
> Sent: Wednesday, September 23, 2009 10:35 PM
> To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] scrollRect ???
>
>
>
> 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