So here is the problem:
I have a class called classA. here are a few EventListeners like MouseEvent.MOUSE_UP and MOUSE_DOWN. in this class happens some checks (like, is the object disabled etc). I dispatch this event, since I would like to use this in the document class. but only when the checks return true
protected function MouseUpHandler(me:MouseEvent) {
if (checks){
dispatchEvent(me);
}
}
another classB extends classA. here these EventListerners are overridden to add extra functionality
override protected function MouseUpHandler(me:MouseEvent) {
super.MouseUpHandler(me);
AddExtraFunctionalities();
}
in the main class, I make a new classB. and classB.addEventListener(MouseEvent.MOUSE_UP, MouseUpHandler);
however, when the MOUSE_UP happens, classA and classB become in a unending loop.
Error #2094: Event dispatch recursion overflow.
how should I do it right? without using custom events.
great thanks