Just want to put the thumbnails in a movie clip, any ideas…
what am I doing wrong?
Not any thumbs are appearing, there is a mc on stage, there are images and thumbs, there is a xml_file…
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(ok) {
if (ok) {
parafrasis(gallery_xml);
} else {
trace("error");
}
};
gallery_xml.load("images.xml");
function parafrasis(gallery_xml) {
var galleryPictures = gallery_xml.firstChild.childNodes;
totalPictures = galleryPictures.length;
for (var i = 0; i<totalPictures; i++) {
var currentPicture = galleryPictures*;
var holder = thumbnails.createEmptyMovieClip("holding"+i, i);
col = 8;
row = 6;
wi = 100;
hi = 80;
cuenta = 0;
for (j=0; j<col; j++) {
for (k=0; k<row; k++) {
this["holding"+cuenta]._x = 20+wid*j;
this["holding"+cuenta]._y = 20+hi*k;
cuenta++;
}
}
inner = holder.createEmptyMovieClip("thumbnail_image", 0);
inner.loadMovie(currentPicture.attributes.thumbs);
holder.image = currentPicture.attributes.images;
holder.onRelease = function() {
images.loadMovie(this.image);
};
}
}
<images>
<picture title = "01"
thumb = "thumbs/01.jpg"
image = "images/01.jpg" />
The script works fine, but only for a row, that is why I implemented the other two loops the j and the k, and row and col, because I wanted a grid…but still don’t know what the problem is ::(: