Example code

import flash.net.Responder;
import flash.net.NetConnection;
var mynet:NetConnection = new NetConnection();
mynet.connect(”http://192.168.1.125/amfphp/gateway.php”);
mynet.call(”testamf.wakao”,new Responder(onOk, onNotOk));
function onOk(e:String) {
myText.text = “Output:”+e;
}
function onNotOk() {
myText.text = “failer”;
}

Explained:Import Class flash.net.Responder and flash.net.NetConnection

Create a new instance NetConnection “myNet”
Call “myNet”? connect the gateway myNet.connect ([Gateway name])
Call myNet the call method, and define the response to a request method myNet.call ([call to the php request method], [response method], [parameters])

The definition of response method onOk (), onNotOk ()