I have a shared library that has been imported for runtime sharing that contains the font shFont_Verd. I want to embed this into a new dynamic text field created at runtime with the following code that doesn’t seem to work yet:
onClipEvent(load){
var TxtFld = this.dyBtnMC.createTextField("dyBtnText", getNextHighestDepth(), 0, 0, 125, 30);
var myFormat:TextFormat = new TextFormat();
myFormat.font = "shFont_Verd";
with(TxtFld){
setTextFormat(myFormat);
/*embedFonts=true;*/
html=false;
multiline=false;
text="this is a test button";
selectable=false;
border=false;
background=false;
autoSize="center";
var HexColor:String = "FFFFFF"
textColor=parseInt("0x" + HexColor);
}
}
Yes, I know it’s on a movieclip. I’ll try to figure out how to put it on the timeline once I get all the kinks ironed out of this code…