This content has been marked as final. Show 4 replies
Why not? All you need to do is make your own. The MouseEvent class has its own constructor. Just look it up. You will see it shows you all the default values as well so you can either assign the ones you want or use the default values. The code below is pretty basic, but it does what you need.
You could probably also assign the myEvent as the default value for the event handler function and avoid having to remember to send it. I haven't tried that yet.
Well no, evidently you can't assign it as the default value for the function, but it does work in the form above.
The function that my mouse CLICK calls uses the currentTarget property to determine what action it should take. So I tried making my own MouseEvent and setting the relatedObject Paramiter to the object that I wanted the currentTarget property to respond to. This didnt work??? Isn't there a way to set what the currentTarget is going to be?
currentTarget is read-only.
use an if-statement in your event handler to check if currentTarget is null.