Dynamic Gradient

Hi All,

I have a shape that is part of a component. I want to be able to skin it with various colors, but am not sure how to change the colors with actionscript because it is a gradient. I read through this post, but didn’t know how to make a gradient exactly how my shape looks. I want the end product to look like the attached.

http://www.kirupaforum.com/showthread.php?s=&threadid=12042&highlight=gradient

:slight_smile:

how much control do you need over the gradient? The example posted is just a monochromatic gray. If you only need that to alter in shades, a color object would work fine, but if you want the ability to change that inner white to something like green and the darker part of the gradient yellow, then that would need some drawing API use.

Hi sen,

I really appreciate your response. I think I want a lot of control. I used the code found in the attached link and used my colors, but did not get the desired effect. I am only using two colors to get the effect, but I use the tabs in the color mixer panel to alternate back and forth between the two colors like 6 times. I think this gives it sort of a plastic 3D look.

Do you know how to similute the tabs in the color mixer panel in actionscript? If you don’t know what tabs I am talking about just take a look at the attached fla.

no, what tabs? (no new attached fla)

Hi Sen,

I have attached a jpeg of the tabs I was talking about. The fla I was referring to was just the fla attached at the beginning of this thread.