var lineHeight:Number, linesCount:Number;
var tf:TextField = yourTextField;
with (tf) {
autoSize = true;
multiline = true;
wordWrap = true;
html = true;
htmlText = "some text at 1 line";
}
lineHeight = tf.textHeight;
tf.htmlText = "some html text ..... text .... ";
linesCount = Math.floor(tf.textHeight/lineHeight);
2006/9/11, grimmwerks <[EMAIL PROTECTED]>:
I've got textFields using html text that I need to get an accurate way
of finding the line count...I got it working when I knew the size of
the font attributed to that textField, but with one field it can have
multiple formats.
It's been a long tired weekend of sleepless coding, so I'm going to
try doing it myself, but if someone has an answer...
I thought that after I set the htmlText, I originally was going to try
to get the newlines, but just realized that's not going to work....
thoughts?
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com