Comunidad de diseño web y desarrollo en internet online

Ayuda con este codigo

Citar            
MensajeEscrito el 13 Feb 2008 12:38 pm
Me funciona en el player 6 pero no en los superiores. Es para que un campo de texto tenga un degradado dinamico de fondo.

Código :

rotacion = 90;

TextField.prototype.gradientBG = function(color1, color2, rotacion) {
   var matrix = {matrixType:"box", x:this._x, y:this._y, w:this._width, h:this._height, r:rotacion*Math.PI/180};
   lineStyle(1,0xE5E5E5,100);
   beginGradientFill("linear",[color1, color2],[100, 100],[0, 255],matrix);
   moveto(this._x,this._y);
   lineto(this._x+this._width,this._y);
   lineto(this._x+this._width,this._y+this._height);
   lineto(this._x,this._y+this._height);
   lineto(this._x,this._y);
   endFill();
};

_root.field1.gradientBG(0xE5E5E5,0xFFFFFF,rotacion);
_root.field2.gradientBG(0xE5E5E5,0xFFFFFF,rotacion);

Por clipdepelicula

237 de clabLevel



 

Valencia (España)

firefox
Citar            
MensajeEscrito el 13 Feb 2008 12:59 pm
Cambia "moveto" a "moveTo" y "lineto" a "lineTo" (ya hace mucho que no uso el 6, pero me extraña que estén todos en minúsculas, en cualquier caso, la segunda forma es la correcta.

Por The Fricky!

Presidente

6168 de clabLevel

3 tutoriales
8 articulos

Genero:Masculino   Bastard Operators From Hell Héroes

Piccola Venezia...

firefox
Citar            
MensajeEscrito el 13 Feb 2008 02:00 pm
funciona, muchas gracias!

Por clipdepelicula

237 de clabLevel



 

Valencia (España)

firefox

 

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