# Need help with color transform call

**URL:** <https://forum.kirupa.com/t/need-help-with-color-transform-call/250380>\
**Category:** flash\
**Created:** [January 29, 2008, 3:17am UTC](https://forum.kirupa.com/t/need-help-with-color-transform-call/250380 "2008-01-29T03:17:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkingman](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@lkingman](https://forum.kirupa.com/u/lkingman)\
**Post date:** [January 29, 2008, 3:17am UTC](https://forum.kirupa.com/t/need-help-with-color-transform-call/250380/1 "2008-01-29T03:17:09Z")

</div>

This works, but only with the last image. Why?

I broke apart a kitchen photo into five .png files so I could click on cabinets or floor, etc. to change color. Using separate functions like “colorCabinets()”, “colorFloor()”, etc. works but ONLY on the last image in the mxml.

In the snippet below, colorFloor() will color floor, colorCabinets() will not color cabinets. However, if you do nothing else but comment out the floor image, making cabinets the last image, cabinets will then take the color.

Thanks in advance for any help.

function snips …  
cabinets.transform.colorTransform=color  
floor.transform.colorTransform=color

mxml …  
\<mx:Image id=“ceiling” x=“141” y=“78” width=“347” height=“236” source=“ceiling.png”/\>  
\<mx:Image id=“walls” x=“141” y=“78” width=“347” height=“236” source=“walls.png”/\>  
\<mx:Image id=“counterTops” x=“141” y=“78” width=“347” height=“236” source=“counterTops.png”/\>  
\<mx:Image id=“cabinets” click=“colorCabinets()” x=“141” y=“78” width=“347” height=“236” source=“cabinets.png”/\>  
\<mx:Image id=“floor” click="colorFloor()"x=“141” y=“78” width=“347” height=“236” source=“floor.png”/\>
