Hi, i gather it's not possible to send arguments from Mouse Events without writing a custom EventManager. What would be a correct way to identify either the object sending the event or to pass arguments to a function specified in the Mouse Event?
I discovered this but I'm not sure if it's appropriate since i'm not familiar yet with EventManager/Dispatch stuff, I don't know what I'm looking for:
http://www.kirupa.com/forum/showthread.php?t=291250
Hypothetical:
I have a function which receives a MovieClip object then adds a listener to it - I want to then pass the same object onto the next function if the object receives a mouse click.
Code:
//ADD EVENT LISTENERS
public static function addFirstClickListener(myButton:MovieClip) {
myButton.addEventListener(MouseEvent.CLICK, doSomething(myButton));
}
PS: trace for "myButton" turns out correctly
button passed is [object news]