just a thought without going deeply into the problem yet. But after looking at it. I would suggest adding Text.setText = line.count.
As it looks like right now. You create a number of new lines per tick equal to number of Routes. You want to embed the the loop code under the On touch code.
It's ok to track your own points. but you get
navpoint.count that track the numger of objects
loopindex the current count in any loop
however, what I think your doing. Is that your actually drawing a line from
route(navpoint) which is the most recently created object.
route(navpoint+1) which doesn't exist and will be default to 0 so the first one.
you can do
start line at route(navpoint -1)
to route(navpoint)
you can also use
route(route.count - 2)
route(route.count -1)