blu3
11-29-2007, 08:57 AM
When i am using HTTPService for Flex-PHP communication i set HTTPService's 'fault' property which handles error event. So basically if i have HTTPService set up like this:
<mx:HTTPService id="test" url="http://localhost/test/test.php" contentType="application/xml" useProxy="false" method="POST" fault="httpServiceError(event)">
</mx:HTTPService>
Then 'httpServiceError' method is fired in case of HTTPService error. What i would like to do in httpServiceError method is trace the id of the failed HTTPService. I tried with:
public function httpServiceError(evt:FaultEvent):void{
trace(evt.currentTarget.id);
}
But soon realized that FaultEvent doesn't conatin 'currentTarget' property so this failed. WHat's the way to find out id of the failed HTTPService?
thanks in advance,
best regards
<mx:HTTPService id="test" url="http://localhost/test/test.php" contentType="application/xml" useProxy="false" method="POST" fault="httpServiceError(event)">
</mx:HTTPService>
Then 'httpServiceError' method is fired in case of HTTPService error. What i would like to do in httpServiceError method is trace the id of the failed HTTPService. I tried with:
public function httpServiceError(evt:FaultEvent):void{
trace(evt.currentTarget.id);
}
But soon realized that FaultEvent doesn't conatin 'currentTarget' property so this failed. WHat's the way to find out id of the failed HTTPService?
thanks in advance,
best regards