hi guys
I want do draw a 10 gradients based on a begincolor and a brightness factor ... but how?
I have a variable containing a HEX value
how do I get a variable 'endColor' to represent a slightly brightened version of 'beginColor'?
help me ...Code:gradientHeight = menu._height/2; beginColor = "0x5B7CA7"; //endColor = ?????? gradientWidth = 200; for(i=1;i<11;i++) { with (_root.menu["level" + i]) { colors = [ beginColor, endColor]; alphas = [ 100, 100 ]; ratios = [ 0, 255 ]; matrix = { matrixType:"box", x:0, y:-gradientHeight, w:gradientWidth, h:gradientHeight, r:(90/180)*Math.PI }; beginGradientFill( "linear", colors, alphas, ratios, matrix ); moveto(0,-gradientHeight); lineto(gradientWidth,-gradientHeight); lineto(gradientWidth,0); lineto(0,0); lineto(0,-gradientHeight); endFill(); } }
Best regards
//POD




Reply With Quote