The following example shows how you can use an embedded font with the Flash ColorPicker component using ActionScript 3.0.
Full code after the jump.
// ActionScript 3.0 import fl.controls.ColorPicker; import fl.events.ColorPickerEvent; var arialEmbeddedFont:Font = new ArialEmbedded(); var fmt:TextFormat = new TextFormat(); fmt.font = arialEmbeddedFont.fontName; fmt.color = 0xFF0000; var colorPicker:ColorPicker = new ColorPicker(); colorPicker.setStyle("textFormat", fmt); colorPicker.setStyle("embedFonts", true); colorPicker.move(20, 20); addChild(colorPicker);
{ 0 comments… add one now }