Programming: Flash: Kerning Dynamic Text Fields
>> Thursday, December 13, 2007
Thanks to Random, I whipped up this function that allows you to set the kerning value of any dynamic text field in actionscript.
function kernText(whichField, kerning)
{
whichField.html = true;
var newFormat:TextFormat = new TextFormat();
newFormat.letterSpacing = kerning;
//newFormat.font = "Arial";
whichField.setTextFormat(newFormat);
}
2 comments:
Hi! Thanks :) I'd forgotten about this post, actually! I've since switched to using Snipplr to post my programming codefun. You can see the rest of my Flash snippets there:
http://snipplr.com/users/Winkyboy/
kerning != letter spacing
Post a Comment