I'm building a map application that shows two views of the same map: a "tile" section of the entire map (normal scale) and, off to the side, a thumbnail version of the entire map with a "mini-tile" representing the rectangular section the user is currently viewing.
The normal scale map is draggable inside the borders of the tile view, and when user drags it the little square automatically moves on the thumbnail to indicate tile placement. That part's working.
What I'd like to do is enable the other direction of drag -- i.e., I'd like to allow user *also* to be able to manipulate (drag) the mini-tile in the thumbnail and see the normal scale map move accordingly. Problem is, I can't seem to figure out how to make two objects (the normal-scale map and the mini-tile) mutually draggable.
It sounds to me (if I understand you correctly) that you actually wouldn't get the results you want by mutual dragging. The reason I say that is, if you drag the mini tile on the thumb-map, let's say 20 pixels, and you have two objects set to drag together, the large map will only move 20 pixels as well. You need them to work together proportionately.
I would recommend that you 1)figure the proportions of the small map to the large (for instance 3:1) 2) track the ._x and ._y of the mouse from mousedown to release on the small map 3) Move the large map in accordance with your ratio (on 3:1, if you move the small map 12 pixels, move the large map 36 pixels.
Hope that made sense and wasn't completely missing your point.
Dain, you're correct about the relative size factoring. I've actually already managed to work that out in the first direction (dragging big map in tile window proportionately moves mini-tile on thumbnail).
My question is really about how to make it so that the user can either drag the big map (and mini-tile will auto update) or the mini-tile (and big map will auto update), on his or her whim.
I've tried to do this, but it will only allow one way or the other. I think I'm missing something obvious, but I'm out of ideas.
Thanks for your attention to my little challenge....
ok here u go... it's not exactly the same thing .... but it works... u drag one mc the other one moves and vice versa... still working on making the mc move when i drag the zoom area
CooL "N" CalM
my body is sore
my eyes are red
i still itch for more
before i hit the bed