all groups > flash actionscript > november 2004 >
You're in the

flash actionscript

group:

textField question


textField question justlar
11/10/2004 9:02:24 PM
flash actionscript:
I am trying to capture the text displyed in a textField when the amount of text
exceeds the actual textField. Is there a way to determine what text is
actually visible so I can copy the additional text into another field? Thanks.
Re: textField question TroyK
11/10/2004 9:16:48 PM
justlar I would suggest figuring out how many characters can fit into your
text field. Then when the text is changed, run a function that test to see if
the length is greater than your number. If it is, chop it off and update the
other text field. Hope this helps! Troy
Re: textField question justlar
11/10/2004 10:07:30 PM
Thanks. I am afriad I must do this, problem is I am using html text with
inline graphics and a font size setting (+/-) so scripting needed must be quite
powerful to handle the variable data. As far as figuring out my area in
comparison to my text a crude approximation is to take ( textField._height /
textField.textHeight ), this will tell you an approximate percentge
larger/smaller your text is in relation to available space.
AddThis Social Bookmark Button