Hi,I have one simple question.I know how to dipatch events from the some of the components files to the main App file,but I don't know how to do the opposite?
I have an HTTPService with id = "getData" in some component file and I want to dispatch an event that will send it getData.send();
Is this possible,and it if is how?
It is possible but not a recommended practice.
Worst case you proxy out methods on your components and call directly:
My 2 cents are too look into MVC architecture and have the service inside a command which gets treiggered by a controlled which reacts to your event dispatched by the view.
So if I have the function;
public function sendData()void:
in some mxml component,how to use it in the main mxml component?