Embedding Fonts in the ComboBox Component
There comes a time when you dont have the time to create a combobox yourself and start using the standard components that Flash provides you. The problem I had was embedding the fonts in to it. I wrote alot on font embedding. But there are always special cases
. Here’s how to do it:
var arr:Array = new Array();
arr.push({label:"One"});
arr.push({label:"Two"});
arr.push({label:"Three"});
arr.push({label:"Four"});
arr.push({label:"Five"});
arr.push({label:"Six"});
var cb:ComboBox = new ComboBox();
// embed fonts in main text field, ComboBox in its closed state.
cb.textField.setStyle("embedFonts", true);
cb.textField.setStyle("textFormat", tf);
// embed fonts in dropdown menu, ComboBox folded open.
cb.dropdown.setRendererStyle("embedFonts", true);
cb.dropdown.setRendererStyle("textFormat", tf);
cb.dataProvider = new DataProvider(arr);
cb.move(10, 10);
addChild(cb);
Also check the documentation for the ComboBox. Very usefull






Keep posting stuff like this i really like it