title: as3: converting a txt file (string) to a tile-based array? using Tiled editor
body: <p>I am using Tiled to make tile maps.</p>
  
  <p>I save them as .txt, and level one is as follows:</p>
  
  <pre><code>[header]
  width=14
  height=8
  tilewidth=120
  tileheight=120
  
  [tilesets]
  tileset=Tileset.png,120,120,0,0
  
  [layer]
  type=Tile Layer 1
  data=
  2,2,2,2,2,2,2,2,2,2,2,2,2,2,
  3,1,1,1,1,1,1,1,1,1,1,1,1,3,
  3,1,1,1,1,1,1,1,1,1,1,1,1,3,
  3,1,1,1,1,1,1,1,1,1,1,1,1,3,
  3,1,1,1,1,1,1,1,1,1,1,1,1,3,
  3,1,1,1,1,1,1,1,1,1,1,1,1,3,
  3,1,1,1,1,1,1,1,1,1,1,1,1,3,
  2,2,2,2,2,2,2,2,2,2,2,2,2,2
  </code></pre>
  
  <p>How would I make the data turn into something like:</p>
  
  <pre><code>        mapArr = [
          [  0,  0,  0,  0,  0,  0,  0,  0],
          [  0,101,101,101,101,101,101,  0],
          [  0,101,  0,101,101,101,101,  0],
          [  0,101,101,101,101,  0,101,  0],
          [  0,101,101,101,101,101,102,  0],
          [  0,  0,  0,  0,  0,  0,  0,  0]
          ];
  </code></pre>
  
  <p>Thank you in advance</p>