src/shims/moxie/js/moxie-swf.js
function(type, fn, priority, scope) {
				var self = this, list;
				
				type = Basic.trim(type);
				
				if (/\s/.test(type)) {
					// multiple event types were passed for one handler
					Basic.each(type.split(/\s+/), function(type) {
						self.addEventListener(type, fn, priority, scope);
					});
					return;
				}
				
				type = type.toLowerCase();
				priority = parseInt(priority, 10) || 0;
				
				list = eventpool[this.uid] && eventpool[this.uid][type] || [];
				list.push({fn : fn, priority : priority, scope : scope || this});
				
				if (!eventpool[this.uid]) {
					eventpool[this.uid] = {};
				}
				eventpool[this.uid][type] = list;
			}
function(type, fn, priority, scope) {
				var self = this, list;
				
				type = Basic.trim(type);
				
				if (/\s/.test(type)) {
					// multiple event types were passed for one handler
					Basic.each(type.split(/\s+/), function(type) {
						self.addEventListener(type, fn, priority, scope);
					});
					return;
				}
				
				type = type.toLowerCase();
				priority = parseInt(priority, 10) || 0;
				
				list = eventpool[this.uid] && eventpool[this.uid][type] || [];
				list.push({fn : fn, priority : priority, scope : scope || this});
				
				if (!eventpool[this.uid]) {
					eventpool[this.uid] = {};
				}
				eventpool[this.uid][type] = list;
			}
function ( type , fn , priority , scope ) { var self = this , list ; type = Basic . trim ( type ) ; if ( / \s / . test ( type ) ) { // multiple event types were passed for one handler Basic . each ( type . split ( / \s+ / ) , function ( type ) { self . addEventListener ( type , fn , priority , scope ) ; } ) ; return ; } type = type . toLowerCase ( ) ; priority = parseInt ( priority , 10 ) || 0 ; list = eventpool [ this . uid ] && eventpool [ this . uid ] [ type ] || [ ] ; list . push ( { fn : fn , priority : priority , scope : scope || this } ) ; if ( ! eventpool [ this . uid ] ) { eventpool [ this . uid ] = { } ; } eventpool [ this . uid ] [ type ] = list ; }
Register a handler to a specific event dispatched by the object

@method addEventListener
@param {String} type Type or basically a name of the event to subscribe to
@param {Function} fn Callback function that will be called when event happens
@param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first
@param {Object} [scope=this] A scope to invoke event handler in
Register a handler to a specific event dispatched by the object