hitTest issues

I am wanting to create a console game of sorts, however am having problems with the left and bottom sides of blocks (used as walls). I am wanting it to be so you can be next to the walls and move along them (which is working with right and down, but not with left and up.

Here is the AS code I am using:

onClipEvent(enterFrame){
 if(_root.Paused==0){
  if(Key.isDown(Key.UP) && this._y>5 && !_root.stage.wall.hitTest(this._x, this._y, true)){
   this._y -= _root.StepDist;
  }
  if(Key.isDown(Key.DOWN) && (this._y+this._height)<195 && !_root.stage.wall.hitTest(this._x, this._y+10, true)){
   this._y += _root.StepDist;
  }
  if(Key.isDown(Key.RIGHT) && (this._x+this._width)<195 && !_root.stage.wall.hitTest(this._x+15, this._y, true)){
   this._x += _root.StepDist;
  }
  if(Key.isDown(Key.LEFT) && this._x>5 && !_root.stage.wall.hitTest(this._x, this._y, false)){
   this._x -= _root.StepDist;
  }
 }
}

Attached is the full file, so you can see what it is acting like.

Any help on getting this right would be wonderful. :slight_smile: