A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] [AS3]Multidimensional array to XML or mySQL

  1. #1
    Senior Member Draxus's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    123

    resolved [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!

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    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.

  3. #3
    Senior Member Draxus's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    123
    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.

  4. #4
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    just found this:
    http://www.kirupa.com/forum/showpost...2&postcount=85
    i think that might be usefull

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center