Tema: Galeria
Ver Mensaje Individual
  #9 (permalink)  
Antiguo 20/09/2006, 10:40
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola rakeljuice:
Código para el primer frame:
Código:
info = new LoadVars();
info.load("imagenes_2.txt");
info.onLoad = function(leer) {
	if (leer) {
		fotos = new Array();
		for (i=1; i<=info.total; i++) {
			fotos[i] = this["foto"+i];
		}
		// Creamos un par de MovieClips_vacíos
		_root.createEmptyMovieClip("imagen1", 10);
		imagen1._x = 214;
		imagen1._y = 114;
		_root.createEmptyMovieClip("imagen2", 11);
		imagen2._x = 214;
		imagen2._y = 114;
		im = 1;
		imagen1.loadMovie("imagenes/"+fotos[im]);
		im++;
		imagen2.loadMovie("imagenes/"+fotos[im]);
		imagen2._alpha = 0;
		disol = 40;
		fijo = 70;
		count_d = 0;
		count_f = 0;
		curr_mc = 1;
		onEnterFrame = function () {
			if (curr_mc == 1) {
				count_f++;
				if (count_f>=fijo) {
					curr_mc = 2;
					cambio = "IN";
				}
			}
			if (curr_mc == 2) {
				if (cambio == "IN") {
					imagen2._alpha += 100/disol;
					if (imagen2._alpha>=100) {
						imagen2._alpha = 100;
						cambio = "FIJO";
						count_f = 0;
						im++;
						if (im == fotos.length) {
							im = 1;
						}
						imagen1.loadMovie("imagenes/"+fotos[im]);
					}
				}
				if (cambio == "FIJO") {
					count_f++;
					if (count_f>=fijo) {
						cambio = "OUT";
					}
				}
				if (cambio == "OUT") {
					imagen2._alpha -= 100/disol;
					if (imagen2._alpha<=0) {
						imagen2._alpha = 0;
						curr_mc = 1;
						count_f = 0;
						im++;
						if (im == fotos.length) {
							im = 1;
						}
						imagen2.loadMovie("imagenes/"+fotos[im]);
					}
				}
			}
		};
	}
};
El archivo imagenes.txt debe tener el código así:
foto1=foto1.jpg&foto2=foto2.jpg&foto3=foto3.jpg&fo to4=foto4.jpg&foto5=foto5.jpg&foto6=foto6.jpg&tota l=6

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/