you don't need to dispatch the event again based on condition,
try to make it something like this:
private function handleEvent(event:Event):void{
switch(condition){
case 1:
function1();
break;
case 2:
function2();
break
default:
defaultFunction();
break
}
}
HTH
Thanks,
Shaleen Jain
http://shaleenjain.blogspot.com
On Apr 13, 4:07 am, Sri <[email protected]> wrote:
> Let us assume that "Change" is the event type.
>
> go ahead and add different event listeners for same event type.
>
> Inside event listeners mention conditions based on your requirement.
>
> Will it works..?
>
> On Apr 11, 12:10 pm, Dharmendra Tolani <[email protected]>
> wrote:
>
> > I have added an event listener for a particular event, for e.g.
> > CollectionEvent.COLLECTION_CHANGE. Inside that event listener, based
> > on a certain condition, I want to call the default event handler for
> > that event. How is it possible? One way I have tried out is :
>
> > Inside the event listener :
>
> > If(Condition)
> > {
> > Remove event listener
> > dispatch event
> > add event listener again
>
> > }
>
> > This results in event overflow, which means that removing event
> > listener is not working. How to do it?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---