Boundaries

How would I make a movieclip not able to walk onto walls, enemies, and npcs in a non-tile RPG game?