Glen Pike
Thu, 27 Aug 2009 01:33:42 -0700
There is a 2 pixel "gutter" around the text field, there may also be horizontal margins:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextLineMetrics.html Hope this helps. Glen Hudson Ansley wrote:
I realize that if TextLineMetrics had a "y" property as well as the "x", that would do it for me, so I wonder why that was left off... Regards, Hudson On Wed, Aug 26, 2009 at 4:39 PM, Hudson Ansley<hudsonans...@gmail.com> wrote:Anyone have a technique for centering a TextField vertically (accurately)? other than converting to bitmap... I can get the textHeight, but I don't know how to get the amount of empty space between the top of the TextField and the actual text. This varies with font, style, etc, and of course the characters in the text. Looked at TextLineMetrics, afaict, it does not give a value for the distance from the top of the field to the top of the text, and I suppose I might be able to use getCharBoundaries, but then I'd have to combine the results from all the characters, which seems a bit over the top... also, must be Flash 9 Regards, Hudson_______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders