1 Reply Latest reply on Jul 20, 2006 5:37 PM by funkysoul

    Scrolling Text (ticker bar)

      I am trying to create a scrolling ticker that rolls across the bottom of the page (like what you see on news channels). What I currently have works but it looks a little choppy. I use SetInterval for my ScrollTicker function, within that function I modify the ._x of the textbox (txtScrollBar._x -= 1). Is there a better way to do this? Oh also the way I do it I have to take the text and multiply it many many times so that it doesn't roll off the screen. Surely there's a way to "wrap" text horizontally so when the right edge runs out of text it starts at the beginning of the string?

        • 1. Re: Scrolling Text (ticker bar)
          funkysoul Level 4
          you could create a movieClip and with a onEnterFrame function move the textfield x pixels left or right then you need to set the boundary and tell flash that when a y value is met, the textbox should start from beginning.
          Here a sample code that I've made:

          this.onEnterFrame = function() {
          _root.title_txt._x -= 1;
          if (_root.title_txt._x < (-100-_root.title_txt.width)) { // the ticker goes all way to the left, as long as the position is higher then the width of the text -100
          _root.title_txt._x = 219; // starting position after going all way to the left

          hope it makes sense for you