I’ve been trying to figure this out for a while now, but I’m about at my wits end trying to understand it. I’m attempting to make a function that takes two arguments, 1) the mc whose color you want to change and 2) the hex value of the destination color. Then, the existing color of the passed movieclip should gradually transform into the destination color over a duration of x frames (specified elsewhere).
From what I’ve run across so far, it seems like I need to get the rgb values. I found this bit of code to convert hex to rgb:
var r = hex >> 16;
var temp = hex ^ r << 16;
var g = temp >> 8;
var b = temp ^ g << 8;
I’m thinking I need to use the colorTransform or something similar, but could someone show me how to do this over a controlled period of time?