I did the same thing a few years ago, and it worked fine. You may
run into speed problems if you go over a certain amount of text to
scroll however. Instead of using maxscroll, it is a bit faster to
use getTextExtent to see if a given line will fit in the text box..
Instead of testing word by word, you can start to make some educated
guesses about how many chars will fit in a line, based again on the
extent. This way you can make far fewer comparisons.
And remember, if you are putting string S into textboxes a,b and c..
there is no need to test anything in c, just dump everything left in.
On Mar 29, 2006, at 4:11 PM, Scott Hyndman wrote:
If maxscroll equals 1 then subtract the last token.
I suspect you mean if maxscroll is inequal to 1.
I think this is a fine solution. Never done anything like it, but
it will definately work.
Scott
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Chris
Hill
Sent: Wed 3/29/2006 2:44 PM
To: Flashcoders mailing list
Cc:
Subject: [Flashcoders] Flowing Text in Flash
I've searched a lot on google and the list and haven't found much, so
maybe I'm missing something obvious again.
Basically I need to fill a text field, and when that text field is
full,
i should start filling the next one. My current idea is:
Break the text into space delimited tokens.
Keep adding tokens and checking maxscroll to see if it is equal to 1.
If maxscroll equals 1 then subtract the last token.
Move on to the next text field.
Not an ideal solution, but the only one that I think will work. Has
anyone done anything similar?
Thanks
Chris
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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