# Zoom and drag map :(

**URL:** <https://forum.kirupa.com/t/zoom-and-drag-map/218459>\
**Category:** Uncategorized\
**Created:** [March 7, 2007, 11:20pm UTC](https://forum.kirupa.com/t/zoom-and-drag-map/218459 "2007-03-07T23:20:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabishi](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sabishi](https://forum.kirupa.com/u/sabishi)\
**Post date:** [March 7, 2007, 11:20pm UTC](https://forum.kirupa.com/t/zoom-and-drag-map/218459/1 "2007-03-07T23:20:21Z")

</div>

I have made a map that zooms and drags but I need it to change between zooming and draging when I click on different movie clips. I was thinking it was best to use an action listener but I wasnt able to incoperate it into this project ☹ any idea what I can do?

```auto
#include "mc_tween2.as"
map._width = 593
map._height = 832
 
drag.onRelease = function() {
map.onPress = function(){
     this.startDrag();
};
map.onRelease = function(){
     this.stopDrag();
};
}
 
 
zoom.onRelease = function() {
map.onRelease = function() {
 if (map._width >= 594) {
   map.resizeTo(593, 832, 2, "linear");
 } 
 else {
   map.resizeTo(2372, 3328, 2, "linear");
 }
}
}

stop();

```
