How to use font awesome icons in adobe flex 4 and how to set styles in font awesome icons.
how to set button label text as icon in adobe flex.
2
votes
1 Answers
5
votes
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@font-face {
fontFamily: FontAwesome;
embed-as-cff: true;
src: url("../assets/font-awesome-4.3.0/fonts/FontAwesome.otf");
fontStyle: normal;
}
@font-face {
fontFamily: FontAwesomeNonCff;
embed-as-cff: false;
src: url("../assets/font-awesome-4.3.0/fonts/FontAwesome.otf");
fontStyle: normal;
}
</fx:Style>
<s:VGroup paddingLeft="50" paddingRight="50" paddingTop="50" paddingBottom="50">
<s:Label id="icon1" text="" color="#000000" fontFamily="FontAwesome" fontSize="40" />
<s:Label id="icon2" text="" color="#f700f3" fontFamily="FontAwesome" fontSize="40" />
<s:Button label=" SUBMIT" fontFamily="FontAwesome" fontSize="20" />
<s:Button label=" RESET" fontFamily="FontAwesome" fontSize="20" />
</s:VGroup>
</s:WindowedApplication>
Get all Font Awesome UNICODE : http://fontawesome.io/cheatsheet/
Paste font awesome folder in your project in any location