I followed the Scrolling Dynamically Loaded Text tutorial & it worked great. The only problem I am running into is I have a huge space after each line. I can’t seem to figure out what code to use so I can add <BR> from html at the end of each line.
Yeah, this is a common problem unfortunately. See Flash interprets your carriage returns (when you press enter to get to a new line) and puts that as a huge space. The way around this is to HTML enable your textbox like this…
loadText = new loadVars();
loadText.load(“majorstandings.txt”);
// creating the loadVarsText function
loadText.onLoad = function() {
<B>scroller.html = true;
scroller.htmlText = this.majorstandingstext;</B>
};
What we did there was added the scroller.html code which registers that your textbox will be able to accept HTML. Then we changed scroller.text to scroller.htmlText, this tells flash to interpret any HTML (well, only Font Formatting tags and such are accepted) in the file being loaded.
Alright, after doing that you have to remove all of your carriage returns and replace them with the break tag in HTML. If you don’t know what that is, it goes like this…
<BR>
Unfortunately this makes for one long string of text, but it works :-\ Besides, you can always use the word wrap feature in most any text program (including notepad).