Drawing lines between two x/y points HELP

Is there a way in flash, that if you entered two diiferent x/y positions that a line could be drawn to join the 2 x/y positions?,

or a line would just appear to join the two x/y positions?

what im attempting to do is a graph, firstly you’d drag all the xs into the correct postiotions on the graph, then youd click a button and a line would join all the x’s together

thanks