I am having an issue with my photo gallery thumbs not showing up. http://www.libertyfc.org/
When you first land on the page the thumnails do not appear with the flash photo gallery. However, if you refresh the page, they show up.
I have reviewed my code and can’t seem to find anything wrong. Any one have any ideas why this might be happening?
XML loading code frame 1
photo_filename = new Array();
photo_thumbnail = new Array();
photo_description = new Array();
photo_header = new Array();
photo_link = new Array();
photo_gallery = new Array();
photo_video = new Array();
filepath = "/photos/";
// Load the photos XML
var libertyFC_xml = new XML();
libertyFC_xml.ignoreWhite = true;
libertyFC_xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
photo_filename.push(nodes*.attributes.filename);
photo_thumbnail.push(nodes*.attributes.thumbnail);
photo_description.push(nodes*.attributes.description);
photo_header.push(nodes*.attributes.header);
photo_link.push(nodes*.attributes.storylink);
photo_gallery.push(nodes*.attributes.gallerylink);
photo_video.push(nodes*.attributes.video);
}
}
//libertyFC_xml.load(filepath + "vh_photos.xml");
libertyFC_xml.load("vh_photos.xml");
set and position thumbs frame 5
y_middle = Stage.height/2;
tn_group.tn._visible = false;
tn_group.setMask(tn_area);
tn_alpha_default = 100;
p = 0;
//trace("num of images in array = "+photo_thumbnail.length);
for (var i = 0; i<photo_thumbnail.length; i++) {
tn_group.tn.duplicateMovieClip("tn"+i,i);
tn_group["tn"+i].tn_pic.loadMovie(filepath+photo_thumbnail*);
trace(filepath+photo_thumbnail*);
filenames.text = filepath+photo_thumbnail*;
tn_group["tn"+i]._x = tn._x;
if (photo_video* == "") {
//tn_group["tn"+i].vid_cover._visible = false;
tn_group["tn"+i].arrow._visible = false;
}
//trace("video= "+photo_video*);
//original fla photos were 100x90
//tn_group["tn"+i]._y = i * 100;
//set spacing : new photos will be 85x51
tn_group["tn"+i]._y = i*60;
tn_group["tn"+i].tn_pic._alpha = 100;
tn_group["tn"+i].tn_no = i;
//mouse btn functions
tn_group["tn"+i].tn_button.onRollOver = function() {
this._parent.tn_pic._alpha = 100;
};
tn_group["tn"+i].tn_button.onRollOut = function() {
this._parent.tn_pic._alpha = tn_alpha_default;
};
tn_group["tn"+i].tn_button.onRelease = function() {
_root.p = this._parent.tn_no;
gotoAndPlay("start");
//trace("video= "+photo_video[p]);
if (photo_video[p] != "") {
video = photo_video[p];
gotoAndPlay("video");
}
};
/**/
}