Comunidad de diseño web y desarrollo en internet online

boton fade con AS no funciona

Citar            
MensajeEscrito el 31 Dic 2006 05:32 pm
he creado un boton q deberia tener un efecto de fade con rollOver y rollOut pero no se por q no funciona el efecto de fade
uso la ecuacion de easing para hacer la trancicion de alpha.
aqui pongo el codigo:

Código :

_root.createEmptyMovieClip("fade", 1);
with(fade){
   this.lineStyle (1, 0x000000,100); 
    this.beginFill(0x666666,50); 
    this.moveTo(100,100); 
    this.lineTo(200,100); 
    this.lineTo(200,120); 
    this.lineTo(100,120); 
    this.lineTo(100,100); 
    this.endFill();
   
   this.onEnterFrame = function (){
      
      this._alpha += (a - this._alpha) /6;
      
      if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
         this.a = 50;         
       } else{
         this.a = 100;   
      }
   }
}


ah y q pasen un buen año a todos!!!!!!!!!

Por nkd

11 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 31 Dic 2006 06:13 pm
Te dejaste un this...

Código :

this._alpha += (this.a - this._alpha) / 6;

:wink:

Por Zguillez

BOFH

10744 de clabLevel

85 tutoriales
17 articulos
3 ejemplos

Genero:Masculino   Bastard Operators From Hell Héroes Team Cristalab Editores

BCN

firefox
Citar            
MensajeEscrito el 31 Dic 2006 06:19 pm
ah, tienes razon, gracias.
es increible como un detalle tan infino nos rompe tanto la cabeza

Por nkd

11 de clabLevel



Genero:Masculino  

msie

 

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