AMFPHP is actionscript massage format php. it's easy to communicate with php.
This is the step for connect the amfphp.
private var gateway:String = "http://localhost/amfphp/gateway.php";
private var connection:NetConnection;
private var responder:Responder;
connection = new NetConnection;
responder = new Responder(onresult, onfault);
connection.connect(gateway);
connection.call("myphp.firstFun", responder, params1, params2);
here myphp is amfphp class name and firstFun is function name.
params1 and params2 is function params.
/** successful output responder **/
private function onresult(out:Object):void
{
trace("success output "+out);
}
/** error output responder **/
private function onfault(out:Object):void
{
trace("error output "+out);
}
...CHeeRS...
amfphp and mysql connection example source code is here
0 comments:
Post a Comment