You'd definitely be better off using the Platform behavior, considering you appear to be making a platformer. <img src="smileys/smiley36.gif" border="0" align="middle" />
I'd make an example if I was at home, but it isn't too complicated. Give your character a variable called State or something, set to "normal" by default, to keep track of how he should behave. Set it to "wall" when he hits a wall or the ceiling -- when it's "wall", set the player's gravity to 0 so he won't fall. Then when you press a button or something to let go, set it back to "normal", where gravity is restored.