flash as3 check event listener
问题 Is their a way to check if an event listener already exists to remove it? stage.addEventListener(MouseEvent.CLICK, clickdownfunction); Basically, I want to remove the listener, but sometimes it has already been removed, so I want to check if it exists and if it does, then remove it. Is this possible? 回答1: Check out the hasEventListener() function from https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/IEventDispatcher.html#hasEventListener() I am not really sure