We're done!


Well, for now we're done.  But now that you have learned centralized event management using AS3, I bet some ideas are swirling around in your head about what more can be done with all this.   What I outlined above was merely one way of centralizing the events in Flash.  Can you think of others?  What about different priorities to the events? Different tiers?  Or maybe even resetting the event lists?  I'll cover these all in a follow up part II to this tutorial but till then You can find the link to the code used in this tutorial below as well as the complete EventManager class which might just have some of those extra features.

Drawbacks

It's important to note that this isn't a full-proof system.   Much like any other centralization of data it can eventually grow too cluttered.  With this clutter comes the possibility of collision when two events are named the same thing.  Nevertheless, there are some great uses for centralized event management and I provide it to you as just another tool in your toolbox.  Part II of the tutorial will also cover some of the drawbacks and ways to mitigate the potential problems.

Thanks for reading and please feel free to comment below or catch up to me in the forums.

The files used in this tutorial can be downloaded here:
http://pajamacode.pj-co.com/files/pajamalib_EventManager.zip