This content has been marked as final. Show 4 replies
I am not an expert in PHP ... but the most common way to communicate from flash to any server side script is by using loadVars object .... have a look at it.....hope that will solve your problem
The way i do it:
PHP to flash- de-construct the array to aong string where the "|" character seperates each element in the array. than in flash i String.slice("|") the string and constract the array again. I dont know if thats the best way.
I strongly recommend you to use XML for data transfer instead of array.
You just need to make a simple xml parser and then send and load data in XML format.
parsing xml with php is also easy.
Sorry, I should have explained, we already use XML for data transfers (though I personally find JSON much nicer with less overhead). So, in this project, we use XML for data transfer between flash and PHP/Database. The reason I wanted this functionality, is because the flash array, in this one case, will be completely dynamic and the PHP doesn't need to know the contents of the array at all. In fact, in this instance, PHP is just the mechanism used for storing the data. Becuase of the nature of the data, I wanted to serialize the flash array, store it in the database as Bytecode, then when the flash needs that information again, I can pass back the same bytecode, which can then be unserialized back into the original array.
I think I've found the solution, the one I linked in the original post. I should know if it's as effective as I want it to be in the next couple of days when my flasher gives it a try. =]
Thanks for the responses. If anyone has any other ideas, please throw them in here.