Friday, March 26, 2010

Flash Builder 4 / Flex 4 - Where did the icon property go?

Problem:

In previous versions of Flex (when using Halo), it was simple to add an icon to a button. But now with the Spark theming, there is no such convenience. I went in search of a solution online and after much digging where others had written custom components and so on, I found a solution posted by Adobe and its incredibly simple.

Solution:
Just create a new theme extending the Spark button skin, and then make two line replacements. Instead of me reexplaining it, just read it on Adobe's website.

http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf69084-7d9f.html

Good luck.

No comments: