so I’m looking at Senocular’s Zoom map source,the slider for the zoom has this code on it. the slider is vertical…but i need it to move horizontal…i changed the Y values to X …but that just distorted the map.
thanks for your help guys :beam:
onClipEvent(load){
scrollMin = _root.range._y-_root.range._height // minimum _y value possiible for scrollbar
scrollMax = _root.range._y // maximum _y value possiible for scrollbar
lowestScale = 50 // lowest desired scale of map in %
highestScale = 300 // highest desired scale of map in %
_y = scrollMin + (scrollMax - scrollMin)/2 // sets starting position of scrollbar (currently half-way)
scaleFactor = Math.pow(highestScale/lowestScale,1/(scrollMax-scrollMin)) // variable for SetScale
function SetScale(){
// calculates scale and sets it
_root.scale = _root.map._xscale = _root.map._yscale = lowestScale * Math.pow(scaleFactor,(scrollMax-_y))
}
SetScale()
}
onClipEvent(mouseMove){
if (dragging){
_y = Math.min(Math.max(_parent._ymouse,scrollMin),scrollMax)
SetScale()
updateAfterEvent();
}
}