Reference X Or Y coordinate by using name property

I have a function called addPoint that creates a new sprite instance onmousedown event:

function addPoint(e:MouseEvent):void
{
pointSpriteNameCounter += 1;
pointSprite = new Sprite();
pointSprite.name = “pointSprite” + pointSpriteNameCounter;

pointSprite.graphics.lineStyle(1,0x000000,1,true);
pointSprite.graphics.beginFill(0x99CC00,1);
pointSprite.graphics.drawCircle(0,0,10);
pointSprite.x = mouseX;
pointSprite.y = mouseY;
pointSprite.graphics.endFill();
addChild(pointSprite);

routeContainer.graphics.lineStyle(1, 0, 1);
routeContainer.graphics.moveTo(pointSprite.x, pointSprite.y);
routeContainer.graphics.lineTo(300, 300);
}

The idea is that each time user clicks a new circle is created on stage and for each circle created, a line is created to connect the previous circle to the last one created. I thought that I could do this like so:

routeContainer.graphics.lineStyle(1, 0, 1);
//reference coord of the first sprite created
routeContainer.graphics.moveTo(pointSprite.name.x, pointSprite.name.y);
//reference coord of the second sprite created
routeContainer.graphics.lineTo(pointSprite.name.x, pointSprite.name.y);

But compiler returns an error when I try to reference the X or Y coor by using
pointSprite.name.x
I’m sure there is a much better way to create sprites on mousedown and then connect each sprite to another as they are created.

I was thinking maybe storing each sprite name in an array and then loop through array to get the last and current sprite name and then connecting them that way…

Thanks for the help…

G