Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/04/2005, 08:10
sabina1986
 
Fecha de Ingreso: marzo-2005
Mensajes: 51
Antigüedad: 19 años, 1 mes
Puntos: 0
Galeria de imagenes

hola, si tenemos una galeria de imagenes en flash con el siguiente codigo, como hago para que cuente todas las imagenes que hay en una carpeta, por ejemplo; y por tanto sustituir la expresión en el numero determinado de imagenes (6)?
Código:
square._alpha = 0;
whichPic = 1;
next.onPress = function() {
	if (whichPic<6 && !fadeIn && !fadeOut) {
		fadeOut = true;
		whichpic++;
		input = whichPic;
	}
};
back.onPress = function() {
	if (whichPic>1 && !fadeIn && !fadeOut) {
		fadeOut = true;
		whichpic--;
		input = whichPic;
	}
};
_root.onEnterFrame = function() {
	if (square._alpha>10 && fadeOut) {
		square._alpha -= 10;
	}
	if (square._alpha<10) {
		loadMovie("../images/image"+whichPic+".jpg", "square");
		fadeOut = false;
		fadeIn = true;
	}
	if (square._alpha<100 && fadeIn && !fadeOut) {
		square._alpha += 10;
	} else {
		fadeIn = false;
	}
	if (input>6) {
		input = 6;
	}
		if (Key.isDown(Key.ENTER)) {
		fadeOut = true;
		whichpic = input;
	}
};
inputField.onKillFocus = function() {
	input = whichPic;
};