PDA

View Full Version : Dynamic beginFill color parameter


ain
04-05-2005, 08:01 AM
Hi guys, I need a bit of the help with the code that leaves me with Type mismatch:


clr = "CCCCCC";
beginFill("0x"+clr, 100);



Any ideas?

madgett
04-05-2005, 08:42 AM
Needs to be of type Number, use casting:
clr = "CCCCCC";
beginFill(Number("0x"+clr), 100);

ain
04-05-2005, 08:54 AM
Thanks a lot madgett, I wasn't aware this is a numeric parameter.

madgett
04-05-2005, 08:56 AM
Yep, it's hexidecimal. If you actually trace that it will give you:
13421772