I am having a noticeable problem with my game.

When the player is next to a hit test (a wall) and walks into it, the player moves over the hit test and then bounces back.

Like So.

Player movement detected, player moves + 5 on the y axis. Then the hit test registers the players movement and subtracts 5. At first when the player tried to move to the object it appeared that the player ddint move at all. But now the player moves + 5 and then - 5, instead of appearing like 0. I don't understand why all of a sudden this happens!

player code

Code:
player.onEnterFrame = function() {
		if (!_level0.pausemove) {
			this.swapDepths(this._y);
			// <To walk>                                      
			if (Key.isDown(38)) {
				this.gotoAndStop(5);
				this._y -= _level0.speed;
				_level0.this_lastfaced = 1;
			} else {
				if (Key.isDown(40)) {
					this.gotoAndStop(7);
					this._y += _level0.speed;
					_level0.this_lastfaced = 3;
				} else {
					if (Key.isDown(37)) {
						this.gotoAndStop(8);
						this._x -= _level0.speed;
						_level0.this_lastfaced = 4;
					} else {
						if (Key.isDown(39)) {
							this.gotoAndStop(6);
							this._x += _level0.speed;
							_level0.this_lastfaced = 2;
						}
					}
				}
			}
			// <\To Walk>     
			if (!Key.isDown(37) && !Key.isDown(38) && !Key.isDown(39) && !Key.isDown(40)) {
				this.gotoAndStop(_level0.this_lastfaced);
			}
		} else {
			this.gotoAndStop(_level0.this_lastfaced);
		}
	};
(this code is on the main frame)

This following code appears in the action script panel of a movie clip within a movie clip that is called via "attachMovie"

Code:
onClipEvent (enterFrame) {
	if (this.hitTest(_parent._parent.player.testhit)) {
		trace("player touching fence");
		_parent._parent.player._x += _level0.speed;
		trace("sub speed");
	}
}
At first it worked fine, but all of a sudden it messed up and now it makes the player "bob" or "bounce". Any ideas?