PDA

View Full Version : setRGB in AS3



Macadia
September 29th, 2007, 02:51 AM
is setRGB replaced with something in AS3?
if so, what is it?

thanks.

Michael Chen
September 29th, 2007, 07:34 AM
Under help doc "ActionScript 2.0 Migration"...
"flash.geom.ColorTransform.color" for AS3

Macadia
September 29th, 2007, 11:44 AM
when i do that, i get this:

1172: Definition flash.geom.ColorTransform:color could not be found.

Michael Chen
September 29th, 2007, 11:21 PM
Try this...



import flash.geom.ColorTransform;

// Changes mc's color to red.
var newColorTransform:ColorTransform = mc.transform.colorTransform;
newColorTransform.color = 0xff0000;
mc.transform.colorTransform = newColorTransform;

Macadia
October 11th, 2007, 12:41 PM
Michael,

Thanks, I'm going to try that out!

kc_quicky
May 23rd, 2008, 07:45 AM
Michael,

Thanks, I'm going to try that out!

IS it possible to get it to work with a tint instead.

Andrew