# Sending InstanceName of an object calling a Function

**URL:** <https://forum.kirupa.com/t/sending-instancename-of-an-object-calling-a-function/108945>\
**Category:** Uncategorized\
**Created:** [April 30, 2004, 12:25am UTC](https://forum.kirupa.com/t/sending-instancename-of-an-object-calling-a-function/108945 "2004-04-30T00:25:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeiferTim](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/seifertim/32/188_2.png) [@SeiferTim](https://forum.kirupa.com/u/SeiferTim)\
**Post date:** [April 30, 2004, 12:25am UTC](https://forum.kirupa.com/t/sending-instancename-of-an-object-calling-a-function/108945/1 "2004-04-30T00:25:01Z")

</div>

Anyway to do this?  
Lets say I have 3 MCs on my stage:  
‘object1’, ‘obect2’, and ‘object3’.  
I also have another MC, named ‘hopper’, which has the function (very simplified, mind you):

```auto

function JumpToIt(oldMC) {
this._x = oldMC._x;
this._y = oldMC._y;
}

```

Basically, I want my ‘hopper’ MC to move to the x,y position of the object that calls the JumpToIt function… how can I do this? Can I put, in each MC:

```auto

if (whatever) {
JumpToIt(this.InstanceName);
}

```

or something?

Now, I _know_, that I could just as easily have:

```auto

JumpToIt(this._x, this._y);

```

and change my function accordingly, but I’m looking for a basis for a more complex job… any ideas?
