Hi,
I have created a gallery that pulls from an php file. standard stuff:
var getImages = new LoadVars();
getImages.onLoad = function(ok) {
if (ok) {
var i = 0;
image = [];
thumbnails = [];
description = [];
backgrounds = [];
total = 0;
//check to see if images are loaded
if (this["image"+i] != undefined) {
if (this["thumb"+i] != undefined) {
trace("Files Loaded");
}
}
// loop through the loaded variables
while (this["image"+i] != undefined) {
while (this["thumb"+i] != undefined) {
image* = (this["image"+i]);
thumbnails* = (this["thumb"+i]);
trace(image*);
trace(thumbnails*);
backgrounds* = "images/gallery/thumbBG.jpg";//loads the same image every time
description* = "";//temporary fix to hide descriptions till we figure out how to load them dynamicaly.
thumbnails_fn(i);
thumbnails_fnR(i);
thumbnails_fnBR(i);
thumbnails_fnBG(i);
++i;
total++;
trace("total = "+total);
}
}
firstImage();
}
};
//working directory
//getImages.load("get_images.php");
the php output that it is pulling is:
&image0=_gallery/01.jpg
&image1=_gallery/03.jpg
&image2=_gallery/04.jpg
&image3=_gallery/05.jpg
&image4=_gallery/06.jpg
&image5=_gallery/07.jpg
&image6=_gallery/08.jpg
&image7=_gallery/09.jpg
&image8=_gallery/10.jpg
&image9=_gallery/11.jpg
&image10=_gallery/12.jpg
&image11=_gallery/13.jpg
&image12=_gallery/14.jpg
&image13=_gallery/15.jpg
&image14=_gallery/16.jpg
&image15=_gallery/17.jpg
&image16=_gallery/18.jpg
&thumb0=_gallery/_thumbs/thumb_01.jpg
&thumb1=_gallery/_thumbs/thumb_03.jpg
&thumb2=_gallery/_thumbs/thumb_04.jpg
&thumb3=_gallery/_thumbs/thumb_05.jpg
&thumb4=_gallery/_thumbs/thumb_06.jpg
&thumb5=_gallery/_thumbs/thumb_07.jpg
&thumb6=_gallery/_thumbs/thumb_08.jpg
&thumb7=_gallery/_thumbs/thumb_09.jpg
&thumb8=_gallery/_thumbs/thumb_10.jpg
&thumb9=_gallery/_thumbs/thumb_11.jpg
&thumb10=_gallery/_thumbs/thumb_12.jpg
&thumb11=_gallery/_thumbs/thumb_13.jpg
&thumb12=_gallery/_thumbs/thumb_14.jpg
&thumb13=_gallery/_thumbs/thumb_15.jpg
&thumb14=_gallery/_thumbs/thumb_16.jpg
&thumb15=_gallery/_thumbs/thumb_17.jpg
&thumb16=_gallery/_thumbs/thumb_18.jpg
If for some reason (nice way of saying the people maintaining this are not computer peeps and prolly will name things poorly, or forget to upload or something)… if for some reason it cannot find a thumbnail, is there anyway to make flash use a default thumbnail image in its place?
Any help is appreciated.
Nikneven