Hi,
I’m pretty new with flash and actionscript3…so please, I need some help. What I’m trying to make, is a map with zoom and pan option. I want it to work exactly like it works on this website: http://www.rezmason.net/wireworld/
Could someone please help me with the code.
What I’ve got now is only working zoom, but not properly:
addEventListener(MouseEvent.MOUSE_WHEEL, Zoom);
function Zoom(e:MouseEvent):void
{
var mod:Number = 20;
map_drag.scaleX += e.delta / mod;
map_drag.scaleY += e.delta / mod;
map_drag.x = ((2 * mouseX) - (2 * (e.localX * map_drag.scaleX))) / 2;
map_drag.y = ((2 * mouseY) - (2 * (e.localY * map_drag.scaleY))) / 2;
}
thnx, joost