Comunidad de diseño web y desarrollo en internet online

dos imagenes cambio de nivel y fadeout

Citar            
MensajeEscrito el 26 Oct 2006 03:55 pm
tengo dos imagenes (imagen1_mc e imagen2_mc) en la misma capa. quiero hacer q cuando hagas rollover sobre una, aumente su tamaño, se ponga por encima del nivel de la otra imagen y q ademas a la otra imagen le haga un fundido hasta _alpha 20.
cuando haces rollout la imagen vuelve a su nivel y la otra recupera su _alpha 100.
lo estoy haciendo con dos botones transparentes encima de los mc con las imagenes. consigo q me cambie de nivel, pero el fundido lo hace total y no con el rollover. al hacer rollout tampoco recupera el _alpha.

este es el codigo q he puesto en el fotograma uno de imagen1_mc


stop();
_parent.imagen2_mc.onEnterFrame = function() {
_parent.imagen2_mc._alpha -= 5;
if (_parent.imagen2_mc._alpha <= 0) {
_parent.imagen2_mc._visible = false;
delete _parent.imagen2_mc.onEnterFrame;
}
};

alguien me puede echar una mano. me da la impresion de q lo q quiero es mucho mas facil q lo q estoy haciendo y he mirado en el foro y en la ayuda y no consigo adaptar lo q veo. soy nuevo con el accionscript.
gracias

Por copper

3 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 26 Oct 2006 05:40 pm
Sería algo así:

Código :

img2.other = img1;
img1.other = img2;
img1.onRollOver = img2.onRollOver=function () {
   this.onEnterFrame = function() {
      this.other._alpha -= 5;
      this._alpha = 100-this.other._alpha;
      other.onEnterFrame = null;
      if (this.other._alpha<=0) {
         this.other.swapDepths(_root.getNextHighestDepth());
         this.onEnterFrame = null;
      }
   };
};

Por Zah

BOFH

4290 de clabLevel

27 tutoriales
5 articulos

  Bastard Operators From Hell Editores

Zaragoza, España

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.