Converting button Icon back to Image
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 t开发者_如何转开发o 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.
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.
精彩评论