Re: [Flashcoders] text line overflow

2008-11-18 Thread Latcho
Hi Rob, That is great and complete info ! I overlooked the possibility of getCharIndexAtPoint. Thanks for the example, this will save me a lot of time. Kind regards, Latcho Rob Romanek wrote: Hi Latcho, I see you've gotten a couple response but I'll throw another one in to the mix. The main

[Flashcoders] text line overflow

2008-11-17 Thread Latcho
How to break a line of text on the optimal charachter and adding ... if it doesn't fit a single lined textfield | I would like to break | this line of text. | I would like to br... | Any suggestions (AS3) Latcho ___ Flashcoders mailing list

Re: [Flashcoders] text line overflow

2008-11-17 Thread Hans Wichman
Hi, I've got an as2 implementation maybe you can convert it (and clean it:)): //nametextfield contains actual text. Check what is smaller the actual width of the textfield or a combo of the available width + margin+dotwidth //50 == margin, 20== correction, +5 == no clue old code;)) //so the

Re: [Flashcoders] text line overflow

2008-11-17 Thread Gregory Boland
Just find out how many characters fit into your allocated textfield space then count the characters coming in You could put the string of text that you want in the textfield into an array that is broken by each word like this.. //str being the string that u want to work with _str_arr =

Re: [Flashcoders] text line overflow

2008-11-17 Thread Rob Romanek
Hi Latcho, I see you've gotten a couple response but I'll throw another one in to the mix. The main functions that will interest you are: 1) getCharIndexAtPoint which locates the char at the edge of the textfield 2) replaceSelectedText which is used to substitute in ... This is some code