PHP Code:
Copy CodeThe code is as follows:
/*/flashservices/services/catalog.php */
Class Catalog {
var $products _array = Array ();
Constructor:contains the list of methods available to the gateway
function Catalog () {
$this->methodtable = Array (
"GetProducts" = = Array (
"description" = "Get List of products",
"Access" = "remote",
"Arguments" = ""//arguments could be optional, not tested
)
); End MethodTable
}
function GetProducts () {
Your code goes here
return $this->products_array;
}
}
ActionScript Code:
Copy CodeThe code is as follows:
#include "netservices.as"
Netservices.setdefaultgatewayurl ("http://yourserver.com/flashservices/gateway.php");
GW = Netservices.creategatewayconnection ();
Catalogremote = Gw.getservice ("Catalog", this);
Catalogremote.getproducts ();
Getproducts_result = function (Result) {
_root.products_results = result;
}
http://www.bkjia.com/PHPjc/323293.html www.bkjia.com true http://www.bkjia.com/PHPjc/323293.html techarticle PHP Code: Copy code code as follows:///flashservices/services/catalog.php */class Catalog {var $products _array = Array ();//Construc Tor:contains the list of methods Availab ...