I have a HTTPService:
<mx:HTTPService id="scoreService" url="http://" method="POST" result="onResult(event)">
<s:request xmlns="">
<name>{..}</name>
<score>{...}</score>
</s:request>
</mx:HTTPService>
And a script for (event):
private function onResult(e:ResultEvent):void
{
if (e.result.status == true)
{
currentState='...';
}
else
{
Alert.show("...", "...");
}
}
The problem is that none of开发者_Go百科 the event possibilities fires after I POST data to my php...
Thanks, Yan
There isn't a real URL attribute in the HTTPService -- but I don't know if you edited it out or not. Try adding this to the HTTPService tag:
fault="mx.controls.Alert.show(event.fault.faultString)"
You should always have a fault handler too.
精彩评论