//AS2.0 ver
var hoge:String = "テストです、テストです、テストです、テストです、テストです";
viewComment.autoSize=true;
viewComment.text = hoge;
// テキストフィールドのサイズを見て縮小
if (viewComment._width > 250) {
var myFormat:TextFormat = viewComment.getTextFormat();
myFormat.size = 10;
viewComment.setTextFormat(myFormat);
}
Comments
Post a comment

テキストフィールドのフォントサイズをwidthで判定変更。