# Dezoom map with centering it

**URL:** <https://forum.kirupa.com/t/dezoom-map-with-centering-it/154144>\
**Category:** Uncategorized\
**Created:** [July 7, 2005, 9:32am UTC](https://forum.kirupa.com/t/dezoom-map-with-centering-it/154144 "2005-07-07T09:32:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![5TEF](https://avatars.discourse-cdn.com/v4/letter/5/85e7bf/32.png) [@5TEF](https://forum.kirupa.com/u/5TEF)\
**Post date:** [July 7, 2005, 9:32am UTC](https://forum.kirupa.com/t/dezoom-map-with-centering-it/154144/1 "2005-07-07T09:32:54Z")

</div>

Hi,

i’ve made a map, with zoom and drag fonction.  
all is ok, but i want the map stay center (on my scene) when i dezoom it.

how make this ?

this is the AS on my mc called “map” :

[color=DarkRed]on (press) {  
\_root.moving = true;  
if (\_root.moving == true && \_root.map.\_xscale\>=60) {  
this.startDrag();  
}  
}  
on (release) {  
this.stopDrag();  
}[/color]
