> I'm using an ugly long line of Lingo using pointToLine(textBoxBottomX,
> textBoxBottomY) to test for overflow in a text member sprite, and can't
> help thinking that there may be a quick, short function to do that.
> 
> Is there?
> 
> It seems there should be one, for use when you want to know how many lines
> in a text box are invisible because they're below the bottom edge of the
> box...
> 
> My scripts for testing that using pointToLine() do work, but there must be
> a more elegant way. Thanks for any tips!

pageHeight gives you the height of the field onstage in pixels, lineHeight
gives you the height of each line in pixels, and LineCount gives you the
total number of lines in the field. I'm not sure it would be any shorter
than the code you already have, but:

invisibleLines = member("field").lineCount -
member("field").pageHeight/member("field").lineHeight

For text, it's similar:

invisibleLines = member("text").line.count -
member("text").pageheight/member("text").fixedLineSpace

HTH,
Kurt


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to