I have noticed that in flex you can have something and setup a
<object click=“runthisfunction()”> and onclick it will run the function, however you can also pass variables like.
<object click=“runthisfunction(‘hey there’)”>
Right now, I have is so my custom event dispatcher runs a function, and that function tries to run a dynamic function like.
onClose:Function = functionname;
public function clicked(e:Event):void
{
onClose();
}
And it works fine, however I would really like to be able to pass variables into it, the same way flex does. It’s so much smoother.
so somewhere In My code I would do
onClose = functionname(‘variable’);
(Though I know that would theoretically ‘RUN’ the function name, how would I acheive the same effect?)
The best I could think of so far was to do an
onClose = functionname;
params = parameters;
and later
event{
onClose(params);
}