Removing Anonymus Listener


/ Published in: ActionScript 3
Save to your folder(s)

Removing Anonymus Listener


Copy this code and paste it in your HTML
  1. myButton_btn.addEventListener(MouseEvent.CLICK,
  2. function(e:MouseEvent)
  3. {
  4. trace(e.currentTarget.name+" was just clicked!");
  5. //removing anonymous listener
  6. e.currentTarget.removeEventListener(e.type, arguments.callee);
  7. })

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.