How to do a wall funtcion in Flash mx?

Hey
I wonder how i will create a wall function that will stop my player go past the walls.

Thanks
Albert :ogre: