开发者

onResult HTTPService

开发者 https://www.devze.com 2023-01-13 20:17 出处:网络
I have a HTTPService: <mx:HTTPService id=\"scoreService\" url=\"http://\" method=\"POST\" result=\"onResult(event)\">

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消