I really hope someone can help me, because this problem is freakin killing me! I created an XML gallery for some images I’m putting on my portfolio site. The gallery reads the images from an XML file, and lays them out in rows, with 3 images in a row. The problem I am having is that if I have any rows that have less than 3 images in them, it will display a placeholder movie clip where the image that doesn’t exist is. For example: I have 5 images displaying, and they are layed out like this
[image][image][image]
[image][image][empty image]
Or as another example, if I have 7 images they display as follows:
[image][image][image]
[image][image][image]
[image][empty image][empty image]
What was supposed to happen (which seems to never happen they way you want to :asleep:) is that it will just display the images without adding extra empty movieclips.
Here’s the code I’m using if anyone is willing to take a look at it for me:
var galleryPictures = gallery_xml.firstChild.childNodes;
var thumb_count = 0;
numRows = Math.ceil(galleryPictures.length/3);
thumb_holder = this.attachMovie("staticGal_mc", "staticGal_holder", 9500);
.....
for(var k = 0; k < 3; k++){
for(var l = 0; l < numRows; l++){
var currPicture = galleryPictures[thumb_count];
...
currThumb_mc = thumb_holder.attachMovie("static_thumb","thumbs"+k+l,200+thumb_count);
currThumb_mc.createEmptyMovieClip("thumb_container",280+thumb_count);
currThumb_mc._x = -500 + (k * 95);
currThumb_mc._y = -25 + (l * 75);
currThumb_mc._alpha = 0;
.....
currThumb_mc.thumb_container.loadMovie(currPicture.attributes.thumb);
thumb_count++;
I hope someone can help, I’m SOOOOOOO stumped!
edit: I’m placing the images negative because I ease them onto the screen, that code isn’t in here though.