Saving Flash to XML File

I’m trying to save a variable from one flash file to server in form of a XML node, so that i can refer this xml file node in another flash file. can any one tell me how to save the XML file using flash

thanks for the help?

:sen:

Sorry for being a pain in the b*tt but I’m still having problems here.

The thing is I want to create an XML guestbook, since I don’t have an mysql database.

So I read in the contents of the xml-file into flash and I have a few fields that the user can fill out.
If the user clicks a submit button, would I need to send the entire xml object to php?

I tried this


// **** Load XML ****************************
my_XML = new XML();
my_XML.ignoreWhite = true;
my_XML.onLoad = function(success){
	if (success){
		myText = _root.container.myField;
		myText.autosize = "center";
		numItems = my_XML.firstChild.childNodes.length;
		numFields = my_XML.firstChild.firstChild.childNodes.length;
		for (i=0; i< numItems; i++){
			for (j=0; j< numFields; j++){
				myText.text += my_XML.firstChild.childNodes[ i].childNodes[j].firstChild.nodeValue + "
";
			}
			myText.text += "
";
		}
	}
	else{
		trace("Er is een fout opgetreden bij het laden van de XML file");
	}
}
myIdentifier=Math.round(Math.random()*10000);
my_XML.load("test.xml?uniq="+myIdentifier);

myButton.onRelease = function(){
	my_XML.send("processXML.php"); 
}

where processXML.php contains the code you posted above.

I tried to write it do a different xml-file than the file which is being read into flash, but I end up with this file being totally empty so it looks like something goes wrong with the sending of the xml-file.

Wouldn’t it be possible to just send the text that the user inputs as ‘normal’ variables and make the php script so that it appends this as xml to the original file.

Sorry if I don’t make any sense, but I’m quite new to serverside scripting.

Hope you can help

Thanks to all your effort…

can u also post the xml file? im also in the process of thinking for a solution and i cant seem to trace it without the xml file…thanks!!!

http://www.kirupa.com/web/xml_guestbook.htm