This is an archived tutorial from the kirupa.com legacy collection. It covers software that may no longer be available, but it is kept online because the ideas still hold up.
With ActionScript 1.0, event handling was commonly handled through AsBroadcaster. AsBroadcaster is still available in ActionScript 2.0 (note the lowercase 's' when publishing to Flash 7 - using ASBroadcaster won't properly reference the object), but there's also a new object class that can replace AsBroadcaster which adds more functionality and and some new helpful behaviors. This is the EventDispatcher - a part of the object model implemented in the new Flash Components.
The complete EventDispatcher class is provided with Macromedia Flash MX 2004. It's defined in a folder in the Flash install directory so you are able to look it up if you wish to see how it works ( [Flash install]\[language]\First Run\Classes\mx\events ). I won't go into detail about it here, but if you know AsBroadcaster well enough, you should have no problem in using EventDispatcher. Included in that events directory are two other classes, UIEventDispatcher and LowLevelEvents can also be of use, even when not working specifically with components.
For more on using EventDispatcher, see The V2 Component Event Model Part 1- EventDispatcher from Phil Chung.
Though using EventDispatcher may be a nice alternative, you'll still maintain best performance when using AsBroadcaster.
That wraps up this tutorial. A huge thank you to all of you who buy kirupa's books, became a paid subscriber, watch the videos, and/or interact on the forums. Your support is what keeps writing like this online! 😇
This tutorial was written by senocular, also known as Trevor McCauley. He has been one of this community's most generous teachers since the early Flash days, and he is still around: find him on senocular.com and on the forums.
:: Copyright KIRUPA 2026 //--