Question on displaying loaded txt files

I looked at this tutorial http://www.kirupa.com/developer/mx/dynamic_scroller.htm
it helped a lot, however there is still one small thing that i want to fix

I’ve noticed that the text displayed in the textbox is not the same as the text in the txt file with respect to the line spacings (eg. If I press a hard return in the txt, it skips 2 lines in the textbox) How do I fix that?

Eg. (in text file)
kirupaText=Hello
world

(in text field)
Hello

world

but I don’t want a space between the two words

any1 know how to fix it?
thanks

You can format your text in HTML in the text file. Digitalosophy tells us how on page one, post 13 of this:

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=24012&highlight=HTML

(-:

I’ve got the same code as
<code>
loadText = new loadVars();
loadText.load(“publications.txt”);
loadText.onLoad = function() {
scroller.html = true;
scroller.htmlText = this.publicationsText;
};
</code>
the problem is that if you press enter in the txt file to go to the next line, it loads up in the text box, but it skips 2 lines. It doesn’t matter if the text is htmlText or not

I actually use loading text a lot, but I haven’t tried the HTML version of it yet. Instead of hitting enter, try using <br> in your text file. I will actually try this tomorrow to see if it works. That’s my best guess right now, anyhow.

Check this post out; it should explain things: <a href=“http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23646”>http://www.kirupaforum.com/forums/showthread.php?s=&threadid=23646</a>.

Later,
–Elios

P.S. The escape sequence you’ll be looking for is “%0d” for carriage return, btw.

So that would mean that I would have to put everything (in the txt file) in one line? But then the text file is gonna look really messy when I’m trying to edit it cuz everything is on one line

Yeah, but, if you wanted to get really ingenuitive (sp?) you could load it ignoring white space, but you’d have to put a %20 for every real space. Like…


&elios=The%20Lazy%0dBum&

Would be the same as…


&elios=The%20


Lazy

%0d

 Bum
&

With Ignore whitespace on. You can find out how to do that in the help files. But, like in one of the previous posts, HTML probably looks better…


&elios=The Lazy
<BR>
Bum&

Anyway,
–Elios