Thursday, October 25, 2012

Bound Function AKA CallBacks AS3

//Another weird AS3 Syntax thing I did not know was possible: private function takeCallback(boundFunction:Function):void { trace("calling boundFunction / callback"); boundFunction(); }//takeCallback //Call Function and pass it an inlined function. takeCallback( function():void { trace("Function Speaking") } );

No comments:

Post a Comment