Hi. I am having problems with XML.
I have this code which should read the XML
    snowflakes = 1;
    function loadXML(loaded) {
        if (loaded) {
            snowflakes = this.firstChild.childNodes.length;
        } else {
              trace("file not loaded!");
        }
    }
    xmlData = new XML();
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadXML;
    xmlData.load("avatars.xml");
    
   // Read number of nodes into text
   _level0.atext.text = snowflakes
What I would like to do is to use ANYTHING from XML  I get the this.firstChild.childNodes.length value out, but i can’t seem to be able to use it outside of the function loadXML ?? The same is with any other value  read from XML. Although i defined the variable outside the function, it doesn’t want to override it.
 I get the this.firstChild.childNodes.length value out, but i can’t seem to be able to use it outside of the function loadXML ?? The same is with any other value  read from XML. Although i defined the variable outside the function, it doesn’t want to override it.
Any hints please. Thanks for your help.