I disagree with this approach. It's unnecessary and makes code less
manageable. It's cleaner to set the argument as optional (event = null)
than write another subroutine.
Matt S. wrote:
You might want to separate the functions, so you would have
myFunction(), which you could call from anywhere, and myClickHandler,
which would handle the mouse event specifically. So:
fancyButton.addEventListener(MouseEvent.CLICK, myClickHandler);
private function myClickHandler(e:MouseEvent):void {
myFunction();
}
private function myFunction():void{
//blah blah...
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders