is this what you are after? The key is to call textFormat on your text.
import flash.text.TextField;
import flash.text.TextFormat;
/// some method calls code like this line to kick it off:
this.rawChildren.addChild( createWhiteCircle( 1 ) );
private function createLabel( color: Object, size : Number ) :
TextField {
var label : TextField = new TextField();
label.autoSize = TextFieldAutoSize.LEFT;
label.background = false;
label.border = false;
label.thickness=5;
label.x = 4;
label.y = 0;
label.width=10;
var format:TextFormat = new TextFormat();
format.font = "Tahoma";
format.color = color;
format.size = size;
format.underline = false;
format.bold = true;
label.defaultTextFormat = format;
return label;
}
private function createWhiteCircle( displayNum : String) : Sprite {
var circleShape : Sprite = new Sprite();
var label : TextField;
circleShape.graphics.lineStyle( 1, 0x000000, .75, false
);
circleShape.graphics.beginFill(0xFFFFFF, 1);
circleShape.graphics.drawCircle(10, 10, 10);
label = createLabel( 0x666666, 12 );
label.text = displayNum;
label.alpha = .75;
circleShape.addChild( label );
return circleShape;
}
cheers-
Dustin
--- In [email protected], "Matt Maher" <[EMAIL PROTECTED]> wrote:
>
> I have a project where I am drawing circles and line and such directly
> onto a component extending a UIComponent (all actionscript)
>
> I've had problems finding examples of "drawing letters" (or font
> characters).
>
> The best I've been able to come up with is to use "IUITextField"
> objects and place those on the stage... but this is terrifically
> limited. Dynamically changing the "font" size and such becomes a
> really big issue.
>
>
> var textField:IUITextField;
> textField = IUITextField(createInFontContext(UITextField));
> textField.text = _value.toString();
>
>
> Are there any examples where I can "draw" the sprites for the letters
> themselves?
>