Podriais mandar esta rutina en un archivito zip? A ser posible para flash 5? Es mucho pedir?
mola mola... http://www.flashmaestro.fm/vertutorial.asp?tutorial=97 ;) salu2 pedro -----Original Message----- From: "Marc el XrV" <[EMAIL PROTECTED]> To: "pedro" <[EMAIL PROTECTED]> Date: Fri, 31 Jan 2003 14:04:04 +0100 Subject: [flashmaestro] Color prototype > aqui os dejo mis protos de color ;) faciles de usar i practicos a tope! > > PROTOS: > > /* Protos de color uso facil i rapido */ > /* Marc Palau http://www.palaueb.com */ > /* 31-1-2003 */ > MovieClip.prototype.fastRGB = function(r, g, b) { > if (!isNaN(r) && !isNaN(g) && !isNaN(b) && r<256 && r>=0 && g<256 && > g>=0 && b<256 && b>=0) { > r = r<<16; > g = g<<8; > b = b; > rgb = r|g|b; > col = new Color(this); > col.setRGB(rgb); > } > } > MovieClip.prototype.fastTransRGBA = function(ra,rb,ga,gb,ba,bb,aa,ab){ > if(arguments.length<8){ > return false; > } > var x=0; > while(x<arguments.length){ > if(isNaN(arguments[x++])){ > return false; > } > } > if (ra<=100 && ga<=100 && ba<=100 && aa<=100 && ra>=-100 && ga>=- 100 > && ba>=-100 && aa>=-100 && rb<=255 && gb<=255 && bb<=255 && ab<=255 && > rb>=- > 255 && gb>=-255 && bb>=-255 && ab>=-255){ > thisColor= {ra:ra,rb:rb,ga:ga,gb:gb,ba:ba,bb:bb,aa:aa,ab:ab}; > col = new Color(this); > col.setTransform(thisColor); > return true; > }else{ > return false; > } > } > MovieClip.prototype.fastTransRGB = function(ra,rb,ga,gb,ba,bb){ > if(arguments.length<6){ > return false; > } > var x=0; > while(x<arguments.length){ > if(isNaN(arguments[x++])){ > return false; > } > } > if (ra<=100 && ga<=100 && ba<=100 && ra>=-100 && ga>=-100 && ba>=-100 > && rb<=255 && gb<=255 && bb<=255 && rb>=-255 && gb>=-255 && bb>=-255){ > thisColor= {ra:ra,rb:rb,ga:ga,gb:gb,ba:ba,bb:bb,aa:100,ab:255}; > col = new Color(this); > col.setTransform(thisColor); > return true; > }else{ > return false; > } > } > MovieClip.prototype.fastInvertRGB = function(){ > thisColor={ra:-100,rb:255,ga:-100,gb:255,ba:- > 100,bb:255,aa:100,ab:255}; > col = new Color(this); > col.setTransform(thisColor); > > } > > USO: > clip.fastRGB(Rojo,Verde,Azul); > clip.fastRGB(255,0,0); > > > clip.fastTransRGBA(Porcentaje Rojo,Factor rojo,Porcentaje Verde,factor > verde,Porcentaje Azul,factor Azul,Porcentaje transparencia,Factor > transparente); > clip.fastTransRGBA(0,255,75,100,20,155,100,255); > > > clip.fastTransRGB(Porcentaje Rojo,Factor rojo,Porcentaje Verde,factor > verde,Porcentaje Azul,factor Azul); > clip.fastTransRGB(0,255,75,100,20,155); > > invierte los colores del clip. > clip.fastInvertRGB(); > > Pues eso es todo :) si los quereis rular a los amigotes o por vuestras > web no > lo dudeis :)
