Creating Connected Lines tutorial questions

Hi all :smiley:
I was looking threw your tutorials and I found >>this one<<

I’ve modified a little it and now I have this:

function init() {
	for (var i:Number = 0; i<4; i++) {
		this.attachMovie("blueCircle", "blue"+i, this.getNextHighestDepth());
		var mc:MovieClip = this["blue"+i];
		mc._x = Math.round(Math.random(100)*300+100);
		mc._y = Math.round(Math.random(100)*300+100);
		mc.onPress = function() {
			this.startDrag();
		};
		mc.onRelease = function() {
			this.stopDrag();
		};
	}
	this.createEmptyMovieClip("line", -1);
	drawLine();
	this.onMouseMove = function() {
		drawLine();
	};
}
init();
//
function drawLine() {
	line.clear();
	line.lineStyle(5, 0xBFD7EE);
	//1->2
	line.moveTo(blue0._x, blue0._y);
	line.lineTo(blue1._x, blue1._y);
	//1->3
	line.moveTo(blue0._x, blue0._y);
	line.lineTo(blue2._x, blue2._y);
	//1->4
	line.moveTo(blue0._x, blue0._y);
	line.lineTo(blue3._x, blue3._y);
	//2->3
	line.moveTo(blue1._x, blue1._y);
	line.lineTo(blue2._x, blue2._y);
	//2->4
	line.moveTo(blue1._x, blue1._y);
	line.lineTo(blue3._x, blue3._y);
	//3->4
	line.moveTo(blue2._x, blue2._y);
	line.lineTo(blue3._x, blue3._y);
	//
	updateAfterEvent();
}

It works ok, but I want to do a game from it-polimorphic graphs (I’m not sure if I wrote it correctly)

Game it in the end of that movie: http://video.google.pl/videoplay?docid=6379146923853181774&q=multitouch+screen

I want to do something like that in flash.

I don’t have any ideas how to check for lines collisions (if one line is on other)
Any help??

Please…