Question
zoom to rectangle on movieclip
Hi, I'm trying out Flash and would like to implement a zoom
and pan like the one here:
http://zeroextinction.org/pointmapper/azefiles/index.html
I am as far as generating the rectangle over my movie clip. The trouble is how to then grab the coordinates of the rectangle and zoom to it. I figured I could do it using _xscale and _yscale but its tricky for me to get the correct zoom scale and also to reposition the image so that the rectangle the user draws is exactly zoomed into. I have an mc africa_mc which has my graphics. See code below, doesnt zoom correctly. Help appreciated.
I am as far as generating the rectangle over my movie clip. The trouble is how to then grab the coordinates of the rectangle and zoom to it. I figured I could do it using _xscale and _yscale but its tricky for me to get the correct zoom scale and also to reposition the image so that the rectangle the user draws is exactly zoomed into. I have an mc africa_mc which has my graphics. See code below, doesnt zoom correctly. Help appreciated.
