# \[FMX04\] HELP for TextFormat and Input text fields

**URL:** <https://forum.kirupa.com/t/fmx04-help-for-textformat-and-input-text-fields/129526>\
**Category:** Uncategorized\
**Created:** [November 24, 2004, 7:54pm UTC](https://forum.kirupa.com/t/fmx04-help-for-textformat-and-input-text-fields/129526 "2004-11-24T19:54:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seedpod](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@seedpod](https://forum.kirupa.com/u/seedpod)\
**Post date:** [November 24, 2004, 7:54pm UTC](https://forum.kirupa.com/t/fmx04-help-for-textformat-and-input-text-fields/129526/1 "2004-11-24T19:54:26Z")

</div>

Can anyone help with this? I am trying to create a TextField, set its _ **type** _ property to “input,” set its format via the TextFormat object, and allow the user to add a label to a movieclip.

Assume you have a button named **b\_add** , and you assign it this code on the main timeline:

```auto
 _root.b_add.onRelease = function () {[indent]_root.createTextField("myLabel", 10, -38, -15, 76, 29.7);

_root.myLabel.type = "input";
_root.myLabel.text = "insert label";
_root.myLabel.wordWrap = true; 
labelFormat = new TextFormat("Verdana", 10, 0x525252);
labelFormat.align = "center";
_root.myLabel.setTextFormat(labelFormat);
Selection.setFocus(_root.myLabel);

[/indent]}

```

[font=Courier New]  
[/font][font=Courier New][font=Verdana]The TextField that gets created loses all of its formatting once the user starts typing. It reverts to Time New Roman and doesn’t wrap. Do I have something out of order? Should I approach the problem with another solution?[/font][/font]
