Click to See Complete Forum and Search --> : Creating a variable XML source in a SWF file


kachina_music
03-15-2009, 04:20 PM
Hi everyone,
Ive just finished an Flash MP3 player, which uses XML to locate the songs.

I'd like to put this MP3 player on several pages of my website, and load a different set of songs for each page.

My question is how do I make the XML source in the SWF file change?
I suppose the Actionscript would define the XML source as a variable i.e


var loader:URLLoader = new URLLoader();
loader.load(new URLRequest(Variable XML));
loader.addEventListener(Event.COMPLETE, whenLoaded);


Then Javacript would be used in the HTML page to name the Variable XML
as whatever?

Is it as simple as this?
Thanks for any suggestions!

ryanlund
03-16-2009, 12:10 AM
Could possibly use a server side scripting language to create the xml code. Maybe pull the information from a database, convert it into xml, and then your swf file would call the page that creates the xml file and deal with it from there.

Ryan