[Flashcoders] Splitting TextField into Lines - Simple?
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 [at] subsubskills.co.uk ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Splitting TextField into Lines - Simple?
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 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 [at] subsubskills.co.uk > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Splitting TextField into Lines - Simple?
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 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 [at] subsubskills.co.uk > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Splitting TextField into Lines - Simple?
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 estimate of line sizes based on character width, and hopefully start the check somewhere close to a line break. I'll post any useful outcomes. Dan On 16 Aug 2007, at 14:21, Ian Thomas wrote: 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). Dan Efergan dan [at] subsubskills.co.uk ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Splitting TextField into Lines - Simple?
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 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 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Splitting TextField into Lines - Simple?
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, Dan Efergan | subsub skills | Director 108c Stokes Croft | Bristol | BS1 3RU | mobile: 07970 065744 Subsub Skills supports, promotes and offers the best digital freelancers from across the South West and beyond. Subsub Skills is part of the Sub Group Network. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Splitting TextField into Lines - Simple?
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 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 estimate > of line sizes based on character width, and hopefully start the check > somewhere close to a line break. > > I'll post any useful outcomes. > Dan > > On 16 Aug 2007, at 14:21, Ian Thomas wrote: > > > 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). > > Dan Efergan > dan [at] subsubskills.co.uk > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com