# Help with target paths?

**URL:** https://forum.kirupa.com/t/help-with-target-paths/94354
**Category:** Uncategorized
**Created:** [November 11, 2003, 8:16pm UTC](https://forum.kirupa.com/t/help-with-target-paths/94354 "2003-11-11T20:16:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Coaldiamond](https://avatars.discourse-cdn.com/v4/letter/c/b77776/32.png) [@Coaldiamond](https://forum.kirupa.com/u/Coaldiamond)
#### Post date: [November 11, 2003, 8:16pm UTC](https://forum.kirupa.com/t/help-with-target-paths/94354/1 "2003-11-11T20:16:13Z")

</div>

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](https://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?
