hey,
bascially all I am making is a console where someone can edit XML data. I’ve been working off the great tutorial for a flash XML news service but i’ve got a bit lost with it and I can’t get my program to save the data. It reads it from the XML fine but there’s some link lost between the Flash and it saving the data. Here’s my code and i’ve attached my working files.
If anyone can help me i’d be most grateful, I am new to xml and php you see :rambo: - I am no rambo.
all my main code:
function loadXML(loaded) {
if (loaded) {
descriptiontxt.text = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("secure/data.xml");
var save_script = "news_save.php";
EditNewsEntry = function(xmlData){
var entry = descriptiontxt.text
var TextNode = entry.firstChild.firstChild;
TextNode.nodeValue = entry;
}
SaveNews = function(xmlData){
descriptiontxt.Text = "<i>Saving and Loading...</i>";
xmlData.xmlDecl = ""; // fixes duplication bug
xmlData.sendAndLoad(save_script, xmlData);
}
‘save’ button code:
on (release) {
EditNewsEntry(xmlData);
}
the rest is attached, I just know my AS is missing something very vital.