getBounds for TextFields = getBitmapBounds() (2)
November 5th, 2009, under actionscript, Code snippets.
I found out the getBounds()-function gives not exactly the right rectangle with a TextField. It always matches the border bounds, even if the borders are invisible. So I’ve created a more accurate function using getColorBoundsRect().
Click on the words. Switch between getRect() and getTextFieldBounds() by clicking on the buttons below to see the difference.
Tagged with bitmapdata, snippet.


















