# How do tell a function what clip I am on?

**URL:** https://forum.kirupa.com/t/how-do-tell-a-function-what-clip-i-am-on/166021
**Category:** flash
**Created:** [October 16, 2005, 7:05am UTC](https://forum.kirupa.com/t/how-do-tell-a-function-what-clip-i-am-on/166021 "2005-10-16T07:05:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GreenLantern](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/greenlantern/32/393_2.png) [@GreenLantern](https://forum.kirupa.com/u/GreenLantern)
#### Post date: [October 16, 2005, 7:05am UTC](https://forum.kirupa.com/t/how-do-tell-a-function-what-clip-i-am-on/166021/1 "2005-10-16T07:05:48Z")

</div>

Suppose I have three different movie clips. mc\_A, mc\_B, mc\_C

I want to have a rollover call a function that changes each movie clip. But I don’t want to type it out like this:

```auto
mc_A.onRollOver = function() {
Explode.newExplosion(mc_A);
};
mc_B.onRollOver = function() {
Explode.newExplosion(mc_B);
};
mc_C.onRollOver = function() {
Explode.newExplosion(mc_C);
};

```

I want to do something more like this.

```auto
mc_A.onRollOver = setNewExplosion();
//repeat the above for B and C

function setNewExplosion() {
Explode.newExplosion(this);
}

```

Above you will see that I used this, it made sense to me, but this always refers to the main timeline (root in my case). So how do I pass the name of hte clip I am rolling over to a function?

Thanks in advance,  
-=GL=-
