0
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 }
大家好。我在第61行收到#1010錯誤。Flash/AS3:錯誤#1010
我確實測試了每個值,並且每個人都被正常跟蹤。的錯誤是:
- 類型錯誤:錯誤#1010:在... frame9:61
- 該腳本追加百達localXML.children()[0]再沒有別的。
我看不到任何錯誤。任何想法?
在此先感謝。
解決:
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!!!
我在每循環更新localXML!恥辱!!!
非常感謝喬希。我確實在for語句中放置了主XML(localXML = tempXML)的更新,並生成錯誤。我正確地調用節點。 (在這種情況下,我沒有使用屬性) – Sergio