[osflash] Arrays and Objects on the Server Side

Adir Iakya adir at me.com
Mon Dec 1 15:30:10 PST 2008


Thanks for the help guys :)

It really helped!

btw, the way i found to deal with Objects is to use getAMFData() on  
the single variable the function i executed with, and then using an  
associative array to get to the elements.

something like this:

function doSomething($theeventordatafromclient) {
	$someelement = $theeventordatafromclient->getAMFData();
	$someelement['somethingintheobject'];
}

Adir I.



On Dec 1, 2008, at 4:22 AM, Evert | Rooftop wrote:

> Hey Adir,
>
> Regular arrays translate to regular php arrays, so you should be  
> able to simply 'foreach' through it..
>
> Flex's ArrayCollection translates to SabreAMF_ArrayCollection..
> The third argument in the callback example ($data) will give you the  
> exact arguments coming from flash. There's no need to decode  
> anything, as this should have been done for you.
>
> So if you could post an example of what you're trying yourself, that  
> would really help narrow down the problem.
>
> SabreAMF also has a mailing list, which might be a bit more  
> appropriate for your questions:
> http://osflash.org/mailman/listinfo/sabreamf_osflash.org
>
> Hope it helps!
> Evert
>
> On 30-Nov-08, at 6:01 PM, Adir Iakya wrote:
>
>> Hi All,
>>
>> I'm having a problem sending arrays or objects from FLEX3 to the  
>> server side (my system is working, i got the gateway running ok,  
>> and it calls to the right methods).
>>
>> Sending from the PHP side to client is working cool (I'm using  
>> SabreAMF_ArrayCollection for that, works like charm).
>>
>> Now lets say i want to send this to the server:
>>
>> var names : Array = new Array( "Ana", "Kate", "John" );
>>
>> and to foreach it. which SabreAMF function help me to do that?
>>
>> Same question about objects, i know how to send it to the server,  
>> but i don't know how to parse/decode/whatever it on the PHP side so  
>> i can use it.
>>
>> If anyone can paste an example, that would be awesome :-)
>>
>> Thnx,
>>
>> AI
>> _______________________________________________
>> osflash mailing list
>> osflash at osflash.org
>> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org




More information about the osflash mailing list