# Running an Object through a function

**URL:** <https://forum.kirupa.com/t/running-an-object-through-a-function/248873>\
**Category:** Uncategorized\
**Created:** [January 12, 2008, 3:26pm UTC](https://forum.kirupa.com/t/running-an-object-through-a-function/248873 "2008-01-12T15:26:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [January 12, 2008, 3:26pm UTC](https://forum.kirupa.com/t/running-an-object-through-a-function/248873/1 "2008-01-12T15:26:53Z")

</div>

Hiya,  
I have some stored info inside object ‘s’. Everything works when I run s through my function. s is reference to a movieClip which is what actually runs through the function. However, I want to make this action happen by clicking another MC. Look at the code below and it will be easier to see:

```auto
s.onRelease = unReleased;

```

What I want is to ignite that line of code exactly, but by releasing a different MC, ie:

```auto
exit_mc.onRelease = s.onRelease = unReleased;

```

However, I dont want to click s to do so. You see, if I call the function unReleased just via exit\_mc, then all the stored vars in s aren’t put into action, as they aren’t running through the unReleased function.  
Make sense? I think it’s sheer Syntax difficulties on my part.

Help Please! It’s simpler than it seems - I know that! 🙂
