Saving and loading different xml´s?


I am working on an advanced slideshow player width seperate editor. The editor is based on the code for Kirupas great news editor: But in my slideshow editor i need to save and load different xml-files width different names. :puzzled:

In Flash the most important code looks like this:
var xml_file = “slides.xml”;
_global.xml_file_link = xml_file;
var save_script = “slides_save.php”;

var slides_xml = new XML();
slides_xml.ignoreWhite = true;
slides_xml.contentType = “text/xml”;
slides_xml.onLoad = function(success){
if (success){
else link_txt.text = “*** Error loading XML file ***”;


SaveSlides = function(slides_xml){
data_box.content_txt.htmlText = “<i>Saving and Loading…</i>”;
slides_xml.xmlDecl = “”; // fixes duplication bug
slides_xml.sendAndLoad(save_script, slides_xml);
RefreshSlides = function(slides_xml){
data_box.content_txt.htmlText = “<i>Loading…</i>”;
slides_xml.load(xml_file+"?"+new Date().getTime());

The php code:

$filename = “slides.xml”;
$raw_xml = file_get_contents(“php://input”);

print $raw_xml;

$fp = fopen($filename, “w”);
fwrite($fp, $raw_xml);

I belive the answer is to send a var to php insted of the static name “slides.xml” But i cant get anything to work. Anyone knowing what to do here!? Any help would be genious! :sure: