To apply in code the same transform you set at author time in the IDE:

var colTransf:ColorTransform = mc.transform.colorTransform;
colTransf.redMultiplier = -0.18;
colTransf.greenMultiplier = -0.42;
colTransf.blueMultiplier = 0.22;
colTransf.alphaMultiplier = 0.26;
mc.transform.colorTransform = colTransf;

The left values in the panel are the multipliers (one for each channel).
There's a difference: in code the values are expressed as normal value in
the range 0-1 (whereas in the IDE it's represented as a percetage, 0 - 100).

So the above code will have the same effect as setting the left values to
-18%, -42%, 22% and 26%.

If you want to change the values in the right of the panel through code, set
the offsets instead (the properties redOffset, greenOffset, etc in the
ColorTransform object). They are expressed in the same units both in code
and the IDE.

Cheers
Juan Pablo Califano

2010/5/19 Mendelsohn, Michael <michael.mendels...@fmglobal.com>

> Hi list...
>
> This is probably a bitwise question, which is why I'm posting.  I have a
> grayscale movieclip and I want to give it a particular hue based on a hex
> value.  I don't want it to be tint, where it approaches being a solid color,
> but rather like watercolors.
>
> Additionally, I know that the left side values of the Advanced color pallet
> does this, and the right side values are for tinting.  I'm just not sure at
> the moment how to do that through code.
>
> Thanks if anyone knows!
> - Michael M.
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to