PDA

View Full Version : Flash -> AMFPHP, Multiple Argument Problem


Grofit
04-28-2008, 01:50 PM
Hey!

Im trying to do something that i was hoping would be simple:

Example Flash Code

public function callService (Service:String, onSuccess:Function, onFailed:Function, Params:Object)
{
var res:Responder = new Responder(onSuccess, onFailed);
nc.call(Service, res, Params);
}


Example PHP Code

function example($intID, $strName)
{
.. Do Stuff
}


Now as the PHP file is requesting 2 arguments im a bit unsure as to how im supposed to lay out the Params object so PHP knows what the 2 arguments are...

So i could do something like:

Params["intID"] = 1;
Params["strName"] = "test";
callService ("exampleService.example", doYay, doNay, Params);


I hope this makes sense, if im being vauge or you want more information fire away!

Grofit
04-29-2008, 10:39 AM
Any advice would be great im stuck on this bit at the moment and cannot continue...

I just need to know how to format the parameters so the PHP service it calls knows that there are 2 arguments passed and what their values are...

Grofit
05-01-2008, 08:17 AM
Surely this isnt the hardest thing in the world yet on 2 MAJOR flash communities no one seems to have any idea how to do it, and i cant seem to find anything relating to it on the internet...

If its a case of you can only use 1 argument, thats fine... i can live with that, but surely it must support 2...

ANY and all information relating to this would be great...