# Font embed / external text

**URL:** <https://forum.kirupa.com/t/font-embed-external-text/319183>\
**Category:** flash\
**Created:** [February 11, 2011, 6:55am UTC](https://forum.kirupa.com/t/font-embed-external-text/319183 "2011-02-11T06:55:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sovern](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@sovern](https://forum.kirupa.com/u/sovern)\
**Post date:** [February 11, 2011, 6:55am UTC](https://forum.kirupa.com/t/font-embed-external-text/319183/1 "2011-02-11T06:55:26Z")

</div>

Hi, desperate for some assistance in getting two bits of script to combine… Can anyone help please? I want to be able to apply an embedded font to an externally loaded .txt file. I have named the dynamic text field ‘myText’, but the code that embeds the font wants me to enter the words. Both work individually, but they won’t combine:

myLoadVars = new LoadVars();  
myLoadVars.onLoad = function() {  
// the data is loaded in the myLoadVars object as a property of the object  
myText.htmlText = myLoadVars.topHTMLdata;  
}  
myLoadVars.load(“text1.txt”);  
{  
}  
myFormat=new TextFormat();  
myFormat.font=“ComingUp”;

myText.text=“text here”;  
myText.embedFonts=true;  
myText.setTextFormat(myFormat);

Thanks.

S
