all groups > flash actionscript > july 2004 >
You're in the

flash actionscript

group:

How do I remove an EventListener?



How do I remove an EventListener? Pong The Greek
7/31/2004 1:43:42 PM
flash actionscript: Hello,

I am having a problem removing the below eventListener:

var myListenerGrid = new Object();
myListenerGrid.change = function(event1) {

_root.clickedid = event1.target.selectedItem.MODEL;
_root.model.text=clickedid;
_root.AcqGrid.removeAllColumns();
_root.DetailGrid.removeAllColumns();
_root.service.getopWarebyMod(_root.article.text, _root.model.text);
trace("The selection has changed to "+clickedid);
};
AcqGrid.addEventListener("change", myListenerGrid);



How can I remove it?

Many Thanks,
Re: How do I remove an EventListener? Kenny WH
7/31/2004 4:45:37 PM
You can remove a listener from something just like this.

AcqGrid.removeListener(myListenerGrid);

Dose that work for what your trying to do?

Re: How do I remove an EventListener? Pong The Greek
8/1/2004 12:18:26 AM
Thnaks for your reply.

I have tried AcqGrid.removeListener(myListenerGrid);
but it won't work...

Everytime I click in the Grid the event1 function runs even if I run
AcqGrid.removeListener(myListenerGrid);

Any other suggestions?

Thanks in advance.
AddThis Social Bookmark Button