Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/03/2011, 06:24
danieler87
 
Fecha de Ingreso: diciembre-2010
Mensajes: 47
Antigüedad: 13 años, 4 meses
Puntos: 0
Respuesta: Carrusel alfa con AS2

He modificado el codigo y hasta ahora funciona a medias...

//Definimos las variables
var alfa:Number=100;
var totalFotos:Number=5;
var fotoActual:Number=1;
var profundidad:Number=0;


carrusel();

function carrusel(){
onEnterFrame=function(){
if(fotoActual<=totalFotos){
decremento(this["foto_"+fotoActual]);
pasoAPrimerPlano(this["foto_"+fotoActual]);
}else{
fotoActual=1;
}
}
}

function decremento(clipActivo:MovieClip){
if(alfa>0){
clipActivo._alpha=alfa;
alfa=alfa-3;
}else{
fotoActual++;
alfa=100;
clipActivo._alpha=alfa;
//pasoAPrimerPlano(clipActivo);
}

}

function pasoAPrimerPlano(clipActivo:MovieClip) {
profundidad=0;
clipActivo.swapDepths(profundidad);

}

stop();