View Full Version : How do I create an array from an XML file

03-20-2008, 12:21 PM
How do I create an array from an XML file.

< ?xml version='1.0' encoding='utf-8'?>
<song name="Pixel2Life Soundtrack 01" file="music/despair.mp3" >
</song><song name="Twodded Soundtrack 01" file="music/forest.mp3" >

Usually I create the array manually.

var songs:Array = ["smusic/despair.mp3", "music/forest.mp3"];

03-20-2008, 01:44 PM
I don't know much about flash/xml, but I guess your are trying to achieve something like this. http://www.*******************/?item=jw_flv_media_player, the source is also available:thumbsup:

03-20-2008, 08:42 PM
thx but I don't want to go that complex, I just dont want to have to change the .fla file to change the music

03-20-2008, 08:54 PM
Hey nikos101, all that you neded to do in this case is just edit a sample xml file(comes along with the zip) to point to your song files.