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);
Tagged with:
 

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Spam Protection by WP-SpamFree