Last problem! (I think)

Ok, so far I have learned almost everything I need to know about making a platform game :D. The last thing that I need for this platform game, is how to make the hero not sink too far into or above the ground. I have checked through the other threads on this problem, but they didn’t help me, so if any one could help me eliminate this problem, I would be most thankful. Thanks in advance!

peace

P.S. Here is the code I use for the ground:


if (_root.ground.hitTest(this._x, this._y+15, true)) {
	if (vel_y<=1) {
		fall = 0;
		vel_y = 0;
		jumping = false;
		move = false;
	 }
}