# This is driving me nuts! HELP!

**URL:** <https://forum.kirupa.com/t/this-is-driving-me-nuts-help/187666>\
**Category:** Uncategorized\
**Created:** [May 1, 2006, 1:10pm UTC](https://forum.kirupa.com/t/this-is-driving-me-nuts-help/187666 "2006-05-01T13:10:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [May 1, 2006, 1:10pm UTC](https://forum.kirupa.com/t/this-is-driving-me-nuts-help/187666/1 "2006-05-01T13:10:12Z")

</div>

Hi there…  
I am trying to make a marquee that will display quite a big text, breaking this same text each 51 characters and continue untill all the text from the file is displayed. THE fuc…g problem is that it doesnt loop, it doesnt start again to display the bloody text from begining. Here is the actual code:

```auto

var i = 0;
texteffect = "";
var pos=0;
var times=0;
function textwritter() 
{
 texteffect = txt.slice(pos, i);
 
  // if ((texteffect.length % txt.length) ==0) <--Repeats, but doesnt display all.
  if ((texteffect.length % 51) == 0)
  {
   pos = texteffect.length;
   i=texteffect.length;
   pos = pos*times;
   i = i * times;
   times++;
  }
  i++;
}
var intervalID = setInterval(textwritter, speed);
stop();

```

PLEASE HELP!  
Thanks a lot.  
Cheers.  
Leo75.  
The files are attached.
