I haven’t been able to figure out a way to change the tint of a display object without effecting all of it’s child objects. And once you’ve changed the tint of the parent, you can’t seem to be able to change the tint of a child anymore. As in this code:
import flash.display.DisplayObject;
import flash.display.Sprite;
import fl.motion.Color;
import flash.geom.ColorTransform;
var box:Sprite=new Sprite();
box.graphics.beginFill(0xCCCCCC,1);
box.graphics.drawRect(0,0,200,200);
box.graphics.endFill()
this.addChild(box);
var innerbox:Sprite=new Sprite();
innerbox.graphics.beginFill(0x666666,1);
innerbox.graphics.drawRect(50,50,100,100);
innerbox.graphics.endFill()
box.addChild(innerbox);
var c:Color = new Color();
c.setTint(0xAAAAAA,1);
box.transform.colorTransform = c;
c.setTint(0xFF0000,1);
innerbox.transform.colorTransform = c;
I can’t seem to apply a tint to the child once the parent has been tinted. This same problem exists with colorTransform.color as well. Anyone know how to get around this?