RE: Size of text in Flash?

"William L. Thomson Jr." <[email protected]> 11 Dec 2002 22:28:21 -0800
Newsgroups gmane.comp.java.jgenerator.devel
Message-ID <[email protected]>
Andrew,
	Thank you very much for you assistance. From here I will make it work.
I figured there would be some differences in TextField as opposed to
standard text. Also you are correct about the HTML aspect for the
underline. If regular text is that much easier to size/space/etc. then
it may be easier to draw the box/line as you suggested. I will have to
think about possible uses, and if there really is another need for the
field to be HTML. If not then I will save time and draw a box and
complete this object so I can add it to the project.

	Thanks again for your help, I owe you one.

On Wed, 2002-12-11 at 20:48, Andrew Watson wrote:
> William, unfortunately there is not an easy answer, as the TextField you are using requires a bit of extra space in order to display correctly.  What I mean is that if you work out that the glyphs take up 100 * 25 and use that as the size for the TextField, then it will not all display correctly - you need to add a buffer around it of +2 (or something like that) so it will display - in this example 102*27.  
> You can most easily see this effect in the FieldTest.swf below.  The blue text is a Static Text box (no kerning) and the green text is dynamic text, set from actionscript.  While the characters line up, you will see that the two border boxes around the green text overlap - so you can see that the size given to the dynamic text has to be larger than the space of the characters it contains.
> 
> Having said that, I have made some alterations to the Study_4 file that appear to perform as required... though I would say that if you are only using the TextField so that you can underline the text, then you may be better off using static text and drawing a rectangle underneath it for the underline, then you wouldn't have to worry about the extra size bit, you could make the underline a decent size so you can see it, and you could use kerning in the text (which I added some code to handle).
> 
> Having said that, I hope this works as you expect.
> 
> Andrew Watson

-- 
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone  707.766.9509
Fax    707.766.8989
http://www.obsidian-studios.com



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/