PDA

View Full Version : zoom and map



pavanshinde
July 20th, 2006, 04:29 AM
Hi all

I have a map. i want to add a zoom in/out and feature to it , i am able to zoom in and out .

I am having problem in paning the map. Instance name for the MC is map.

Here is the function that i m using for zooming the map
function zoom(amount) {
xoffset = startWidth*(map._x-startx)/(100/amount*map._width);
yoffset = startHeight*(map._y-starty)/(100/amount*map._height);
map._xscale = map._xscale+amount;
map._yscale = map._yscale+amount;
map._x = map._x+xoffset;
map._y = map._y+yoffset;
y_coord = map._y;
x_coord = map._x;
scale = int(map._xscale)+"% view";
if (map._xscale<=50) {
map._xscale = 50;
map._yscale = 50;
scale = int(map._xscale)+"% view";
}
// end if
}



Thanks

Anogar
July 20th, 2006, 04:32 AM
You seem to have posted multiple times in error. If tell us what code you are currently using and use the edit button to erase the other two posts, I'm sure someone would be happy to help. :thumb: