Foros del Web » Creando para Internet » Flash y Actionscript »

hacer clic y esperar a que alpha=100 para ejecutar acciones

Estas en el tema de hacer clic y esperar a que alpha=100 para ejecutar acciones en el foro de Flash y Actionscript en Foros del Web. Hola gente! Tengo un clip llamado bg que dentro tiene 5 clips que se llaman "one" "two" "three" "four" "five". Este clip tiene este AS ...
  #1 (permalink)  
Antiguo 15/12/2009, 12:04
 
Fecha de Ingreso: agosto-2008
Mensajes: 6
Antigüedad: 15 años, 7 meses
Puntos: 0
hacer clic y esperar a que alpha=100 para ejecutar acciones

Hola gente!
Tengo un clip llamado bg que dentro tiene 5 clips que se llaman "one" "two" "three" "four" "five".
Este clip tiene este AS para realizar una accion de fade in/out de los clips one two three four five:

[as]
onClipEvent (enterFrame) {
sinopsis = false;
//find alpha of new pic
picalpha = Math.round(getProperty(picnum, _alpha));
//find alpha of old pic
oldpicalpha = Math.round(getProperty(oldpicnum, _alpha));
//If you want to change fade speed, alter + & - amounts below!
//if the new pic alpha is 0, fade it up to 100
if (picalpha <100) {
setProperty(picnum, _alpha, picalpha + 5);
}
//if the old pic alpha is 100, fade it down to 0
if (oldpicalpha >0) {
setProperty(oldpicnum, _alpha, oldpicalpha - 5);
}

}
[/as]

Después tengo un clip en el _root que se llama botonera, y dentro de este tengo 5 clips a modo de botones.
Al hacer clic en ellos se hace el efecto fade in/out entre los clips one two three four five (que están dentro del bg).
El codigo de estos botones lo asigno desde un keyframe del root de la siguiente forma:

[as]
///////////////////BOTONERA
///trailer
_root.botonera.trailer.onRelease = function() {
if (_root.bg.picnum eq "one") {
} else {
_root.bg.oldpicnum = _root.bg.picnum;
_root.bg.picnum = "one";
}

};

///sinopsis
_root.botonera.sinopsis.onRelease = function() {
if (_root.bg.picnum eq "two") {
} else {
_root.bg.oldpicnum = _root.bg.picnum;
_root.bg.picnum = "two";
}

};

///fotos
_root.botonera.fotos.onRelease = function() {
if (_root.bg.picnum eq "three") {
} else {
_root.bg.oldpicnum = _root.bg.picnum;
_root.bg.picnum = "three";
}
};

///equipo
_root.botonera.equipo.onRelease = function() {
if (_root.bg.picnum eq "four") {
} else {
_root.bg.oldpicnum = _root.bg.picnum;
_root.bg.picnum = "four";
}
};

///poster
_root.botonera.poster.onRelease = function() {
if (_root.bg.picnum eq "five") {
} else {
_root.bg.oldpicnum = _root.bg.picnum;
_root.bg.picnum = "five";
}
};


Me gustaría que una vez que se hace el fade in/out (al presionar en los botones)que se ejecuten unas acciones (para cada botón las suyas).

Podéis echarme un cable?

Muchisimas gracias :)
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:38.