Has anyone had any luck reusing listener functions? IE I have a function displayImage(); that I register for displayBtn’s MouseEvent.CLICK but I also want to call that function from some other place in the code.
So far i’ve been doing it by calling it with a new Event such as:
displayImage(new MouseEvent(MouseEvent.CLICK)); so that it won’t complain that it doesn’t have the arguments it requires. But I feel this sin’t the best solution.
How have you done it?