that is how you send a variable to your method to return the desired data, I hope that helps.Code:var pc1:PendingCall = _service.yourMethod(_global.variable);
-Caraldur
This is really basic, but I forgot how to do it and am on a tight deadline.
Can some kind soul help me out please.
I need to know how to pass a global variable in Flash to the service class in AMFPHP gateway.
I have a list, and upon clicking the lists, i want to retrieve the content via my viewContent.php class based on the ID of the item clicked on.
Thanks alot!
that is how you send a variable to your method to return the desired data, I hope that helps.Code:var pc1:PendingCall = _service.yourMethod(_global.variable);
-Caraldur
I haven't understood
I have a simple service
PHP Code:<?php
class className
{
public function __construct()
{
mysql_connect("xxx","xxx","xxx);
mysql_select_db("myDB");
}
/**
* Retrieves data
* @returns id description
*/
function getData($rq)
{
return mysql_query("SELECT id, description FROM myTable WHERE id=$rq");
}
}
?>
On my Flash document
Code:import flash.net.*; var gw:NetConnection = new NetConnection(); gw.connect("http://xxx/amfphp/gateway.php"); var res:Responder = new Responder(onResult, onFault); function onResult(responds:Object):void { // parse the ArrayCollection var t:Array = responds.serverInfo.initialData; for (var i:uint=0; i<t.length; i++) { trace(t[i][0]); } } function onFault(responds:Object):void { for (var i in responds) { trace(responds[i]); } } gw.call("className.getData", res);
This doesn't work because an argument is missing (the $rq)
...some ideas?
Some time I'd better read the help files before posting
gw.call("Class.method", responder, params);
Anyone have any troubleshooting ideas for Service capture on mac os x, intel? it isnt catching data from the Flash IDE when testing remoting.
thanks.
Bookmarks