Created
June 10, 2013 09:39
-
-
Save RhinoLu/5747584 to your computer and use it in GitHub Desktop.
[AS3] Skinning a combobox component in actionscript 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //http://www.murtensaerbi.be/blog/index.php/2008/08/11/skinning-a-combobox-component-in-actionscript-3/ | |
| // create a new textformat and set the style of it | |
| var myFormat : TextFormat = new TextFormat(); | |
| myFormat.font = "Cooper Std Black"; | |
| myFormat.color = 0xffffff; | |
| myFormat.size = 13; | |
| myFormat.indent = 4; | |
| // apply the textformat and embed fonts for the selected option | |
| first_cb.textField.setStyle("textFormat", myFormat); | |
| first_cb.textField.setStyle( "embedFonts", true); | |
| // apply the textformat and embed fonts for the dropdown textfields | |
| first_cb.dropdown.setRendererStyle("textFormat", myFormat); | |
| first_cb.dropdown.setRendererStyle("embedFonts", true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment