views:

33

answers:

1

I want to extract/read the button icon image as a Flex image component, then apply transform filters to it to make it black/white and then apply image as an icon to another button. Any ideas how I could do that? So far I can get the icon out as an Object by doing this:

var iconImg:Object = myBtn.getStyle("icon");

Not sure how to convert that Object to an image.

A: 

iconImage Object is type of DisplayObject. So you can draw in onto a BitmapData object then apply transforms to at and set other button's 'icon' style to this new transformed object.

bhups
Only difference is I had to use:var iconImg:DisplayObject = myBtn.getChildByName("icon");
Q-rius