# Ticker tape - NEED HELP!

**URL:** <https://forum.kirupa.com/t/ticker-tape-need-help/118710>\
**Category:** Uncategorized\
**Created:** [August 8, 2004, 12:03pm UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710 "2004-08-08T12:03:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luna\_977](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@luna\_977](https://forum.kirupa.com/u/luna_977)\
**Post date:** [August 8, 2004, 12:03pm UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710/1 "2004-08-08T12:03:30Z")

</div>

hi, I am new to this… but I found this ticker tape script and tried it. it works fine except of the fact, that the loaded text won’t repead… Can someone help?  
The code is:

// TickerTape class  
TickerTape.prototype = new MovieClip();  
function TickerTape() {  
this.\_visible = false;  
this.messageTf.autoSize = true;  
this.messageTf.html = true;  
this.watch(“currentMessage”, this.messageCB);  
this.\_x = this.startx;  
this.\_y = this.starty;  
}  
TickerTape.prototype.currentMessage = null;  
TickerTape.prototype.speed = 1;  
TickerTape.prototype.startx = 0;  
TickerTape.prototype.starty = 0;  
TickerTape.prototype.endx = 200;  
TickerTape.prototype.counter = 0;  
TickerTape.prototype.messagesLoc = null;  
TickerTape.prototype.messageCB = function(prop, oldVal, newVal) {  
if (oldVal != newVal) {  
this.messageTf.htmlText = newVal;  
this.\_visible = true;  
}  
return newVal;  
};  
TickerTape.prototype.onEnterFrame = function() {  
if (this.\_visible) {  
if (this.\_x\>this.endx-this.\_width) {  
this.\_x -= this.speed;  
} else {  
this.\_x = this.startx;  
this.\_visible = false;  
}  
}  
this.counter++;  
if (this.counter%10 == 0 && this.messageLoc != null) {  
this.loadVariables(this.messageLoc);  
}  
};  
Object.registerClass(“TickerTape”, TickerTape);  
ttInit = {startx:Stage.width, starty:Stage.height-20, endx:-tt.\_width, messageLoc:“messages.txt”};  
\_root.attachMovie(“TickerTape”, “tt”, 1, ttInit); :hair:

---

<div class="post-metadata">

**Author:** ![allaKAZAAM](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@allaKAZAAM](https://forum.kirupa.com/u/allaKAZAAM)\
**Post date:** [August 8, 2004, 12:18pm UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710/2 "2004-08-08T12:18:14Z")

</div>

I too would like to use this function…but aside from the coding…how do you get the text to run accross the screen? Where do you input it, or is it based on a WORD file/TEXT file? How do you set it up?

Thanks “luna-977” for bringing this up…wasn’t sure how to do it and wondered!

allaKAZAAM

---

<div class="post-metadata">

**Author:** ![luna\_977](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@luna\_977](https://forum.kirupa.com/u/luna_977)\
**Post date:** [August 8, 2004, 1:03pm UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710/3 "2004-08-08T13:03:53Z")

</div>

> [@allaKAZAAM](#):
>
> I too would like to use this function…but aside from the coding…how do you get the text to run accross the screen? Where do you input it, or is it based on a WORD file/TEXT file? How do you set it up?
> 
> Thanks “luna-977” for bringing this up…wasn’t sure how to do it and wondered!
> 
> allaKAZAAM

hi - see attached fla and ad in the same folder a .txt named ‘messages.txt’. and don’t forget the variable in the .txt - for example: CurrentMessage=\<font color=‘#FFFFFF’\>This text will appear in blue color\</font\>&

thats all - but it doen’t repead the loaded Text!!!

---

<div class="post-metadata">

**Author:** ![Prophet](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@Prophet](https://forum.kirupa.com/u/Prophet)\
**Post date:** [August 8, 2004, 11:22pm UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710/4 "2004-08-08T23:22:45Z")

</div>

ok its a little beyond me - not dabbled in prototypes and object classes before…  
HOWEVER, how about letting flash know (via variables maybe) when it has finished and then simply run the TickerTape function again? (resetting the variable that lets it know its finished)

and isnt #FFFFFF the colour code for white anymore? 😉

Prophet.

---

<div class="post-metadata">

**Author:** ![luna\_977](https://avatars.discourse-cdn.com/v4/letter/l/54ee81/32.png) [@luna\_977](https://forum.kirupa.com/u/luna_977)\
**Post date:** [August 9, 2004, 6:51am UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710/5 "2004-08-09T06:51:08Z")

</div>

> [@Prophet](#):
>
> ok its a little beyond me - not dabbled in prototypes and object classes before…  
> HOWEVER, how about letting flash know (via variables maybe) when it has finished and then simply run the TickerTape function again? (resetting the variable that lets it know its finished)
> 
> and isnt #FFFFFF the colour code for white anymore? 😉
> 
> Prophet.

hi prophet - it sounds perfect - but I I just tried something and I am not getting a result…

can anybody script this?

luna\_977

---

<div class="post-metadata">

**Author:** ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)\
**Post date:** [August 9, 2004, 8:32am UTC](https://forum.kirupa.com/t/ticker-tape-need-help/118710/6 "2004-08-09T08:32:02Z")

</div>

> [@luna-977](#):
>
> hi prophet - it sounds perfect - but I I just tried something and I am not getting a result…
> 
> can anybody script this?
> 
> luna\_977

try changing this function to this  
TickerTape.prototype.onEnterFrame = function() {  
if (this.\_visible) {  
if (this.\_x\>this.endx-this.\_width) {  
this.\_x -= this.speed;  
} else {  
this.\_x = this.startx;  
this.\_x -= this.speed;  
}  
}  
this.counter++;  
if (this.counter%10 == 0 && this.messageLoc != null) {  
this.loadVariables(this.messageLoc);  
}  
};
