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:
Código ActionScript :
onClipEvent (enterFrame) { //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); } }
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:
Código ActionScript :
///////////////////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
