How to call removeEventListener when I don’t know the function which is the event handler?
How to call removeEventListener when I don’t know the function which is the event
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should create your own implementation of EventDispatcher. It’s sad but native IEventListener prototype doesn’t provide lots usefull methods.
There is a sample code of how that implementation would look like:
}
Otherwise as you mentioned that in your case you need to fire event only once than you can use such a handy framework like AS3 Signals (http://johnlindquist.com/2010/01/21/as3-signals-tutorial/)