# XML or AS?

**URL:** <https://forum.kirupa.com/t/xml-or-as/302957>\
**Category:** flash\
**Created:** [January 11, 2010, 2:06pm UTC](https://forum.kirupa.com/t/xml-or-as/302957 "2010-01-11T14:06:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maqrkk](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@Maqrkk](https://forum.kirupa.com/u/Maqrkk)\
**Post date:** [January 11, 2010, 2:06pm UTC](https://forum.kirupa.com/t/xml-or-as/302957/1 "2010-01-11T14:06:50Z")

</div>

Hey all,

I’m currently in the process of making a puzzle game, grid based. I was wondering how I could best store level data?

So for level 1 I have a red tile at [2,3] and a blue one at [5,6], and the playing field is 8 \* 8 empty tiles.  
But level 2 would have 2 red tiles, one blue, and a star shaped playing field, for example.  
I think I’ll keep playing field data separate from levelobject data (coloured tiles, traps, etc). My main question is, how best to save this? I know it’s possible in XML, but isn’t it equally possible in AS? What are the pros and cons of XML? If I make an XML in Flash, do I need to save it as a separate file? I’d like to keep it all in 1 swf, if possible.
