Hello,
I’m trying to dynamically load a txt file (formatted with html) as a news page, and get it to smoothly autoscroll vertically… Here - http://www.nocco.co.uk/test/text.html
After numerous searches I came across this actionscript which was originally set for horizontal scrolling -
[LEFT]System.useCodepage = true; [/LEFT]
[LEFT]function newsticker(content, posX, posY, depth, tempo) {
this.loadVariables(content);
this.onData = function() {
createTextField("text", depth, posX, posY, 10, 20);
text.html = true;
text.htmlText = news;
text.selectable = false;
text.autoSize = "left"; [/LEFT]
[LEFT] createTextField("text2", depth+1, posX, posY, 10, 20);
text2.html = true;
text2.htmlText = news;
text2.selectable = false;
text2.autoSize = "left";
text2._x = text._width; [/LEFT]
[LEFT] function tick() {
text._y -= tempo;
text2._y -= tempo;
if (text2._y <= posX) {
text._y = posX;
text2._y = text._width + posY;
}
updateAfterEvent();
}
setInterval(tick, 30);
};
} [/LEFT]
[LEFT]newsticker("events_artists.txt", 0, 7, 1, 1);[/LEFT]
In the function bit i changed all the Xs to Yx which makes it scroll vertically… as it is there are two text fields, i want just one long scroll rather than having it display double like that… So I tried removing the second createTextField bit but then the scrolling completely stops.
Can anyone here help me to understand the actionscript a little so that i can tweak it to my liking?!
Thanks in advance
Pat
The files are attached if it helps