# How to set Pan & Zoom limits?

**URL:** https://forum.kirupa.com/t/how-to-set-pan-zoom-limits/196606
**Category:** flash
**Created:** [August 9, 2006, 7:18pm UTC](https://forum.kirupa.com/t/how-to-set-pan-zoom-limits/196606 "2006-08-09T19:18:10Z")
**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: [August 9, 2006, 7:18pm UTC](https://forum.kirupa.com/t/how-to-set-pan-zoom-limits/196606/1 "2006-08-09T19:18:10Z")

</div>

Hola!

I’m having trouble finding a way to set my interactive map to Zoom & Pan within the stage area…

If you zoom out the map starts to get smaller & smaller & smaller…and u can see the background. I need to set a limit for the Pan as well so that it won’t go past the map and on to the background.

stage is 810X710  
map: 1152x648

muchas gracias!:bounce:

any1?? :\*(

[FONT=Georgia][COLOR=plum] **zoom out code** [/COLOR][/FONT]

```auto
on (release) {
 _root.map._xscale -= 10;
 _root.map._yscale -= 10;
}

```
