Why anonymous functions are cool
September 28th, 2008 by Dante
A few months into learning about Actionscript, I started playing around with anonymous functions. I found them to be a convenient way to do some basic event handling quickly and easily while reducing the complexity of the code.
For review, an anonymous function in Actionscript looks something like this:
foo.addEventListener(EVENT, function (event:Event):void { bar++ } );
When you [...]