Lines between points

Is there an example anywhere on drawing a line or rect between two randomly generated points?

In other words, if you have two points that are spawned at separate random coordinates on the screen is it possible to generate a new line or rect that begins at the first point and ends at the other?

http://developer.anscamobile.com/content/displaynewline

1
2
3
local l = display.newLine(prevX,prevY,newX,newY);
l:setColor(255,0,0);
l:width =2 ;

I was so close...

Thanks!

views:1602 update:2011/11/17 9:28:17
corona forums © 2003-2011