Draw line to follow MC

Hi,
I have moving movie clip on stage and I want to draw a line so that it fallows my MC.

var sp:Sprite = new Sprite();
addChild(sp);
var g:Graphics = sp.graphics;
g.lineStyle(1,0x000000);

addEventListener(Event.ENTER_FRAME, onLoop);
function onLoop(e:Event):void{
    g.moveTo(500,200);
    g.lineTo(mc.x, mc.y);
}

The problem is that on EnterFrame keeps drawing the line from coordinates 500, 200, but I want just one line so it follows constantly my movie clip. from coordinates 500, 200
Any thoughts?
Thank you!