Quick note : My actionscript skills are weak sauce... Im no monkey tho, so given the proper advice, I can figure things out:
So, we use SabreAMF to handle some AMF calls to our back end.
Things work nicely.
The callback server and actionscript side of things all work as expected.
The one issue we would like to resolve is:
As it stands now, when we need to return a set (array) of data we just concatenate it by doing something like this (on the php end):
return 'VALUE1|VALUE2|VALUE3';
And then on the actionscript side we do something like this:
var parts:Array=result.split('|');
/* parts[0] = VALUE1 , parts[1] = VALUE2 , parts[2] = VALUE3 */
The above works just fine, but I cant help but think there must be a cleaner way to do things.
We would like to do something as follows:
PHP End (SabreAMF):
return array('Param1'=>'Value1','Param2'=>'Value2','Param3'=>'Value3');
And have this data mapped to an array or object automatically on the actionscript side. It would seam logical that one could return arrays and have them mapped properly (and automatically, fingers crossed) on the actionscript side.
So, the question is as follows:
When using SabreAMF to handle actionscript AMF calls to a PHP based back end, is it possible to return an array and have actionscripts AMF handler automatically map the data set to and array (ideally) or object without using concatenation?
Concatenation seams like a bit of a hack.
Thanks!