# AS2: stop my movieclip moving off stage

**URL:** <https://forum.kirupa.com/t/as2-stop-my-movieclip-moving-off-stage/284404>\
**Category:** flash\
**Created:** [March 18, 2009, 9:31pm UTC](https://forum.kirupa.com/t/as2-stop-my-movieclip-moving-off-stage/284404 "2009-03-18T21:31:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilleypants](https://avatars.discourse-cdn.com/v4/letter/l/f17d59/32.png) [@lilleypants](https://forum.kirupa.com/u/lilleypants)\
**Post date:** [March 18, 2009, 9:31pm UTC](https://forum.kirupa.com/t/as2-stop-my-movieclip-moving-off-stage/284404/1 "2009-03-18T21:31:14Z")

</div>

I have a movieclip moving around on key presses and I was wondering what is the best way to stop it moving off the stage?

I was thinking of putting hit tests around the edges but wondered if there was a better way?
