Skip to content

Instantly share code, notes, and snippets.

@RhinoLu
Created June 10, 2013 09:39
Show Gist options
  • Select an option

  • Save RhinoLu/5747584 to your computer and use it in GitHub Desktop.

Select an option

Save RhinoLu/5747584 to your computer and use it in GitHub Desktop.
[AS3] Skinning a combobox component in actionscript 3
//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