I 'm working on an interactive map …the slider for Zoom has this code on it.
All i need to do is change the direction of the silder…its slides vertically …& i need it to slide horizontal …thats it. I changed the Y’s to x VALUES…but that just distorts the map…
help Kirupians!
thank you oh sooo much!
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 = 75 // lowest desired scale of map in %
highestScale = 150
// 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();
}
}