it most probably did not work because you did not give it correct instance names. if you just copied and pasted the code Captian_J_Sheridan provided, you need to make some changes to instance names.
In the first code, "Something" should be the instance name for your wall movieclip. You could have another instance name, but you have to replace both the code and the movie clip with it.
And, "Your next frame" should be replaced by the frame label. A frame can be given a label or name using the bottom toolbar in flash. Also, the frame label has to be in double qoutes when you enter it in the script
For the second code he provided, the platform the character stands on should be given the instance of "Platform". And you should already have a HP counter/bar in place. And, the movieclip your character is in should be called "Character"
Hope this helps :D