Tengo un albm de fotos con este codigo
Código :
stop();
gran_mc._visible = false;
volver_btn._visible = false;
Imagen = function (link, gran) {
this.link = link;
this.gran = gran;
};
NewCell = function (numero, detalles) {
// Create a new cell
originalClip = _root.celda_mc;
newClip = originalClip.duplicateMovieClip("celda"+numero, numero);
// Set cell position and text fields
this.numero = numero;
if (numero<4) {
newClip._x = numero*125;
} else if (numero>=4 && numero<8) {
newClip._x = (numero-4)*125;
newClip._y = 100;
} else if (numero>=8) {
newClip._x = (numero-8)*125;
newClip._y = 200;
}
contenido = newClip.lugar_mc;
contenido.loadMovie(detalles.link);
newClip.onRelease = function() {
gran_mc.loadMovie(detalles.gran);
for (j=0; j<foto.length; j++) {
_root["celda"+j]._visible = false;
volver_btn._visible = true;
}
volver_btn.onRelease = function() {
for (j=0; j<foto.length; j++) {
_root["celda"+j]._visible = true;
gran_mc._visible = false;
}
};
};
};
//Les fotos han de ser de 120 de llargaria per 96 d'altura y la gran de 500 per 400
//Array per a fotos (Titul de la foto, lloc on esta,descripcio, lloc on esta la gran)
foto = new Array();
foto[0] = new Imagen("1.jpg", "1gran.jpg");
foto[1] = new Imagen("2.jpg", "2gran.jpg");
foto[2] = new Imagen("3.jpg", "3gran.jpg");
foto[3] = new Imagen("4.jpg", "4gran.jpg");
for (i=0; i<foto.length; i++) {
NewCell(i, foto[i]);
}
Lo dejo en Album
Funciona bien, pero cuando lo intento cargar para que se abra des de otro no salen las imagenes. Saben por qué puede ser?????
Lo abro con este codigo
Código :
b_btn.onRelease = function(){
album_mc.loadMovie("galeriaweb.swf");
}
Si quiren pueden incluirlo en la seccion de ejemplos
