# Targeting problem

**URL:** <https://forum.kirupa.com/t/targeting-problem/8765>\
**Category:** Uncategorized\
**Created:** [November 27, 2002, 11:33pm UTC](https://forum.kirupa.com/t/targeting-problem/8765 "2002-11-27T23:33:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremy](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jeremy](https://forum.kirupa.com/u/jeremy)\
**Post date:** [November 27, 2002, 11:33pm UTC](https://forum.kirupa.com/t/targeting-problem/8765/1 "2002-11-27T23:33:57Z")

</div>

Ok, so I grabbed a droptarget file from some tutorial, and ended up mixing it with another one, currently this script works, but I want to know how to change one part of it, as you can see below the red colored “/rclip/dropone”. Those are four movie clips inside of a movie clip that is called rclip, on the main stage.  
now, if I am correct that is old flash4/5 (pre dot) syntax, which is fine, cause it works, but I wanted to change it to dot syntax. For some reason that won’t work.  
I have tried many different variations using \_parent, and \_root. neither of which work. is there something I am missing, inside of this script that wouldn’t allow me to use dot syntax right there?

> on (press) {  
> _parent.drag\_2.swapDepths( "root.drag_" + \_parent.highest );  
> \_parent.highest = substring ( \_name, 6, 1 );  
> var xx = \_parent.drag\_2.\_x;  
> var yy = \_parent.drag\_2.\_y;  
> startDrag (“\_parent.drag\_2”);

}  
on (release) {  
stopDrag ();  
if (\_parent.drag\_2.\_droptarget == [COLOR=red]“/rclip/dropone”[/COLOR]) {  
\_parent.drag\_2.\_x = \_parent.dropone.\_x;  
\_parent.drag\_2.\_y = \_parent.dropone.\_y;  
\_parent.var\_one = “S”

```
} else if (_parent.drag_2._droptarget == [COLOR=red]"/rclip/droptwo"[/COLOR]) {
	_parent.drag_2._x = _parent.droptwo._x;
	_parent.drag_2._y = _parent.droptwo._y;
	_parent.var_two = "S"
	
} else if (_parent.drag_2._droptarget == [COLOR=red]"/rclip/dropthree"[/COLOR]") {
	_parent.drag_2._x = _parent.dropthree._x;
	_parent.drag_2._y = _parent.dropthree._y;
	_parent.var_three = "S"
	
} else if (_parent.drag_2._droptarget ==[COLOR=red]"/rclip/dropfour"[/COLOR]) {
	_parent.drag_2._x = _parent.dropfour._x;
	_parent.drag_2._y = _parent.dropfour._y;
	_parent.var_four = "S"

} else {
	_parent.drag_2._x = xx;
	_parent.drag_2._y = yy;
}

```

}

---

<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 28, 2002, 5:56am UTC](https://forum.kirupa.com/t/targeting-problem/8765/2 "2002-11-28T05:56:40Z")

</div>

_bump_

I’m not sure if you can change those. It’s tough to say as it’s looking to see if a value is equal to that string.

I’m hoping one of my cohorts here will see this and endevor to figure this out.

---

<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 29, 2002, 1:29am UTC](https://forum.kirupa.com/t/targeting-problem/8765/3 "2002-11-29T01:29:10Z")

</div>

well turns out that the \_droptarget function returns an absolute value in slash syntax, it wasn’t a targeting problem after all. for future reference if someone wants to use the the \_droptarget and equate it to a dot syntax instance name, you have to use the eval function.
