Dynamic horizontal scrolling marquee problem

hi, i’m looking for a dynamic marquee… this is what i found this far on the forum:


this.createTextField("scroller_txt", 1, 0, 0, 100, 20);
scroller_txt.border = true;
scroller_txt.speed = 1;
scroller_txt.text = "This is the text that will continuously scroll."+"this is also some text that will scroll";
scroller_txt.spaceSize = scroller_txt.getNewTextFormat().getTextExtent(" ").width;
scroller_txt.spacesRequired = Math.ceil(scroller_txt.width/scroller_txt.spaceSize);
for (var i = 0; i<scroller_txt.spacesRequired; i++) {
 scroller_txt.spacebuffer += " ";
}
scroller_txt.text = scroller_txt.spacebuffer+scroller_txt.text+scroller_txt.spacebuffer;
scroller_txt.hscrollInterval = function() {
 if (this.hscroll == this.maxhscroll) {
  this.hscroll = 0;
 }
 this.hscroll += this.speed;
};
setInterval(scroller_txt, "hscrollInterval", 20);

and it works pretty good… the only thing thats wrong is the undefined in front of the text… i tried a few things but i cant make it disappear… does anybody knows why it appears in the first place? and how to get rid of it?

thanks anyways!