Please view
http://www.sergemedia.net/ds2/map/lissarazoomfix.html
Click on lot 41. It zooms to 200%. That works. then Manually move slider to 100%. It zooms out. Click on another lot. It snaps back to 200%. That works. Now go back to lot 41. The zoom slider is still positioned where you moved it to. The map is still at 200%, but slider is not located at 200%. I need it to reset to 200%, every time a lot is clicked it needs to go back to 200%, even if its been manually moved to a lower percentage.
This is the code for the scaling device. I think I am looking for a line of code that will force the zoom handle to go to 200% when lot is clicked. It does work initially, its just when the slider is moved, it does not reset to 200%.
onClipEvent(load){
scrollMin = _root.range._x+_root.range._width // minimum _x value possiible for scrollbar
scrollMax = _root.range._x // maximum _x value possiible for scrollbar
lowestScale = 50 // lowest desired scale of map in %
highestScale = 100 // highest desired scale of map in %
_x = scrollMin + (scrollMax - scrollMin)/25 //puts handle at 200%
scaleFactor = Math.pow(highestScale/lowestScale,1/(scrollMax-scrollMin)) // variable for SetScale
function SetScale(){
// calculates scale and sets it
_root.scale = _root.map_mc._xscale = _root.map_mc._yscale = lowestScale * Math.pow(scaleFactor,(scrollMax-_x))
}
SetScale()
}
onClipEvent(mouseMove){
if (dragging){
_x = Math.min(Math.max(_parent._xmouse,scrollMax),scrollMin)
SetScale()
updateAfterEvent();
}
}