PDA

View Full Version : when you think you are good....


THOR
09-05-2002, 05:50 AM
i am by no means a programmer, but i am trying to learn how to use xml with flash as well as using php to write to an xml file, but i have run into a problem

using an xml and flash book I have, i created this function

function submit(person, body_text, header){
text="<" +person+ ">" + "<date>" + date + "</date>" + "<header>" +"<![CDATA[" + header + "]]>" + "</header>" + "<body><![CDATA[" + body_text + "]]></body>" + "</" +person+ ">";
xmlText= new XML(text);
trace(xmlText.toString());
}

when called it grabs text from input boxes, and places them within the text variable creating xml, which works well when

trace(text); //looks just like xml when traced

but when I change "text" into xml as seen by
xmlText=new XML(text);

it picks up an Object prototype i used for other purposes. not even involved in the function.

hopefully this is readable, and I am making sense

any help would be great,

THOR
09-05-2002, 07:28 PM
if this isnt understandable please let me know, i can always send the fla as well. although my flash development is a little unorthodox.

please help :(

THOR
09-05-2002, 11:09 PM
nevermind, got rid of the prototype and finally got it to work,