AS3 TextField metrics bug
April 9th, 2009 • ActionScript, Flash
Just a quick reminder for myself. There are a few interesting metrics functions in the AS3 TextField API like getCharBoundaries(), but if you have an autoSize field the methods won’t work properly. Just set the height of the field before calling the method to fix that.
... textfield.height = textfield.height; textfield.getCharBoundaries(charIndex); ...
2 Responses (Add Your Comment)
-
-
hi,
please note that every textfield has a default width and height of 100 pixel each :)regards,
daniel
Hey Martin, very useful TextField tips on your blog, thanks for sharing! I am also fighting with it, check them out at http://play.blog2t.net/tag/textfield+as3 if you’re interested