どちらの MovieClip オブジェクトも、それぞれのcolorTransform
プロパティで定義された色を持っている必要があります。
var ctf :ColorTransform = mc1.transform.colorTransform;
ctf.color = color;
mc1.transform.colorTransform = ctf;
次に、最初の MovieClip のオブジェクトの各プロパティに、2 で割った 2 番目の MovieClip の同じプロパティとの差をColorTransform
追加することにより、2 つのオブジェクトを新しいオブジェクトに結合します。ColorTransform
var ctf1 :ColorTransform = mc1.transform.colorTransform,
ctf2 :ColorTransform = mc2.transform.colorTransform;
var props :Array = ["redOffset", "redMultiplier", "greenOffset", "greenMultiplier", "blueOffset", "blueMultiplier"];
for each(var p :String in props)
ctf1[p] += (ctf2[p] - ctf1[p]) * a;
mc1.transform.colorTransform = ctf1;
これは、それ自体で説明するコード スニペットです: http://wonderfl.net/c/fQ1i