59 for (i=0; i < count; i++) //count = number of children
60 {
61 if (localXML.children()[i].Name.toString != firstName ¬
&& localXML.children()[i].Surname.toString != surName ¬
&& localXML.children()[i].Company.toString != companyName)
62 {
63 tempXML.appendChild(localXML.children()[i]);
64 }
65 trace("tempXML: --> "+tempXML);
66 localXML = tempXML; <---- WRONG PLACE!!!
67 }
Hello all. I'm getting an error #1010 at line 61.
I did test each value individually and everyone is traced normally. The errors are:
- TypeError: Error #1010: at ... frame9:61
- The script is allways appending localXML.children()[0] and none else.
I can't see any error there. Any idea?
Thanks in advance.
SOLVED:
59 for (i=0; i < count; i++) //count = number of children
60 {
61 if (localXML.children()[i].Name != firstName ¬
&& localXML.children()[i].Surname != surName ¬
&& localXML.children()[i].Company != companyName)
62 {
63 tempXML.appendChild(localXML.children()[i]);
64 }
65 }
66 trace("tempXML: --> "+tempXML);
67 localXML = tempXML; <---- MOVED HERE!!!
I was updating localXML in with every loop!!! Shame!!!