Bookmark and Share

Recently I have been working on a project built with Flash CS3 components and we want to skin the components and embed the font but we’ve found that when we set all the styles and font using “setStyle”, the drop down menu of the ComboBox component is not doing anything, i.e- no style or font changed…

We were digging into the language reference and found out that ComboBox contains several child components too, i.e- List and TextInput. After playing around with settings, we have found out using the following code will enable style and font for ComboBox:

?View Code ACTIONSCRIPT
1
2
3
4
5
6
7
8
// Set style for comboBox
myComboBox.setStyle("embedFonts", true);
myComboBox.setStyle("textFormat", myFormat);
// Set dropdown style for comboBox
myComboBox.textField.setStyle("embedFonts", true);
myComboBox.textField.setStyle("textFormat", myFormat);
myComboBox.dropdown.setRendererStyle("embedFonts", true);
myComboBox.dropdown.setRendererStyle("textFormat", myFormat);