# embedFonts + createTextField = no cigar! :(

**URL:** <https://forum.kirupa.com/t/embedfonts-createtextfield-no-cigar/195128>\
**Category:** flash\
**Created:** [July 28, 2006, 4:11pm UTC](https://forum.kirupa.com/t/embedfonts-createtextfield-no-cigar/195128 "2006-07-28T16:11:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![takethetrain](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@takethetrain](https://forum.kirupa.com/u/takethetrain)\
**Post date:** [July 28, 2006, 4:11pm UTC](https://forum.kirupa.com/t/embedfonts-createtextfield-no-cigar/195128/1 "2006-07-28T16:11:51Z")

</div>

I’ve embedded a font in my library(instance name “Arial”) and created a new text field using createTextField. But nothing appears. Here is my code:

```
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]createTextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]"myText"[/COLOR], [COLOR=#000080]1[/COLOR], [COLOR=#000080]100[/COLOR], [COLOR=#000080]100[/COLOR], [COLOR=#000080]300[/COLOR], [COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR];

```

[COLOR=#000000] **var** [/COLOR] myFormat:[COLOR=#0000FF]TextFormat[/COLOR] = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000FF]TextFormat[/COLOR]COLOR=#000000[/COLOR];  
myFormat.[COLOR=#0000FF]font[/COLOR] = [COLOR=#FF0000]“Arial”[/COLOR];  
myText.[COLOR=#0000FF]multiline[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
myText.[COLOR=#0000FF]wordWrap[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
myText.[COLOR=#0000FF]html[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
myText.[COLOR=#0000FF]embedFonts[/COLOR] = [COLOR=#000000] **true** [/COLOR];  
myText.[COLOR=#0000FF]setTextFormat[/COLOR]COLOR=#000000[/COLOR];  
myText.[COLOR=#0000FF]text[/COLOR] =[COLOR=#FF0000]“Hooray!”[/COLOR];  
[/LEFT]  
[/FONT]

Alternatively, if I create a text field on the stage, give it an instance name of myText, and choose “Arial\*” from the font menu, it works perfectly.

Any suggestions?

[whisper]Noticed this in the Adobe documentation: “After you’ve embedded a font in your library, you can use it with a text field on the Stage.” Does this mean this method won’t work for createTextField?[/whisper]
