# Moving a mc within a boundry \[AS2\]

**URL:** <https://forum.kirupa.com/t/moving-a-mc-within-a-boundry-as2/298075>\
**Category:** Uncategorized\
**Created:** [October 13, 2009, 12:47pm UTC](https://forum.kirupa.com/t/moving-a-mc-within-a-boundry-as2/298075 "2009-10-13T12:47:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anand\_as2](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anand\_as2](https://forum.kirupa.com/u/anand_as2)\
**Post date:** [October 13, 2009, 12:47pm UTC](https://forum.kirupa.com/t/moving-a-mc-within-a-boundry-as2/298075/1 "2009-10-13T12:47:55Z")

</div>

Hi Friends,

I am doing a game, in that I have to move the mc within a boundry limit (i.e. moving over a path). If the mc hits on the wall, it should not move in the direction, which we move.

Note: Not by just setting the x, y limit. By using the hitTest.

Please help me.  
Thanks in advance.  
I:-)
