# \[flash 8\]checking local folder contents

**URL:** <https://forum.kirupa.com/t/flash-8-checking-local-folder-contents/224879>\
**Category:** flash\
**Created:** [May 6, 2007, 6:07pm UTC](https://forum.kirupa.com/t/flash-8-checking-local-folder-contents/224879 "2007-05-06T18:07:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mastermode](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@mastermode](https://forum.kirupa.com/u/mastermode)\
**Post date:** [May 6, 2007, 6:07pm UTC](https://forum.kirupa.com/t/flash-8-checking-local-folder-contents/224879/1 "2007-05-06T18:07:35Z")

</div>

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:

```auto
//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

> **[Share files and collaborate on creative projects](https://www.hightail.com/)**
>
> Hightail is the best way to collaborate on creative projects. Easily send and share large files securely and get feedback in one place. Sign up for free.
