Hi there,
I’m working on a presentation that has both scrolling binary numbers (like information streaming across) as well as ticker symbols streaming across. Someone in the F8 forum was nice enough to give me some AS for the scrolling binary numbers which is working great. You can see this in action at:
http://www.pixelmech.com/flash/access-diagram.html
What I need to do now is essentially the same thing, except with stock tickers. Examine the following image:
On the right you see 4 rows of tickers that are supposed to scroll along to the right side, in 3 different colors. I’m pretty fluent in JavaScript (but still something of a beginner in Flash) and so I figured I’d modify the script for the binary numbers, but I can’t seem to get it. Any help would be appreciated to get this done. Even if I just got it scrolling all in one color, that would be a start, although the 3 colors is preferred. How can I do this? Is there a better way than actionscript?
Here is the function I am using currently for the numbers:
TextField.prototype.scrollText = function() {
this.charList = new Array("0", "1");
this.charLength = 50;
if (this.text == "") {
for (i=0; i<this.charLength; i++) {
this.text += this.charList[Math.floor(Math.random()*this.charList.length)];
}
} else {
this.text = this.text.substr(0, this.text.length-1);
this.text = this.charList[Math.floor(Math.random()*this.charList.length)]+this.text;
}
};
// attach function to a dynamic text field...
var scroller1Speed:Number = setInterval(scroller1, "scrollText", 10);
// and so on.
Any help is greatly appreciated!
Thanks
Tom