package net.gerhut.eventUtils { import flash.events.EventDispatcher; public class OnceEventDispatcher { public static function add(eventDispatcher:EventDispatcher, type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void { var onceListener:OnceListener = new OnceListener(eventDispatcher, type, listener, useCapture); eventDispatcher.addEventListener(type, onceListener.