# setRGB not working under a mask

**URL:** <https://forum.kirupa.com/t/setrgb-not-working-under-a-mask/207780>\
**Category:** flash\
**Created:** [November 21, 2006, 1:45pm UTC](https://forum.kirupa.com/t/setrgb-not-working-under-a-mask/207780 "2006-11-21T13:45:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnnaAngel](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@AnnaAngel](https://forum.kirupa.com/u/AnnaAngel)\
**Post date:** [November 21, 2006, 1:45pm UTC](https://forum.kirupa.com/t/setrgb-not-working-under-a-mask/207780/1 "2006-11-21T13:45:12Z")

</div>

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?

```auto
  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
