# Moving around and about

**URL:** <https://forum.kirupa.com/t/moving-around-and-about/212319>\
**Category:** flash\
**Created:** [January 10, 2007, 4:40am UTC](https://forum.kirupa.com/t/moving-around-and-about/212319 "2007-01-10T04:40:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregmax](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gregmax](https://forum.kirupa.com/u/gregmax)\
**Post date:** [January 10, 2007, 4:40am UTC](https://forum.kirupa.com/t/moving-around-and-about/212319/1 "2007-01-10T04:40:00Z")

</div>

Ok, this is my script:

while(village\_holder.village.build.hit.hitTest(pt.getBounds(\_root).xMin, pt.\_y, true)) {  
pt.\_x++;  
}  
while(village\_holder.village.build.hit.hitTest(pt.getBounds(\_root).xMax, pt.\_y, true)) {  
pt.\_x–;  
}  
while(village\_holder.village.build.hit.hitTest(pt.\_x, pt.getBounds(\_root).yMin, true)) {  
pt.\_y++;  
}  
while(village\_holder.village.build.hit.hitTest(pt.\_x, pt.getBounds(\_root).yMax, true)) {  
pt.\_y–;  
}

I have a village, called ‘village\_holder’, and in it is the village, build, and finally hit MCs. The ‘pt’ is the character that is moving around and about. When the player moves down and collides with the top of the village it makes the pt jump off the screen!! It works fine on the other sides.

Can you spot any problems?
