/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** Adds a responder to an Array of responders. */ public function addResponder(responder:IResponder):void { if(responder == null) return; for each(var responderInList:IResponder in _responders) { if(responderInList == responder) return; } _responders.push(responder); } /** Removes a responder from an Array of responders. */ public function removeResponder(responder:IResponder):void { if(responder == null) return; for(var i:int=0; i < _responders.length; i++) { if(_responders[i] == responder) { _responders = _responders.splice(i, 1); } } }
Comments
