Skip to content

Instantly share code, notes, and snippets.

@benmills
Created December 22, 2009 17:40
Show Gist options
  • Save benmills/261895 to your computer and use it in GitHub Desktop.
Save benmills/261895 to your computer and use it in GitHub Desktop.
// pass in object where key is child you want to bind an event to and value is the function being bound
public function bind(args:Object):void {
for(var i:String in args) if (this[i]) this[i].addEventListener(MouseEvent.CLICK, args[i]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment