Boundary for game

I’m creating a Flash game and I just need to know how to create walls in which when the main mc makes contact with it, it will not go any farther. Any help would be appreciated!:hr: