Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/10/2003, 11:30
Avatar de epplestun
epplestun
 
Fecha de Ingreso: octubre-2001
Mensajes: 1.621
Antigüedad: 25 años, 1 mes
Puntos: 5
Gracias, pero al final decidi hacerlo de esta manera que me explicaron, creo que es mucho mejor :D

Código PHP:
efecto.iniciar = function(){
    
this.alpha = 10;
    
this.x     = 3;
    
this.onEnterFrame = this.__frameLoop;
}

efecto.parar = function(){
    
delete this.onEnterFrame;
}

efecto.__frameLoop = function(){
 
this._alpha += (this.alpha - this._alpha)/4;
 
this._x     += (this.x - this._x)/4;
 
this._width += (500 - this._width)/4;
 if(
this._x == 3) {
  
this._x += (this._x + 367);
 }
}

efecto.iniciar(); 
Me gusta la OOP de AS xDD es facilmente extensible :D
__________________
Usuario registrado de Linux #288725