I have text fields that I need to set as both autosize and bold in ActionScript. For some reason, when I apply the bold formatting, the autosize=true is lost. From what I can tell, I am doing everything in the correct order. Any thoughts on what is going on are hugely appreciated. Thanks!
Here is the relevant code:
var categoryMenu:MovieClip = _root.createEmptyMovieClip("categoryMenu", 1005);
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
for (var i:Number = 0; i<numCat; i++) {
var menu:MovieClip = categoryMenu.attachMovie("menu", "menu"+i,i);
menu._txt.txt.autoSize = true;
menu._txt.txt.text = gallData.getMenuGall.name[i];
//if i comment out the following line, the autosize works.
//if i leave it in, the autosize is lost. but i can't put this line
//before the autosize or i lose the bold
menu._txt.txt.setTextFormat(my_fmt);
...
}