0 Replies Latest reply on Oct 25, 2007 4:32 PM by maguskrool

    AS3: Changing saturation with tweening

    maguskrool Level 1
      Hi everyone.

      I have a gallery filled with photos. The photos are loaded into Sprites and I need to desaturate them. When a Sprite is clicked, its image should return to its original saturation value in a tweened effect. I managed to achieve a desaturated effect using the ColorMatrixFilter, but mostly through experimenting with different values, not the most scientific approach. So:

      1 - Is there a better way to change an image's saturation? Or can anyone explain me how to change the ColorMatrixFilter's values to get a certain amount of saturation?

      2 - How can I switch between the saturated/desaturated values with a tween-like effect?

      Thanks in advance!