# ColorPicker and Sprites

**URL:** <https://forum.kirupa.com/t/colorpicker-and-sprites/325727>\
**Category:** Uncategorized\
**Created:** [November 1, 2011, 10:36pm UTC](https://forum.kirupa.com/t/colorpicker-and-sprites/325727 "2011-11-01T22:36:02Z")\
**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:36pm UTC](https://forum.kirupa.com/t/colorpicker-and-sprites/325727/1 "2011-11-01T22:36:02Z")

</div>

I have this code:\<br\>  
\<br\>  
//\<br\>  
meuColorPicker.selectedColor = 0xffffff;\<br\>  
//\<br\>  
meuColorPicker.addEventListener(ColorPickerEvent.CHANGE, corAlterada);\<br\>  
///\<br\>  
var objeto:MovieClip = camiseta.baseCamiseta;\<br\>  
///\<br\>  
function corAlterada(e:ColorPickerEvent):void {\<br\>  
//\<br\>  
var colorInfo:ColorTransform = objeto.transform.colorTransform;\<br\>  
//\<br\>  
colorInfo.color = meuColorPicker.selectedColor;\<br\>  
//\<br\>  
objeto.transform.colorTransform = colorInfo;\<br\>  
}\<br\>  
\<br\>  
I want to use the colorPicker to change the color of a MovieClip inside a Sprite. In this case, called baseCamiseta. \<br\>  
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.\<br\>  
\<br\>  
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.\<br\>  
\<br\>  
Thank you so much!
