Trying to draw line between targets within different objects

OK, so I have 2 or more objects created dynamically on stage. Each object has other smaller objects as children (I called them targets). What I am trying to do is to draw lines between these targets. By the way, in the near future these parent objects will need to be drag around the stage and the lines will need to relocate to the new locations when the dragging is complete. But at this point I am having problems getting the lines to show up in the proper locations.

So this first piece of code creates the targets and the second piece is where I am trying to draw the lines between targets. I tried to use localX and localY but I can’t get it working.

Any advice would be great. Thanks.


function handleSubmitFile(evt:Event):void
 {
  var numberChoices:uint = mcAttribute1.comboAttribute.selectedItem.data;
  if (mcAttribute1.txtAttribute.text != "" && mcAttribute1.comboAttribute.selectedIndex != -1)
  {
   var fileHeight:int = file.height;
   for(var i:uint = 0; i<numberChoices; i++)
   {
    var mcTarget1:mcTarget = new mcTarget();
    mcTarget1.x= (file.width/numberChoices * i) + (5) + (3 * i) ;
    mcTarget1.y = fileHeight;
    mcTarget1.label = i;
    mcTarget1.addEventListener(MouseEvent.MOUSE_DOWN, drawStart);
    mcTarget1.addEventListener(MouseEvent.MOUSE_OVER, handleEndPoint);
    mcTarget1.addEventListener(MouseEvent.MOUSE_UP, drawFinish);
    file.addChild(mcTarget1);
   }
   file.txtFileName.text = file.name = mcAttribute1.txtAttribute.text;
   fileArray.push(file);
   fileNameArray.push(mcAttribute1.txtAttribute.text);
 
   removeChild(getChildByName("mcAttribute1"));
  } 
  else
  {
   trace("You must make proper choices.");
  }
 }


function drawStart(evt:MouseEvent):void
{
 clip.graphics.lineStyle(2,0x333333);
    clip.graphics.moveTo(evt.currentTarget.parent.localX, evt.currentTarget.parent.localY);
 trace(evt.currentTarget.label);
 beginDrawPoint.x = evt.currentTarget.parent.localX;
 beginDrawPoint.y = evt.currentTarget.parent.localY;
}