Implement as3 part of EventDispatcher and fix bug in EventDispatcher.js