# ColorPicker and Sprites

**URL:** <https://forum.kirupa.com/t/colorpicker-and-sprites/325726>\
**Category:** flash\
**Created:** [November 1, 2011, 10:33pm UTC](https://forum.kirupa.com/t/colorpicker-and-sprites/325726 "2011-11-01T22:33:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iglota](https://avatars.discourse-cdn.com/v4/letter/i/b4bc9f/32.png) [@iglota](https://forum.kirupa.com/u/iglota)\
**Post date:** [November 1, 2011, 10:33pm UTC](https://forum.kirupa.com/t/colorpicker-and-sprites/325726/1 "2011-11-01T22:33:22Z")

</div>

I have this code:

//  
meuColorPicker.selectedColor = 0xffffff;  
//  
meuColorPicker.addEventListener(ColorPickerEvent.CHANGE, corAlterada);  
///  
var objeto:MovieClip = camiseta.baseCamiseta;  
///  
function corAlterada(e:ColorPickerEvent):void {  
//  
var colorInfo:ColorTransform = objeto.transform.colorTransform;  
//  
colorInfo.color = meuColorPicker.selectedColor;  
//  
objeto.transform.colorTransform = colorInfo;  
}

I want to use the colorPicker to change the color of a MovieClip inside a Sprite. In this case, called baseCamiseta.  
If a change the variable type of objeto to a Sprite, than the colorPicker works correctly, but it changes only the “father” element’s color. I want to change de color inside the Sprite camiseta.

Why I am doing this? I have many objets in the Stage that I brought dynamicaly using (addChild)ren inside Sprites. Each Sprite has many children and I have to change the color of each one of them.

Thank you so much!
