...

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



nikos101
03-20-2008, 11:21 AM
How do I create an array from an XML file.


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

Usually I create the array manually.


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

abduraooft
03-20-2008, 12: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:

nikos101
03-20-2008, 07: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

abduraooft
03-20-2008, 07: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum