# Load images in a row, how can i do it?

**URL:** <https://forum.kirupa.com/t/load-images-in-a-row-how-can-i-do-it/197709>\
**Category:** flash\
**Created:** [August 18, 2006, 12:45pm UTC](https://forum.kirupa.com/t/load-images-in-a-row-how-can-i-do-it/197709 "2006-08-18T12:45:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iso\_Rob](https://avatars.discourse-cdn.com/v4/letter/i/c68b51/32.png) [@Iso\_Rob](https://forum.kirupa.com/u/Iso_Rob)\
**Post date:** [August 18, 2006, 12:45pm UTC](https://forum.kirupa.com/t/load-images-in-a-row-how-can-i-do-it/197709/1 "2006-08-18T12:45:33Z")

</div>

How can i load ALL the images at once in a horizontal row with a small white gap between each image? This is the script i was using to load jpg’s from a folder, at the moment its loading the images in 1 after the other then going back to the start.

Please can someone help!!

```auto
delay = 3000;
//-----------------------
function loadPHP(loaded) {
    if (loaded) {
        imageArr = new Array();
        fl = this.filelist;
        imageArr = fl.split(",");
        total = imageArr.length-1;
        image = [];
        for (i=0; i<total; i++) {
            trace(files*)
            image* = imageArr*;
        }
        lv.load("http://rock.blueprintit.co.uk/test/images.php");
        firstImage();
    } else {
        content = "file not loaded!";
    }
}
phpData = new LoadVars();
phpData.onLoad = loadPHP;
phpFile = "images.php";
phpData.load(phpFile);
p = 0;
this.onEnterFrame = function() {
    filesize = picture.getBytesTotal();
    loaded = picture.getBytesLoaded();
    preloader._visible = true;
    if (loaded != filesize) {
        preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
        preloader._visible = false;
        if (picture._alpha<100) {
            picture._alpha += 10;
        }
    }
};
function nextImage() {    
    if (p<(total-1)) {
        p++;
        if (loaded == filesize) {
            picture._alpha = 100;
            picture.loadMovie(image[p], 1);
            desc_txt.text = description[p];
            picture_num();
            slideshow();
        }
    }
}

function firstImage() {
    if (loaded == filesize) {
        picture._alpha = 100;
        picture.loadMovie(image[0], 1);
        desc_txt.text = description[0];
        picture_num();
        slideshow();
    }
}
function picture_num() {
    current_pos = p+1;
    pos_txt.text = current_pos+" / "+total;
}
function slideshow() {
    myInterval = setInterval(pause_slideshow, delay);
    function pause_slideshow() {
        clearInterval(myInterval);
        if (p == (total-1)) {
            p = 0;
            firstImage();
        } else {
            nextImage();
        }
    }
}

```
