# Delegate class - passing params with function

**URL:** <https://forum.kirupa.com/t/delegate-class-passing-params-with-function/250627>\
**Category:** flash\
**Created:** [January 31, 2008, 7:13am UTC](https://forum.kirupa.com/t/delegate-class-passing-params-with-function/250627 "2008-01-31T07:13:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asscripter](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@asscripter](https://forum.kirupa.com/u/asscripter)\
**Post date:** [January 31, 2008, 7:13am UTC](https://forum.kirupa.com/t/delegate-class-passing-params-with-function/250627/1 "2008-01-31T07:13:08Z")

</div>

Hi,

I am wanted to know how can i pass a parameter to the function which I’m calling using Delegate class. I know to pass params having static values such as true / false or a static string “hello”.

```auto
var myFunc:Function = btn.onRelease = Delegate.create(tihs, releaseHandler);
myFunc. **str** = "hello";

function releaseHandler()
{
    trace("my param = " + **arguments.caller.str** ); //output: hello 
}

```

Here \*\*str \*\*can be retrieved as ‘ **arguments.caller.str** ’ inside the function.

But in case i want to pass the reference of the ‘btn’ button. Then how can i do this ?

thanks.
