El tema es que asi como esta solo te muestra los thumbs y lo que yo quiero lograr es que una ves que hayan cargados se pueda hacer click sobre cada uno de ellos y asi poder ver la foto en grande.
Este es el codigo:
Código :
/// VARIABLES
pathC = "fotos/"
var baseurl = _url.substr(0,_url.lastIndexOf("/")+1);
img = 20;
b = new Array();
a = 1;
h_spacing = 70;
v_spacing = 55;
h_contador = 10;
v_contador = 2;
h_pos = -130;
v_pos = 5;
contador = 0;
thumbMC = new Array();
thumbGraficos = new Array();
for (i=1; i<=img; i++) thumbGraficos.push(baseurl+pathC+i+".jpg");
function CreateThumbContainers(){
var x, y, initObj, curr;
for (y=0; y<v_contador; y++){
for (x=0; x<h_contador; x++){
contador++;
initObj = {_x: h_pos + x*h_spacing, _y: v_pos + y*v_spacing};
curr = this.attachMovie("thumb_container", "tc"+contador+"_mc", contador, initObj);
curr.progress_mc._xscale = 0;
thumbMC.push(curr);
}
}
}
function thumbsCargarEnterFrame(){
var lod = this.loader_mc.getBytesLoaded();
var tot = this.loader_mc.getBytesTotal();
if (lod && tot){
var percent_loaded = lod/tot;
this.progress_mc._xscale = 100 * percent_loaded;
if (percent_loaded == 1){
cargarProxThumbs();
this.progress_mc._visible = false;
delete this.onEnterFrame;
}
}
}
function cargarProxThumbs(){
if (contador >= thumbGraficos.length) return false;
var imgURL = thumbGraficos[contador];
thumbMC[contador].loader_mc.loadMovie(imgURL);
thumbMC[contador].onEnterFrame = thumbsCargarEnterFrame;
contador++;
}
CreateThumbContainers();
contador = 0;
cargarProxThumbs();
/////
stop;
Yo trate de poner un:
Código :
this.onPress = function(){
trace("numero de foto");
}
Pero de esta forma siempre me sale el ultimo que se cargo.
Asique no se como hacer para lograr eso.
