Passing parameters to an event handler
i using event handlers respond user inputs(mouse click, enter key, etc.)
the handler can use event objects parameters perform operations based on called function. example of target._name, apparently passed when event occurs.
in addition, have need call event handler within mimic mouse click or keyboard entry.
this call no problem. use event handler name. instance, mc.click(); , handler invoked.
however, call there no object passed handler. differs event-driven call object
identifying event source passed handler.
the question is: can pass parameter(s) or object event handler call in actionscript? have tried various ways, nothing has worked.
does know insides of event handling , how "eventobject" passed when
a user event occurs? knowing how works might give clues how pass object call.
the handler can use event objects parameters perform operations based on called function. example of target._name, apparently passed when event occurs.
in addition, have need call event handler within mimic mouse click or keyboard entry.
this call no problem. use event handler name. instance, mc.click(); , handler invoked.
however, call there no object passed handler. differs event-driven call object
identifying event source passed handler.
the question is: can pass parameter(s) or object event handler call in actionscript? have tried various ways, nothing has worked.
does know insides of event handling , how "eventobject" passed when
a user event occurs? knowing how works might give clues how pass object call.
you need use modified version of mx.utils.delegate package. link below has that;
http://www.person13.com/articles/proxy/proxy.htm
http://www.person13.com/articles/proxy/proxy.htm
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment