I pasted in wrong line at the bottom, should be like this:
// ADD
fntController.addEventListener('onFinished', Delegate.create(this,
fontsLoaded));
// REMOVE DOESN'T WORK
fntController.removeEventListener('onFinished', Delegate.create(this,
fontsLoaded));
The problem is that I have used the Delegate in the addEventListener.
If I skip the Delegate on both the add and remove, then it works.
-but then I will have the wrong scope as well in the functions that gets
called ;(
So how do I remove a eventlistener when it has been added with a
delegate?
/ martin
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin
Klasson
Sent: den 27 oktober 2005 14:53
To: Flashcoders mailing list
Subject: [Flashcoders] removeEventListener not working?
Hi People.
I am using the EventDispatcher, and it works well with dispatching
events and all. But I cant remove them.
This is the line in which I add a listener
fntController.addEventListener('onFinished',
Delegate.create(this, fontsLoaded ));
this is the line to remove it, but it doesn't work:
fntController.removeEventListener('onFinished', this)
The fntController-instance is available, that I have traced out and so,
so it might be a simple error in the removeEventListener, but I cant see
it.
/ martin
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders