[Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Dan Efergan
Hello FlashCoders. The seemingly simple task of splitting a Textfield into it's (soft) wrapped lines is alluding me. How can you tell the Text content of a particular line within a Textfield? I'm trying to split out the individual lines to animate them. Thanks, Dan Dan Efergan dan

Re: [Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Hans Wichman
Hi, it might be simplest (if the text is one size only) to dump the whole textfield into a bitmap and take it from there. greetz JC On 8/16/07, Dan Efergan [EMAIL PROTECTED] wrote: Hello FlashCoders. The seemingly simple task of splitting a Textfield into it's (soft) wrapped lines is

Re: [Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Ian Thomas
Dan, It's a bit repetitive, but you can work it out with TextFormat.getTextExtent(). Just keep adding characters until the rect's height changes. (It's also - at least in Flash 8 - slightly incorrect when using antialiased fonts). Ian On 8/16/07, Dan Efergan [EMAIL PROTECTED] wrote: Hello

Re: [Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Dan Efergan
Thanks so far. I suppose I could do something similar to the TextExtent thing filling up a textfield and checking it's textheight (does textheight update without a redraw?). At least then it wouldn't be a deprecated command. And I'm thinking cutting down processing by using making an

Re: [Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Jon Bradley
Check out Jack's great Text Metrics class. He just posted this Aug. 7th. http://www.greensock.com/ActionScript/TextMetrics/ cheers, Jon On Aug 16, 2007, at 8:47 AM, Dan Efergan wrote: Hello FlashCoders. The seemingly simple task of splitting a Textfield into it's (soft) wrapped lines is

Re: [Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Dan Efergan
Thanks very much! Haven't looked through yet, but that looks like it's going to save me an afternoon :-) Dan On 16 Aug 2007, at 14:41, Jon Bradley wrote: Check out Jack's great Text Metrics class. He just posted this Aug. 7th. http://www.greensock.com/ActionScript/TextMetrics/ cheers,

Re: [Flashcoders] Splitting TextField into Lines - Simple?

2007-08-16 Thread Ian Thomas
Hi Dan, getTextExtent() isn't actually deprecated - it's an (acknowledged) bug in the documentation. Ian On 8/16/07, Dan Efergan [EMAIL PROTECTED] wrote: Thanks so far. I suppose I could do something similar to the TextExtent thing filling up a textfield and checking it's textheight (does