Need a wall code plz!

Im making a game with a tank, and i need a code for the walls. If it is possible, i need a code so that he just doesnt pass through it, not a code that makes him bounce off the wall. Also, if anyone knows a code that will make the baddie movieclip play a death frame when they get hit by a bullet that would be greatly appreciated.

Herez da fla!