hitTest with lines

hi there!
I’m making a video game and there are some walls, which are in fact lines drawn with wall.moveTo() and wall.lineTo()

this is what I have: (simplified)


_root.createEmptyMovieClip("wall", 1);
wall.onEnterFrame = function() {
	wall.lineStyle(1, 0xFFFFFF, 100);
	wall.moveTo(variablex, variablex);
	wall.lineTo(variablex2, variabley2);
};



this works fine, but…

I also have a player MC, and I want to detect collision between my player and those lines
my idea: (player’s code)


	if(this.hitTest(_root.wall._x,_root.wall._y,true)){
		trace("asd");
	}



but for some reason this doesn’t work

can you help me please?
thanks in advance