When it rains it pours

oh wow I am having a problem with a scrolling text file. I actually used the tutorial from kirupa to make a scrolling text (using an external txt file), and the paragraphs looks fine on the computer but when I upload it online, it shows extra space between the lines. I don’t know how to fix that, the txt file is fine, I don’t even know why it does that with the browser. I am on a mac and I used TextEdit for the txt file (not that it’s relevant I think…)

The only time I have experinced this problem was using a windows server. It does something to the line breaks for some reason.
Try this.


function loadText(txtFile, target) {
    myVars = new LoadVars();
    myVars.load(txtFile);
    myVars.onData = function(raw) {
        var tmpText = "";
        if (raw.indexOf("
")>-1) {
            tmpText = raw.split("
").join("
");
        } else {
            tmpText = raw;
        }
        target.text = tmpText;
    };
}
loadText("myText.txt", _root.myText);


=)

Oh thank you! This problem was really driving me nuts! :slight_smile:

Your welcome =)