# When it rains it pours

**URL:** https://forum.kirupa.com/t/when-it-rains-it-pours/184471
**Category:** Uncategorized
**Created:** [April 5, 2006, 11:33am UTC](https://forum.kirupa.com/t/when-it-rains-it-pours/184471 "2006-04-05T11:33:10Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![3dsound](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/3dsound/32/78_2.png) [@3dsound](https://forum.kirupa.com/u/3dsound)
#### Post date: [April 5, 2006, 11:33am UTC](https://forum.kirupa.com/t/when-it-rains-it-pours/184471/1 "2006-04-05T11:33:10Z")

</div>

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…)

---

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [April 7, 2006, 10:01pm UTC](https://forum.kirupa.com/t/when-it-rains-it-pours/184471/2 "2006-04-07T22:01:30Z")

</div>

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.

```auto

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);

```

=)

---

<div class="post-metadata">

### Author: ![3dsound](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/3dsound/32/78_2.png) [@3dsound](https://forum.kirupa.com/u/3dsound)
#### Post date: [April 7, 2006, 10:18pm UTC](https://forum.kirupa.com/t/when-it-rains-it-pours/184471/3 "2006-04-07T22:18:21Z")

</div>

Oh thank you! This problem was really driving me nuts! 🙂

---

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [April 7, 2006, 10:19pm UTC](https://forum.kirupa.com/t/when-it-rains-it-pours/184471/4 "2006-04-07T22:19:20Z")

</div>

Your welcome =)
