# How to add boundary for the moving movieclip

**URL:** <https://forum.kirupa.com/t/how-to-add-boundary-for-the-moving-movieclip/33589>\
**Category:** Uncategorized\
**Created:** [October 21, 2003, 10:49am UTC](https://forum.kirupa.com/t/how-to-add-boundary-for-the-moving-movieclip/33589 "2003-10-21T10:49:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBUH](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@SBUH](https://forum.kirupa.com/u/SBUH)\
**Post date:** [October 21, 2003, 10:49am UTC](https://forum.kirupa.com/t/how-to-add-boundary-for-the-moving-movieclip/33589/1 "2003-10-21T10:49:09Z")

</div>

Hello, I have function for moving the movieclip but I would like to add boundary for it. And another thing is that the movieclip contains a textfield for receiving the text input from the user so I have the autoSize=true for the textfield. Then I wonder how to modify the code so that when the movieclip exist the boundary, it couldn’t move any more? Thanks very much in advance!

---

<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:** [October 21, 2003, 6:21pm UTC](https://forum.kirupa.com/t/how-to-add-boundary-for-the-moving-movieclip/33589/2 "2003-10-21T18:21:22Z")

</div>

```auto
this._x > boundaryX ? this._x = boundaryX : null;

```
