[flash 8]checking local folder contents

i have been juggling with this issue for some time now, and i haven’t quite been able to coming up with something to solve this problem.

this is an xml related matter.

i have my xml file like this:

<files>
<file name=“1” path=“1.swf” />
<file name=“2” path=“2.swf” />
<file name=“3” path=“3.swf” />
<file name=“4” path=“4.swf” />
</files>


a user here, stringy, has helped me whis this code for creating a hand-made list of the items:

//var declaration ==============================================================================
//
theXML = new XML();
theXML.ignoreWhite = true;
max = 40;
var boo = this;
nume = [];
cliparray = [];
desc = [];
aux = 0;
//
//xml load process - creating buttons ==========================================================
//
theXML.onLoad = function() {
    var nodes = this.firstChild.childNodes;
    //
    for (var i = 0; i<nodes.length; i++) {
        //
        nume.push(nodes*.attributes.name);
        desc.push(nodes*.attributes.descriere);
        //
        var myMC = boo.createEmptyMovieClip("myMC"+i, _root.getNextHighestDepth());
        myMC._x = 15;
        myMC._y = max;
        max += 25;
        //
        cliparray.push(myMC);
    }
    initload();
};
//
//loading the button ============================================================================
//
function initload() {
    _root.cliparray[aux].loadMovie("button.swf");
    checkLoad();
}
//
//checking if button has loaded and adding actions to it ========================================
//
function checkLoad() {
    onEnterFrame = function () {
        if (_root.cliparray[aux].myBtn) {
            _root.cliparray[aux].myName.myText.text = nume[aux];
            _root.cliparray[aux].myBtn.ivar = aux;
            //
            delete this.onEnterFrame;
            if (aux<nume.length) {
                aux++;
                initload();
            }
        }
    };
}]

now…the tricky bit. in my local folder, i have only “1.swf” and “2.swf”, and thus, i want the code only to load the xml nodes that have the “x.swf” attribute corresponding with an existing file.

how can i do this?

cheers

edit: here are the files you’ll need how the code works