Loading XML -- AS3 Skipping Files

Hello everyone,

this has me stumped. Flash seems to be skipping files. With this code:


        (other code.......)

            var xmlString:URLRequest = new URLRequest(testLoad);
            trace("*** LOADING *** : " + testLoad);
            xmlLoader = new URLLoader(xmlString);
            xmlLoader.addEventListener("complete", init);

        }
        
        
        private function init(event:Event):void{
            
            var courseXML:XML = XML(xmlLoader.data);
           trace("===========START================
"+courseXML+"
=======================END=====================

");
            addElements(currentNode, courseXML);

        } 


And I get this …

*** LOADING *** : course/course.xml
===========START================
<Section>
  <Page id="LOADX" nameTitle="LOAD THE X">
    <Section>sectionX</Section>
  </Page>
  <Page id="Course0" nameTitle="First Page">
    <Component type="Graphic" id="FirstGraphic">
      <Setup setting="x">0</Setup>
      <Setup setting="y">0</Setup>
      <Setup setting="width">650</Setup>
      <Setup setting="height">500</Setup>
      <Setup setting="source">eiwbackground.png</Setup>
      <Setup setting="putAtLayer">0</Setup>
    </Component>
    <Section>section1</Section>
  </Page>
</Section>
=======================END=====================


== PAGE: LOAD THE X ==
*** LOADING *** : course/sectionX/sectionX.xml
== PAGE: First Page ==
====== COMPONENT: FirstGraphic ======
*** LOADING *** : course/section1/section1.xml
===========START================

=======================END=====================


===========START================
<Section>
  <Page id="s1" nameTitle="Section 1">
    <Section>section1Pages</Section>
  </Page>
  <Page id="s2" nameTitle="Section 2">
    <Section>section2Pages</Section>
  </Page>
</Section>
=======================END=====================


== PAGE: Section 1 ==
*** LOADING *** : course/section1/section1Pages/section1Pages.xml
== PAGE: Section 2 ==
*** LOADING *** : course/section1/section2Pages/section2Pages.xml
===========START================

=======================END=====================


===========START================
<Section>
  <Page id="s2p1" nameTitle="Section 2">
    <Component type="Graphic" id="FirstGraphic">
      <Setup setting="x">0</Setup>
      <Setup setting="y">0</Setup>
      <Setup setting="width">650</Setup>
      <Setup setting="height">500</Setup>
      <Setup setting="source">eiwbackground.png</Setup>
      <Setup setting="putAtLayer">0</Setup>
    </Component>
  </Page>
</Section>
=======================END=====================


== PAGE: Section 2 ==
====== COMPONENT: FirstGraphic ======
dirloaded has the same amount as dirarray
true,true,true,true,true
course,sectionX,section1,section1Pages,section2Pages

As you can see, it says it is going to load a file, then it skips it, but it’ll load the last of the files. These are nested XMLs. Basically it looks at the first xml, and wherever <Section></Section> occurs it loads the string inside there as an xml. It reports that its loading the right string “testLoad”, but on init it says the file is empty and that there is no XML.