In the code below, when responses come back from the server for the b and c calls, I have the impression that the resposes are randomly given to b and c. The geometry service doesn't know which object is the owner of each response.
Do I need to declare a GemetryService in B and in C?
Class A{
public static const SERVICE:GeometryService = new GeometryService(url);
}
Class B{
function callService(){
...
SERVICE.buffer(geometries, responseHandler);
}
function responseHandler(event:GeometryServiceEvent){
...
}
}
Class C{
function callService(){
...
SERVICE.buffer(geometries, responseHandler);
}
function responseHandler(event:GeometryServiceEvent){
...
}
}
Class D{
function method(){
var c:C = new C();
c.callService();
var b:B = new B();
b.callService();
}
}