# I should soooooo know this, but I dont

**URL:** <https://forum.kirupa.com/t/i-should-soooooo-know-this-but-i-dont/244799>\
**Category:** Uncategorized\
**Created:** [November 21, 2007, 8:22pm UTC](https://forum.kirupa.com/t/i-should-soooooo-know-this-but-i-dont/244799 "2007-11-21T20:22:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Multi\_Task](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Multi\_Task](https://forum.kirupa.com/u/Multi_Task)\
**Post date:** [November 21, 2007, 8:22pm UTC](https://forum.kirupa.com/t/i-should-soooooo-know-this-but-i-dont/244799/1 "2007-11-21T20:22:53Z")

</div>

So instead of using xml to always import and since one doesnt always need to worry about file size and updating of flash files. How can you go about doing for loops but with a set array like so:

```auto

image = [];
images = ["1.jpg", "2.jpg", "3.jpg"];
imagesL = images.length;

for (i=0; i<imagesL; i++) {
    image* = ??????????????????? How can I set it like we do with value?
}  

```

XML version would be something like this:

```auto

function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
        }
        id = setInterval(preloadPic, 100);
    } else {
        content = "not loaded idiota!";
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("foobar.xml");

```

Basically I am trying to write all to (image) but without doing xml bring in method. Am I close I know I cant be that far off. Thanks in advance.
