ActionScript で autosize と bold の両方を設定する必要があるテキスト フィールドがあります。何らかの理由で、太字の書式設定を適用すると、autosize=true が失われます。私が言えることは、すべてを正しい順序で行っているということです。何が起こっているのかについての考えは大歓迎です。ありがとう!
関連するコードは次のとおりです。
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);
...
}