|
Smithy Zeno
ownes 9 pet cacti
Join date: 3 Aug 2006
Posts: 52
|
03-22-2008 14:11
Hi everybody, I was wondering if it is possible to have a very long line of XY Text objects (eg. like 2 rows; each containing 4 'cells') and then have it listen to a message. I am wondering if it is possible for the XY Text to get this message and apply it evenly to the objects. By 'evenly' I mean so that there will not be any part of a word at the end of the row nor beginning of the row. For example I want to change this: This is a test of really rea lly long line of XY Text Ob jects and to have them ev en themselves.
Into this: This is a test of really really long line of XY Text objects and to have them even themselves.
All I mean by this is that I want to make an XY Text system that won't leave parts of words at the end or beginning of rows. If anyone could give me a hint on how to go about this or tell me if there is already a system like this, that'd be great. Thanks. -Smithy
_____________________
-Smithy
|
|
Krista Chaffe
Registered User
Join date: 16 Jun 2007
Posts: 96
|
03-22-2008 15:20
If you map some strings, lists or lists of strings to the XY text cells you have [regardless of layout] then you can focus on getting them to have the correct text.
Get the strings to look like you want them then, load that into a large array unit a a time. Think of it like a screen buffer.
I have several displays that are multiple XYtext units strung together both length wise and multiple lines.
|
|
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
|
03-22-2008 21:19
Was thinking about this the other day (though I haven't coded it yet) . . . thought I'd start out with line 1 being, say, 20 letters. See if character 21 is a space. If so, start next line with 22. If not, start working back until you find a space. Then break to the next line . . . keep going until you're done. At least, that's what I was planning to try . . .
|
|
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
|
03-23-2008 00:29
I think the function you want would be
llParseString2List(message,[],[" "]);
It will return a list of words that you could then loop throght adding to a display string and monitoring size. If the string is to long, remove the last word, display the string, the continue processing adding to the serecond line.
repeat for as many lines as you have.
|