# \[AS2\] Dynamic text size change - setTextFormat problem!

**URL:** <https://forum.kirupa.com/t/as2-dynamic-text-size-change-settextformat-problem/307224>\
**Category:** flash\
**Created:** [March 30, 2010, 11:22pm UTC](https://forum.kirupa.com/t/as2-dynamic-text-size-change-settextformat-problem/307224 "2010-03-30T23:22:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrjw](https://avatars.discourse-cdn.com/v4/letter/j/a8b319/32.png) [@jrjw](https://forum.kirupa.com/u/jrjw)\
**Post date:** [March 30, 2010, 11:22pm UTC](https://forum.kirupa.com/t/as2-dynamic-text-size-change-settextformat-problem/307224/1 "2010-03-30T23:22:35Z")

</div>

Hi! I’m trying to change the text size in a dynamic text area within a (movie clip) button. For a couple of buttons I’d like to make certain text smaller, for example, to make the “vs” smaller in “A [SIZE=1]VS[/SIZE] B”.

My buttons have dynamic text in them and the font is embedded and set at size 10 initially. The code I’ve got in my movie is as follows:

```auto

// define new text formatting
var minimenutext_txt:TextFormat = new TextFormat();
minimenutext_txt.size = 8;
avsb_txt = "A VS B";
avsb_txt.setTextFormat(3,4,minimenutext_txt);

// assign formatting to button dynamic text
btn1.btext.buttext.text = avsb_txt;

```

The text “A VS B” shows up in my button, but I can’t seem to do anything to change the format. I’ve tried making it bold, italic, that kind of thing too - but no luck.

Does the setTextFormat command only work with input dynamic text boxes? Is it being overruled somehow? What am I doing wrong here? Or are there any alternative ways to do what I’m trying to do…?! I’d really really really appreciate any assistance with this, please!
