Ticker tape - NEED HELP!

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:

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!!!

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? :wink:

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

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