# Help with target paths?

**URL:** https://forum.kirupa.com/t/help-with-target-paths/35229
**Category:** flash
**Created:** [November 11, 2003, 8:16pm UTC](https://forum.kirupa.com/t/help-with-target-paths/35229 "2003-11-11T20:16:13Z")
**Posts on this page:** 2
**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/35229/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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [November 12, 2003, 12:31am UTC](https://forum.kirupa.com/t/help-with-target-paths/35229/2 "2003-11-12T00:31:35Z")

</div>

Welcome, Coaldiamond. =)

Check this out: [http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12082](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=12082).
