Hi Juan,
I had a similar question last year and Andreas Weber provided a perfect solution: http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2005-February/131505.html Andreas Weber motiondraw.com hope this helps, Dunc ** On 4/3/06, Juan Anzaldo <[EMAIL PROTECTED]> wrote: > > I'm doing a class that manages a colors palette > I want to select a color and know 10 steps from the > color to White to the color > > I have this code that make a gradient from white to > the color that I want and from this color to black > ----------------------- > createEmptyMovieClip("gradiente_mc", 10); > var xi:Number = 301; > var yi:Number = 0; > var ancho:Number = 30; > var alto:Number = 150; > var fillType:String = "linear"; > var alphas:Array = [100, 100, 100]; > var ratios:Array = [1, 100, 254]; > var matrix:Object = > {matrixType:"box",x:xi,y:yi,w:ancho,h:alto,r:90/180*Math.PI}; > var spreadMethod:String = "pad"; > var interpolationMethod:String = "linearRGB"; > var focalPointRatio:Number = 0.9; > > dibuja = function(sColor) > { > var colores:Array = [0xFFFFFF,sColor, 0x000000]; > with (gradiente_mc) > { > lineStyle(1, 0x000000) > beginGradientFill(fillType, colores, alphas, > ratios, matrix); > moveTo(xi, yi); > lineTo(xi+ancho, yi); > lineTo(xi+ancho, yi+alto); > lineTo(xi, yi+alto); > lineTo(xi, yi); > endFill(); > } > } > dibuja(0x2B0A9E); > > ------------------ > It functions very good but I need just 10 steps from > the color to white and each color stay in a movie clip > > like shows the figure because I need to use the colors > for apply in others _mc's > > figure URL : > > http://201.131.19.21/administracion2/colores.gif > > tnx for your help > > > Ing. Juan Anzaldo > Tel Cel. 614 427-6523 > Blog : http://janzaldo.blogspot.com > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com