views:

48

answers:

1

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

+2  A: 

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.

adamcodes
"Default decoder could not decode result"
Yan
what was the solution? was it the url?
adamcodes