# Using a single textfield to draw in multiple formats - is this possible?

**URL:** <https://forum.kirupa.com/t/using-a-single-textfield-to-draw-in-multiple-formats-is-this-possible/307059>\
**Category:** flash\
**Created:** [March 27, 2010, 2:29am UTC](https://forum.kirupa.com/t/using-a-single-textfield-to-draw-in-multiple-formats-is-this-possible/307059 "2010-03-27T02:29:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrjellybeans](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jrjellybeans](https://forum.kirupa.com/u/jrjellybeans)\
**Post date:** [March 27, 2010, 2:29am UTC](https://forum.kirupa.com/t/using-a-single-textfield-to-draw-in-multiple-formats-is-this-possible/307059/1 "2010-03-27T02:29:07Z")

</div>

Hey all,

I asked a question about this earlier, but now I have a better idea of what’s going on and what I’m trying to do. So, my problem is this:

I have a single texfield. I want to set the default format of that textfield to a certain value and alignment. Then, draw the text onto a bitmapdata. Then, I want to change the default format of THAT single textfield to a new format, change the alignment, and change the text contained in it. Then draw it at a new location.

I want to do the above many times to use the same textfield to draw in multiple locations in multiple styles.

My would look something like this:

```auto

var bmd:BitmapData = new BitmapData(500,300);

var tField:TextField = new TextField();

tText.autoSize=TextFieldAutoSize.RIGHT;
tText.setTextFormat(style_large); // style_large is defined already
tText.htmlText="Hello World."

bmd.draw(tText,new Matrix(1,0,0,1,10,10));

tText.autoSize=TextFieldAutoSize.LEFT;
tText.setTextFormat(style_small); // style_small is defined already
tText.htmlText="This is me";
bmd.draw(tText,new Matrix(1,0,0,1,10,40));

tText.autoSize=TextFieldAutoSize.RIGHT;
tText.setTextFormat(style_large);
tText.htmlText="Oh my Gosh!";
bmd.draw(tText,new Matrix (1,0,0,1,10,80));

tText.setTextFormat(style_small);
tText.htmlText="Cruddy, duddy");
...

```

When I attempt to do something like that, tText will change formats once, but then will remain at the last format it was set to.

In addition, the only way I can seem to get this to function any where near correctly is by recreating tText.

So, is there any way to do this besides using multiple TextFields?
