Dec 6 / Peter deHaan
Using an embedded font with the ColorPicker component in Flash using ActionScript 3.0
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);
Filed under ColorPicker
