开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜