Vertical-alignment for textfields in ActionScript 3.0 is useful for aligning textfields to images, other UI elements in a flash app, and more! As many of you may know, Adobe introduced TLF Text along with Flash Player 10. If you are working with general consumer projects, however, chances are you are targeting Flash Player 9 as a minimum.
Before TLF TextFields, there was no direct way to vertically align TextFields.
TextLineMetrics allows us to access basic values for any typeface, such as ascent, descent, leading, width and height. Using
ascent, we can determine a TextField’s baseline Y position.