Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd June, 2004 at 06:18:34 -
To do one word at a time is a bit harder than one letter at a time but not much. You will need a string parsing object of some sort, a counter and two strings.
Start of frame:
set string parser token = " "
set string parser String to parse = string1
Always:
set string2 to stringparser$gettextat(counter)
add one to counter.
Sorry about my messy code, I can't decide how I want to write things out when I write them in code. Ok, you write what you want in string 1. Then string 2 is the actual string that will be shown. Using the string parser object you parse the first string and every time there is a space you know there is a new word.
The MMF function Left$("String",x) returns the x leftmost characters of a string. Store the text in a string object, and use a counter.
Always:
Set alterable string of String to Left$( paragraph$( "String", 1 ), value( "Counter" ) )
Add 1 to counter
Presuming the string you want is stored in the first paragraph of String. (The alterable string is separate from the paragraphs, so it won't go over itself)