Posts tagged as 'Events'

Events in Actionscript 3

There was lots of positive feedback to yesterday’s post about my Actionscript 2 event class, so I decided to create an Actionscript 3 version. I added a lot of features while I was at it – listener priorities, preventDefault, stopNotification (aka stopImmediatePropagation), hasListeners, weak references, and to send the event as the single parameter when notifying listeners…

Events in Actionscript 2

I documented my technique for implementing event dispatching over on the Flash Game Code site. I’ve been using this method for a couple of years now and I think it’s a lot better than EventDispatcher or ASBroadcaster. Take a look if your interested. Comments are welcome below. The source code is available for free on flashgamecode.net under the MIT licence.