Hello people. I am making a small gallery of thumbnails, and am having a little problem here. I can position the first 12 thumbnails without problem, but the next thumbnails are just positioned in one spot (same spot as the main clip i duplicate). Here’s the code i use right now (picline is defining which line it should be put on 3 lines of 4 pictures):
for (var picLine = 0; picLine<3; picLine++) {
// How many pages do we need to show?
for (var totalPages = 0; totalPages<Number(this.pictureCount/maxThumb); totalPages++){
totalPagesMore = (totalPages+1);
trace("total pages More:"+totalPagesMore);
// How many pages do we need to show?
if (picLine==0 && i>=(1*totalPages-1) && i<=(3*totalPagesMore)){
_root["pictureModule"]["imgMC"]["clip_"+i*totalPagesMore]._x = (35*i*totalPagesMore); // position the movieclip
_root["pictureModule"]["imgMC"]["clip_"+i*totalPagesMore]._y = 0; // position the movieclip
}
if (picLine==1 && i>=(4*totalPagesMore) && i<=(7*totalPagesMore)){
_root["pictureModule"]["imgMC"]["clip_"+i*totalPagesMore]._x = (35*i*totalPagesMore-(140)); // position the movieclip second row
_root["pictureModule"]["imgMC"]["clip_"+i*totalPagesMore]._y = (T_height)/2+(spacer/2); // position the movieclip second row
}
if (picLine==2 && i>=(8*totalPagesMore) && i<=(12)*totalPagesMore){
_root["pictureModule"]["imgMC"]["clip_"+i*totalPagesMore]._x = (35*i*totalPagesMore-(140*2)); // position the movieclip second row
_root["pictureModule"]["imgMC"]["clip_"+i*totalPagesMore]._y = ((T_height)+spacer); // position the movieclip second row
}
// Add the buttons here (show if the totalpage number is > than 0)
}
}
You can se an online version here:
http://wroooar.kevinandersson.com