Ciao a tutti...
allora mi trovo in questa situazione
ho un xml
lo carico e sino al trace XMLdata è tutto ok, poi non succede più nulla come mai?
codice:
XMLData = new XML();
XMLData.load("cal.txt");
XMLData.onload = viewApp;
function viewApp () {
trace(XMLdata)
mainTag = new XML();
arrCal = new Array();
arrDate = new Array();
arrMsg = new Array();
mainTag = this.firstChild.nextSibling;
trace(mainTag)
if (mainTag.nodeName.toLowerCase() == "diary") {
arrCal = mainTag.childNodes;
for (i=0; i<=arrCal.length; i++) {
if (arrCal[i].nodeName == "cal") {
if ((arrCal[i].attributes.yearID == myNewYear) and (arrCal[i].attributes.monthID == myNewMonth)) {
arrDate = arrCal[i].childNodes;
for (j=0; j<=arrDate.length; j++) {
if (arrDate[j].nodeName == "date") {
diaryDate = arrDate[j].attributes.id;
myDiary = _root["Numbers" + diaryDate];
myDiary.gotoAndStop (3);
arrMsg = arrDate[j].childNodes;
for (k=0; k<=arrMsg.length; k++) {
if (arrMsg[k].nodeName == "msg") {
}
}
}
}
}
}
}
}
}
qui l'output del mio trace XMLdata
codice:
<?xml version="1.0" ?>
<diary>
<cal yearID="2006" monthID="4">
<date id="11">
<msg>Prova messaggio</msg>
</date>
</cal>
</diary>
idee...