How to set icon to a Button in Adobe Flex 2 and 3

First of all create a images directory in your flex project folder, then add your icons to it.
After that remember to set properly the icon attribute of your mx:Button element:

<mx:Button icon=”@Embed(‘/images/youricon.png’)”
   click=”makesomething()”
   toolTip=”This button does…”/>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s