Add fontWeight to the style as well @font-face { src:url("/assets/trebucbd.ttf"); fontWeight: bold; fontFamily: tres;
} .myRadioText { font-family: "tres"; fontWeight: bold; color: #0080ff; font-size:14; } var myRadioText:Text = new Text(); myRadioText.id = "myRadioText"; myRadioText.styleName = "myRadioText"; myRadioText.text = "This test"; this.addChild(myRadioText); Regards, Bjorn Schultheiss Senior Flash Developer QDC Technologies From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of {reduxdj} Sent: Monday, 20 November 2006 10:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] SetStyle fonts in Actionscript - CSS Hi, why can't i embed a font this way? I know this looks silly, did i miss something? Thanks, Patrick /* CSS file */ @font-face { src:url("/assets/trebucbd.ttf"); fontWeight: bold; fontFamily: tres; } .myRadioText { font-family: "tres"; color: #0080ff; font-size:14; } var myRadioText:Text = new Text(); myRadioText.id = "myRadioText"; myRadioText.setStyle("color","#0080ff"); myRadioText.setStyle("fontFamily","tres"); myRadioText.setStyle("fontSize","14"); myRadioText.styleName = "myRadioText"; myRadioText.text = "This test"; this.addChild(myRadioText);