Question

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 the event possibilities fires after I POST data to my php...

Thanks, Yan

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top