# Senocular's Zoom Map,(scrollbar question)

**URL:** https://forum.kirupa.com/t/senoculars-zoom-map-scrollbar-question/193859
**Category:** flash
**Created:** [July 18, 2006, 8:49pm UTC](https://forum.kirupa.com/t/senoculars-zoom-map-scrollbar-question/193859 "2006-07-18T20:49:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xtinarox26](https://avatars.discourse-cdn.com/v4/letter/x/f14d63/32.png) [@xtinarox26](https://forum.kirupa.com/u/xtinarox26)
#### Post date: [July 18, 2006, 8:49pm UTC](https://forum.kirupa.com/t/senoculars-zoom-map-scrollbar-question/193859/1 "2006-07-18T20:49:28Z")

</div>

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:

```auto
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();
 }
}

```
