# createTextField and rotate

**URL:** https://forum.kirupa.com/t/createtextfield-and-rotate/188783
**Category:** flash
**Created:** [May 10, 2006, 6:45pm UTC](https://forum.kirupa.com/t/createtextfield-and-rotate/188783 "2006-05-10T18:45:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Knorcedger](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/knorcedger/32/1244_2.png) [@Knorcedger](https://forum.kirupa.com/u/Knorcedger)
#### Post date: [May 10, 2006, 6:45pm UTC](https://forum.kirupa.com/t/createtextfield-and-rotate/188783/1 "2006-05-10T18:45:40Z")

</div>

I want to rotate a dynamically created textfield, i opened “flash help” and took the sample code i found below (i changed the font with “Verdana”). But it seems that the font cant be embed and it dissapears.

Is that the problem, or what?  
How can i solve it?

Thank u

```auto
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Verdana";

this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 120);
my_txt.wordWrap = true;
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
my_txt._rotation = 45;

```

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [May 11, 2006, 10:55pm UTC](https://forum.kirupa.com/t/createtextfield-and-rotate/188783/2 "2006-05-11T22:55:54Z")

</div>

[SIZE=4] **You need the font in the library to dynamically embed it in a text field!!!** [/SIZE]

---

<div class="post-metadata">

### Author: ![Knorcedger](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/knorcedger/32/1244_2.png) [@Knorcedger](https://forum.kirupa.com/u/Knorcedger)
#### Post date: [May 12, 2006, 12:50am UTC](https://forum.kirupa.com/t/createtextfield-and-rotate/188783/3 "2006-05-12T00:50:51Z")

</div>

Ok, i still need practise.🙂

I actually didnt knew that i can add a font to my library.

Thank u a lot Canadian

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [May 12, 2006, 1:03am UTC](https://forum.kirupa.com/t/createtextfield-and-rotate/188783/4 "2006-05-12T01:03:13Z")

</div>

Glad to help :hoser:
