1 Reply Latest reply on Jun 13, 2013 9:35 AM by Ned Murphy

    Multidimensional array

    prodigalmaster Level 2



      I have created a monstrosity of a multidimensional array in Actionscript 2:


      //(x, y, tile, overlay(type, rotation))
      var arrTileMap = new Array(new Array(), new Array(), new Array(), new Array(new Array(), new Array()));


      The first line is a comment of how it is meant to be organised, the second line is the declaration of the array and the third line is how I assume your reference the array.


      a) Would the array work and is that how you reference it?


      b) Is there a more sensible way of storing this information e.g. using multiple more  coherent arrays?


      This is because I need preferably 1 array but multiple are acceptable so that all information on the tile map can be stored and then saved somehow to a Shared Object.