GoodBoyDigital/pixi.js — pull request #1138 by edankwan (2014-11-07 17:17:11+00:00)
Title: fix eventTarget emit bug

Related issue: https://github.com/GoodBoyDigital/pixi.js/issues/1131

http://jsfiddle.net/rz553zr3/

Before:
````js
var listeners = this._listeners[eventName],
length = listeners.length,
fn = listeners[0],
i;

for(i = 0; i < length; fn = listeners[++i]) {
//call the event listener
fn.call(this, data);
````
If the callback function included a off() call of the event, the listeners variable will be updated and the for loop call will be messed up.