I have a dynamic textfield - mytext.textfield - which i dynamically set the width of. The textfield is multiple lines and the line will wrap at different places depending on the textfield width.
I save the contents of the textfield to a mysql database and then use it in a pdf, the problem is i need to know where the line wraps prior to sending it to mysql.
Is there any way to detect the wrap point and replace it with a Line Break code that can then be used in my pdf building ???
There is nothing natively that will allow you to do this in flash. But you can kind of pre-process (proper term?) your string within a dummy textfield offstage which has the same width / font / fontsize and figure out when it goes beyond the required width. I put together a file, rather quickly, and tried to comment best I could, i'm not very verbose. There may be better, easier and or cleaner ways to do this but it's a starting point for ya if nothing else. I tested it on a few strings but i can't be certain it will work in every possible scenario.