Help with target paths?

Hey, I was wondering if anyone could help me with a problem I’m having with writing correct target paths. I wrote a function that rotates a mc to point at the mouse, but I would like to change it so that the mc points towards another mc after a collision.

I imagine that the script would look something like this:

if (this.hitTest(someDuplicate)){
     setProperty (this, targetName, someDuplicate._name)}
this.targetx = _root."targetName"._x
this.targety = _root."targetName"._y

//this.targetx,y are then used to calculate the rotation.

The problem I have is that all of the movieclips in my movie are duplicates with the names “newCircle”+i or “newRipple”+i, and so I don’t know how to properly refer to the duplicate or how to code this.
Does anyone know how to help?
Does anyone know what I’m talking about?