# Minor problem

**URL:** <https://forum.kirupa.com/t/minor-problem/175058>\
**Category:** Uncategorized\
**Created:** [January 11, 2006, 1:08pm UTC](https://forum.kirupa.com/t/minor-problem/175058 "2006-01-11T13:08:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric\_chua](https://avatars.discourse-cdn.com/v4/letter/e/f9ae1b/32.png) [@eric\_chua](https://forum.kirupa.com/u/eric_chua)\
**Post date:** [January 11, 2006, 1:08pm UTC](https://forum.kirupa.com/t/minor-problem/175058/1 "2006-01-11T13:08:51Z")

</div>

hi, lets say I create a btn and named it “sample1” in a mc named “aboutus”. then I want when this btn inside the aboutus mc clicked, will pass it to a function named btnclicked() and then the function will perform some animation according to the mc name the parameters sent. The mc script is as below:

```auto
onClipEvent(enterFrame)
{
     this.sample1.onRelease = btnclicked("aboutus");
}

```

And I coding the function at the timeline of this mc:

```auto
function btnclicked(aaa)
{
     _root.aaa.gotoAndPlay(1);
}

```

It failed to run. I think I dunno how to passing the parameter from the mc to the function and in the function execute the animation by referencing the mc name. Someone pls corrent me. Thanks!
