I am trying to create a preloader that will preload the images all at once that are in my XML gallery. I can get it to preload the swf but not the images that are in the /photos folder. This is the gallery, and the photos are named photo1.jpg thru photo5.jpg.
photo_xml.onLoad = function() {
gallery_th.html = true;
gallery_th.htmlText = “<p align=“center”></p>”;
Photos_Gallery(0);
};
global.Photos_Gallery = function(justdoit) {
var photos = photo_xml.firstChild.childNodes;
var p_thumbs = photo_xml.firstChild.attributes.thumbs, p_photos = photo_xml.firstChild.attributes.batephotos;
var i = justdoit;
for (var l = 0; l<lines; l++) {
for (var c = 0; c<columns && i<photos.length; c++, i++) {
var thumb = gallery_th.createEmptyMovieClip("thumb"+i, i);
PhotoAlbum.thumbs.push(t);
thumb._y = la_th;
thumb.createEmptyMovieClip(“photos”, 1);
thumb.photos.loadMovie(p_thumbs+"/"+photos.attributes.thumb);
thumb.dimensions = photos*.attributes;
thumb.onRelease = function() {
gallery_photo._parent.Bateman.unloadMovie();
gallery_photo.dimensions = this.dimensions;
gallery_photo.onEnterFrame = function() {
this._width += (this.dimensions.width-this._width)/3;
this._height += (this.dimensions.height-this._height)/3;
gallery_th._x = this._x+(this._width/2)+5;
gallery_th._y = this._y-(this._height/2);
if (Math.round(this._width) == Math.round(this.dimensions.width) && Math.round(this._height) == Math.round(this.dimensions.height)) {
this._width = this.dimensions.width;
this._height = this.dimensions.height;
delete this.onEnterFrame;
this._parent.createEmptyMovieClip(“Bateman”, 1);
this._parent.Bateman._x = this._x-(this._width/2);
this._parent.Bateman._y = this._y-(this._height/2);
this._parent.Bateman.loadMovie(p_photos+"/"+this.dimensions.gallery_bw);
}
};
};
}
}
};
photo_xml.load(“photos.xml”);
stop();
Any suggestions, I have tried two tutorials online but didn’t work, my arrays couldn’t find the images i think.
-Josh