# Loading data into flash array from an XML file

**URL:** <https://forum.kirupa.com/t/loading-data-into-flash-array-from-an-xml-file/227027>\
**Category:** flash\
**Created:** [May 26, 2007, 2:15am UTC](https://forum.kirupa.com/t/loading-data-into-flash-array-from-an-xml-file/227027 "2007-05-26T02:15:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [May 26, 2007, 2:15am UTC](https://forum.kirupa.com/t/loading-data-into-flash-array-from-an-xml-file/227027/1 "2007-05-26T02:15:00Z")

</div>

Hi,

To keep things simple I will just ask the question verses explaining why I want this functionality.

Say I have:

var sString:String = “1,2,3,4,5,6”  
var aArray:Array = new Array(sString)

When I trace the aArray.length, obviously it is 1. What I would like is if aArray would see the string as if I did this:

var aArray:Array = new Array(“1”,“2”,“3”,“4”,“5”,“6”)

I understand that I could run a for loop on the string and with each iteration put in the data, but this seems sloppy, is there a better way?

Thanks,

waffe
