setRGB not working under a mask

Hi

I have a MC named color1 and I want to change it in an other color using code. There is a mask over the MC and now the setRGB is not working. If i remove the mask it works fine… but with the mask it stops working. Can anybody tell me why this is and how i can fix this?

  var color_1 :Color= new Color(color1);
  color_1.setRGB(parts[part].childNodes[3].firstChild.nodeValue);

if i trace the xml node i get the right color (0xFF0000) so that is not the problem

can somebody help me?
thanks