wonderfl - build flash online

Autofiting a textfield to height and TextLineMetrics visualized

Before reading the code, check out the illustration here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextLineMetrics.html

Drag the orange boxes to re size the text field ( i'm using the propriety scale since the commented code will become too slow on big scales and eventually crash )

**GRAPHICS**

TextLineMetrics Properties:
LINE HEIGHT - GREEN
ASCENT - SKY COLOR
DESCENT - PURPLE
LEADING - BLUE ( for some reason it's = zero )
TextLineMetrics.x value - YELLOW ( don't ask - i don't know why it's not working )

extra:
BOUNDS - RED
textWidth and textHeight - White

Also try to use the right click mouse controls - to zoom in - and play around with the size of the text - it won't get any bigger on the physical screen. Any idea why ? or how to fix it ?

Also notice on the big scales the white box becomes suddenly smaller.

WLAD WLAD

add to favorites

Embed

Code Fullscreen

Favorite by

Tags

sectKeywords

Forked

ページの先頭へ戻る