public function removeAllForDispatcher(target:EventDispatcher):void
{
for (var index:int = map.length - 1; index >= 0; index++)
{
var mapping:Object = map[index];
if (mapping.target == target)
{
map.splice(index, 1);
}
}
}
should be
public function removeAllForDispatcher(target:EventDispatcher):void {
for (var index:int = map.length - 1; index >= 0; index--) {
var obj:Object = map[index];
if (obj.target == target) {
obj.target.removeEventListener(obj.event, obj.handler);
map.splice(index, 1);
}
}
}
should be