XML and Flash ActionScript

below is the code snippet that i used to write data in xml file. but it dun seem to work. can any one assit me?? thanks.

my_test = new XML();
my_test.ignoreWhite = true;
function myload() {
trace(my_test.toString());
trace(my_test.firstChild.firstChild.childNodes[1]);
my_test.firstChild.firstChild.insertBefore(my_test.createElement(“NRIC”), my_test.firstChild.firstChild.childNodes[1]);
my_test.firstChild.firstChild.childNodes[1].appendChild( my_test.createTextNode(“S8282828Z”) );
trace(my_test);

http://www.kirupa.com/developer/actionscript/xmlfromflash.htm

That’s cause you haven’t actually written it to a file.

You need to store it, either in a SharedObject(client-side) or by using PHP or some other server-side language.

so u mean my coding is incompleted??? But I thought once I put the send command the data will be automatically uodated in the XML file??? my aim is very simple. I will be using only flash actionscript to write data to an XML file. that’s all. Is it possible?? pls give me a general guide.

thanks…

it is possible, but what he’s saying is that the Flash end of it can only build the xml object and then send that object to the server. On your server you need a php file which will write that data to a txt file.

I would do a search in this forum, and in the actionscript forum using the key words “writing+text+php+xml” in the search field. I’ll bet you come up with at least 4 convo’s we’ve had on this subject. If you have questions on one of those, and or how to impliment something, or obviously if you can’t find anything… write back.

*Originally posted by krist_foo *
**so u mean my coding is incompleted??? But I thought once I put the send command the data will be automatically uodated in the XML file??? my aim is very simple. I will be using only flash actionscript to write data to an XML file. that’s all. Is it possible?? pls give me a general guide.

thanks… **

using only Flash, it is impossible to write to an XML file on a server.

You can write it to the clients PC though… there’s a SharedObject tutorial in the tutorial section.