AS1 version of EventDispatcher

Don’t know if I’m allowed to post, so rather than be sorry later, I’ll just explain what I did as it’s pretty easy to repeat.

Manager needed to compile app last week, so I had to convert all the AS2 to AS1. The main issue was EventDispatcher… <strike>he</strike> she was written in a pattern/manner that I was not familiar with. So, I just started hacking to see what worked.

I first put everything on _global, instead of the functions in a class definition. Since the majority of the methods were static (Singleton’ish?), I just put those methods straight on the classes, AS1 style (_global.EventDispatcher.initialize).

Second, I deleted all the first 4 lines in the initialize function.

So far, <strike>she</strike> he works great!

3 Replies to “AS1 version of EventDispatcher”

Comments are closed.