Draw a line from actor's X,Y to mouse's X,Y

Is there a way I can have the game draw a straight line (even if it's dashed) from a given actor to the mouse's X,Y coordinates when the mouse button is held down? I'd also like the line to move as the mouse moves and to disappear when the mouse button is released. Think of a pool game as an example.
Fat chance?
Fat chance?
Comments
When mouse is held down (on an invisible background),
Every 0.1 seconds, spawn actor2 (2 pixels X 2 pixels) at location of main actor1
In actor2, I have a "Move To" specifying movement towards mouse X,Y at default speed (300).
When actor2's X,Y = mouse X,Y: destroy actor2
That way, I have a constant stream of dots travelling at high speeds towards where the user clicks/touches, which simulates a line. It's not perfect but it's the best I could do.
But if someone has a better idea, I'd definitely be interested in hearing it.
http://www.megaupload.com/?d=0UGOU2QO
Hachiko, that's exactly what I needed. Thank you so much for taking the time.