I’m working on an interactive map for a client, and for the past two days I have been searching for an answer to my problems, but have been unable to find them (though I have found many people with the same problems).
stage size: 425 x 325
map size: 1260 x 966
The map can pane, but it will only stick to the boundries of the map_mc if the zoom hasent been used (100%). Once you zoom out, it will not stick to the movie clips boundires.
Pane code
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if(this._height >= 425){
this.startDrag(false,0,0,-(this._width)*.65,-(this._height)*.65);
}
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
}
}
And my issue with the zoom is that, I cannot figure out how to get it to zoom to/from the center of my map, it zooms to the top left corner.
zoom in & zoom out codes
on (release) {
if(_root.scrolling._xscale < 100){
_root.scrolling._xscale += 13.2539;
_root.scrolling._yscale += 13.2539;
}
}
on (release) {
if(_root.scrolling._xscale < 100){
_root.scrolling._xscale += 13.2539;
_root.scrolling._yscale += 13.2539;
}
}
if anyone can give me some advice on how to get it to zoom to the center, and stick to the boundries that would be greatly appreciated.
my .fla is to large to attatch, but you can download it from here:
http://www.mike-miles.com/virtual_tour/scrolling_map_old.zip