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!!
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();
}
}
}