Autoresize text size in textfield
Hi,
I have a highscore-list on my upcoming game (Flash cs 5.5)
I've made textfields (drawn from the gui).
Names on the highscore-list can be up to 20 chars. But if one is written with uppercase-letters, the text won't fit into the textfield.
I've tried some samples on the net, but I didn't get them to work.
I had this code earlier, but it would be great to use max font size on each highscore-name.
hs_1.setTextFormat(myformat);
if(countUpperCaseChars(hs_2.text)>12)
{
myformat.size = 15;
}
else
{
myformat.size = 18;
}
Any tip?
Dan
