Copy link to clipboard
Copied
hi
i have 2 buttons
one red with instance name redc
the other is yellow with instance yellc
and one mc with instance rect_mc
i want when clicking redc button
the color of redc stored in a variable to use it on the mc
so when u click on the rect_mc the color of the mc changed to red
i tried that code but i guess there is no property called "Color"
var r:Color = new Color () ;
redc.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
r = redc.color ;
}
Look into using the ColorTransform class
var newColorTransform:ColorTransform = rect_mc.transform.colorTransform;
newColorTransform.color = ff0000;
rect_mc.transform.colorTransform = newColorTransform;
Copy link to clipboard
Copied
Look into using the ColorTransform class
var newColorTransform:ColorTransform = rect_mc.transform.colorTransform;
newColorTransform.color = ff0000;
rect_mc.transform.colorTransform = newColorTransform;
Copy link to clipboard
Copied
perfect thanks xD
Find more inspiration, events, and resources on the new Adobe Community
Explore Now