[FONT=Trebuchet MS]Hi, I’m trying to dynamically change movieclip colors. My MovieClips (on the main timeline) are named box_mc1, box_mc2, box_mc3, etc. I have the following code, but I can’t figure out why it doesn’t work. Help appreciated.
My script on Frame 1 as follows:[/FONT]
function changeColor(targetMC:MovieClip, colorCode) {
var colorful = new Color(targetMC);
colorful.setRGB(colorCode);
}
for (n=1; n<=3; n++) {
this["box_mc"+n].onRollover = function ()
{
trace("color");
_root.changeColor(this, "0xFFFF33");
}
}
[FONT=Trebuchet MS]I don’t quite understand why the trace statement doesn’t work either, but the mouse pointer changes to a hand when I move over the MovieClips.[/FONT]