I can dispatch events from a custom components to the main file in Flex like that
[Event(name="onCreateRoute", type="Event")]... <mx:Button label="Plan Route" click="dispatchEvent(new Event('onCreateRoute'))"/>
<custom:CustomComponent onCreateRoute="CreateRoute(event);" />
but I can't understand how to do the opposite,dispatching event to the custom component from the main file.I know that I should use some kind of MVC or something,but that's all.
Retrieving data ...