Loading XML, how does it work?

I’ve been learning about XML in AS2 lately, and I’ve started the “Displaying XML Data in Flash” tutorial, but there is something i don’t get:

function                   loadXML(loaded)                   { if (loaded)                     { _root.inventor                       = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;                       _root.comments                       = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;                       name_txt.text                       = _root.inventor;                       comment_txt.text                       = _root.comments;                       }                        else {   trace("file                        not loaded!");}}                    xmlData =                   new XML();                   xmlData.ignoreWhite                   = true;                   xmlData.onLoad                   = loadXML;                   xmlData.load("inventors.xml");

How does Flash know the XML is loaded? I don’t see how Flash tells the loadXML function it’s loaded. Where is Flash told what “loaded” is equal to? Can anyone help me out please?