# Movie clip boundaries

**URL:** <https://forum.kirupa.com/t/movie-clip-boundaries/230422>\
**Category:** Uncategorized\
**Created:** [June 26, 2007, 5:15am UTC](https://forum.kirupa.com/t/movie-clip-boundaries/230422 "2007-06-26T05:15:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chevron8653](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@chevron8653](https://forum.kirupa.com/u/chevron8653)\
**Post date:** [June 26, 2007, 5:15am UTC](https://forum.kirupa.com/t/movie-clip-boundaries/230422/1 "2007-06-26T05:15:54Z")

</div>

hi there.

well i was wondering if anyone could help me with this little thing im trying to figure out.

I have a animated dot called player\_mc that ive made follow the mouse cursor and ive also hid the mouse cursor with actionscript that all works fine but now what im wanting is to make it that they cant move the player\_mc movieclip outside of the thin rectangle around it which is a movie clip called wall\_mc.

```auto
Mouse.hide();
function dotmouse() {
    _root.player_mc._x = _xmouse;
    _root.player_mc._y = _ymouse;
}
var update:Number = setInterval(dotmouse, 20);

```

above is the code that does the moving with cursor stuff ive just exsplained thats no problem there works 100% just i as i said im wanting to make it that if they hit nething thats in the movieclip wall\_mc the mouse stops like it hit a wall.

thanks ne solutions and a quick reply will be most appreciated.
