Hi,
I've been trying to find a better way to handle working with multiple
httpservice requests that all need to complete before I run a function.
What I've been doing is something like this:
<mx:HTTPService id="s1" url="somewhere" result="s2.send()"/>
<mx:HTTPService id="s2" url="somewhere" result="s3.send()"/>
<mx:HTTPService id="s3" url="somewhere" result="s4.send()"/>
<mx:HTTPService id="s4" url="somewhere" result="s5.send()"/>
<mx:HTTPService id="s5" url="somewhere" result="somefunction()"/>
What I'd like to do is have a function I can call as part of the applications
creationComplete to run through all of them.
function initializeApp():void
{
s1.send();
s2.send();
s3.send();
s4.send();
s5.send();
somefunction();
}
I know that somefunction() would have to do a valid data check to make sure
that I had result data before manipulating it. Is there a best practices way
of doing this?
Thanks,
Bob