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”.
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.