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:
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); |
2 users commented in " Embed font in Flash CS3 ComboBox component "
Follow-up comment rss or Leave a TrackbackWhy any text formats settings dissapeare for combobox in disabled state?
Thankyou! I had everything but the root ‘myComboBox.setStyle()’ lines in there. Interestingly, it worked fine in the compiled SWF and in Firefox, but not in IE7.
Anyway, those first two lines fixed it. Thanks!
Leave A Reply