Flex dispatchEvent example
The example below demonstrates the working of flex dispatchEvent() method.
Method works like a driver that drives the event mentioned in its constructor.
This method is used to manually dispatch or run away an event. Method, to
dispatch any event on the component can be applied either with the
component's id or mouseOver
attribute. With mouseOver attribute the method will be used inside the mxml tags.
This means with and inside a control tag attribute, mouseOver the
method can be dispatched on any component.
Syntax for using the method
component's id.dispatchEvent(event_ type, boolean value, boolean
Inside the method constructor, the first
parameter is the event type specified that will be run or dispatch away by the dispatchEvent
the second and third parameter are optional parameters that accept boolean
values true and false.
Download the code
[an error occurred while processing this directive]