# Random Movement + Collision Detection

**URL:** <https://forum.kirupa.com/t/random-movement-collision-detection/135191>\
**Category:** Uncategorized\
**Created:** [January 25, 2005, 2:18pm UTC](https://forum.kirupa.com/t/random-movement-collision-detection/135191 "2005-01-25T14:18:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonani](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jonani](https://forum.kirupa.com/u/jonani)\
**Post date:** [January 25, 2005, 2:18pm UTC](https://forum.kirupa.com/t/random-movement-collision-detection/135191/1 "2005-01-25T14:18:52Z")

</div>

I’m trying to make a map of my office with people (circles) moving around randomly and need a code that will tell them to move around and not run into the walls. I understand the collision detection .fla file (hittest\_example) and the random movement file (randommx) but don’t know how to put the two together. I also need the people to be somewhat contained within their offices and walking down the hallways… here’s my .fla file if someone can help!
