# Panning the mc

**URL:** <https://forum.kirupa.com/t/panning-the-mc/62413>\
**Category:** Uncategorized\
**Created:** [August 27, 2004, 3:38pm UTC](https://forum.kirupa.com/t/panning-the-mc/62413 "2004-08-27T15:38:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brockus](https://avatars.discourse-cdn.com/v4/letter/b/6bbea6/32.png) [@brockus](https://forum.kirupa.com/u/brockus)\
**Post date:** [August 27, 2004, 3:38pm UTC](https://forum.kirupa.com/t/panning-the-mc/62413/1 "2004-08-27T15:38:55Z")

</div>

Can anyone point me in the right direction?

I’m looking to have a small window with a portion of a map showing through, and then as the user rolls over upper portion, lower portion, left and right portion the map will move in that direction.

Thank you…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 4:06pm UTC](https://forum.kirupa.com/t/panning-the-mc/62413/2 "2004-08-27T16:06:59Z")

</div>

I would put a mask over the map and use Actions script to move the map in certain directions while keeping the mask in place. Something like this, say your map’s instance name is map and you have a right arrow called right\_arrow and you want to move your map with it in that direction. Use the same concept to move it the other directions. Someone can probably give you some better code and I think there are good tutorials on this.

map.\_x = 0;  
map.\_y = 0;  
speed = 10;  
right\_arrow.onPress = function() {  
\_root.onEnterFrame = function() {  
map.\_x -= speed;  
};  
};

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2004, 4:56am UTC](https://forum.kirupa.com/t/panning-the-mc/62413/3 "2004-08-28T04:56:24Z")

</div>

> [@brockus](#):
>
> Can anyone point me in the right direction?
> 
> I’m looking to have a small window with a portion of a map showing through, and then as the user rolls over upper portion, lower portion, left and right portion the map will move in that direction.
> 
> Thank you…

i made a rough movie for u according to my understanding of ur problem, see if would help u a bit.
