2 Replies Latest reply on Jul 10, 2007 2:07 PM by pinheirobr

    loadMovie XML problem ( _root, _parent or this ???)

    pinheirobr
      I am having problems loading an xml file from an swf. I have a dynamic calendar that I am using. I am loading the calendar.swf inside my parent.swf using the ; loadMovie("calendar.swf", "loadstage"); I have worked out all issues except the xml file that the calendar.swf calls for is not loading. It works fine when the swf is published on its own.
      I does not work when the swf is loaded in the parent.swf.

      HELP ME, PLEASE !!!!! THANK YOU VERY MUCH!!!!


      THE ACTION SCRIPT !!!

      XMLData = new XML();
      XMLData.load("cal.xml");
      XMLData.onload = viewApp;
      function viewApp () {
      mainTag = new XML();
      arrCal = new Array();
      arrDate = new Array();
      arrMsg = new Array();
      mainTag = this.firstChild.nextSibling;
      if (mainTag.nodeName.toLowerCase() == "diary") {
      arrCal = mainTag.childNodes;
      for (i=0; i<=arrCal.length; i++) {
      if (arrCal .nodeName == "cal") {
      if ((arrCal
      .attributes.yearID == myNewYear) and (arrCal .attributes.monthID == myNewMonth)) {
      arrDate = arrCal
      .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") {
      }
      }
      }
      }
      }
      }
      }
      }
      }



      function dispMsg (msgYear, msgMonth, msgDate) {
      _root.mc_msgtxt.txt_msg = "";
      pointNum = 0;
      msgYear = _root.MyNewYear;
      msgMonth = _root.MyNewMonth;
      msgDate = _root.clickedDate;
      mc_ViewClickedDate.viewClickedDate = msgDate + " " + MonthNames[msgMonth] + " " + msgYear
      if (mainTag.nodeName.toLowerCase() == "diary") {
      arrCal = mainTag.childNodes;
      for (i=0; i<=arrCal.length; i++) {
      if (arrCal .nodeName == "cal") {
      if ((arrCal
      .attributes.yearID == msgYear) and (arrCal .attributes.monthID == msgMonth)) {
      arrDate = arrCal
      .childNodes;
      for (j=0; j<=arrDate.length; j++) {
      if (arrDate[j].nodeName == "date") {
      if (arrDate[j].attributes.id == msgDate) {
      arrMsg = arrDate[j].childNodes;
      for (k=0; k<=arrMsg.length; k++) {
      if (arrMsg[k].nodeName == "msg") {
      pointNum += 1;
      _root.mc_msgtxt.txt_msg += pointNum+ ". " + arrMsg[k].firstChild.nodeValue + newline;
      }
      }
      }
      }
      }
      }
      }
      }
      }
      }