|
-
Senior Member
[RESOLVED] [AS3]Multidimensional array to XML or mySQL
I've been trying to get an ingame level editor to externally store the multidimensional array that holds the level data, by whatever means possible... what would be the best method for this? I found amfphp and have been messing around with it forever on my local server... trying to use it to store the array in a mysql db, to no avail (not due to a specific problem sending the array, but a whole slew of problems simply getting amfphp to do much of anything correctly). Is amfphp a good choice for what I need? If so, does anyone know any decent current tutorials for it? Official docs seem non-existent. Should I be using XML? I have a basic understanding of mysql and php, but no experience whatsoever using them with flash.
Thanks!
-
my expierence with AMFphp is that esspecially arrays and booleans get interpreted differently.
myArray[0].x
becomes something like
myArray["0"]["x"]
in php- and if you get it from amf into flash or at least something along these lines. Php seems to be very messy with data types which is why its sometimes not so nice working with it. I can only speak of Flash 8 as1/2 as that was the last project I worked with amfPhp
but have you tried sending actually the 3 dimensional array? or a complex object? what was it before and what did you got back on the php side. I am sure there are workaround converting php type-less conversion back to something usefull.
-
Senior Member
Thanks for the suggestion, I ended up just using URLLoader, a simple php script and XML... manually building an XML document from the array to append when saving, and building an array from the XML when loading. I dunno if it's the best method but it works well for what I needed.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|