Last stab..

// Import the required component classes.
import fl.controls.Label;

// Create a new instance of the Font1 symbol from the document's library.
var myFont:Font = new MyFont();

// Create a new TextFormat object, and set the font and size properties.
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = myFont.fontName; //This requires a font in your Flash document's library with a linkage class of "MyFont".
myTextFormat.size = 8;
myTextFormat.textColor = 0xFF0000;

/* Create a new Label component instance, set the textField.antiAliasType property, set the embedFonts and textFormat styles, and add the label to the display list. */
var myLabel:Label = new Label();
myLabel.text = "should be red";
myLabel.background = true;
myLabel.backgroundColor = 0x00FF00;
//myLabel.autoSize = TextFieldAutoSize.LEFT;
//myLabel.move(10, 10);
myLabel.textField.antiAliasType = AntiAliasType.ADVANCED;
myLabel.setStyle("embedFonts", true);
myLabel.setStyle("textFormat", myTextFormat);
addChild(myLabel);

HTH,
got it from here.

http://www.adobe.com/devnet/flash/quickstart/label_component_as3.html

Karl


On Sep 21, 2010, at 5:53 AM, Alexander Farber wrote:

Nope :-)

On Tue, Sep 21, 2010 at 11:57 AM, Karl DeSaulniers <[email protected]> wrote:
_label.label = 'should be red';
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to