2 Replies Latest reply on Mar 22, 2011 12:44 PM by natdzign

    Text scroll across the page

    natdzign Level 3

      Hi there,

       

      I'm a newbie with flash, need some help. I'm using actionscript 2.0, trying to make my text scroll across the page like a "news headline". Thsi is the code that I have been using (see below), which works. However, I want my text to scroll continuously (non stop). The code that I have right now, once text leaves the zone, it's gone.

       

      onClipEvent(enterFrame) {
      _root.scrolling._x = _root.scrolling._x + 3;
      }

       

      thanks

        • 1. Re: Text scroll across the page
          kglad-zqbLf4 Level 3

          you should attach code to objects.  assign instance names and attach code to a frame or place in a class:

           

          //  assuming a left-edge reg point:

           

          _root.scrolling.onEnterFrame=function() {
          this._x +=3;

          if(this._x>0){

          this._x=Stage.width-this._width

          }

          }

           

           

          • 2. Re: Text scroll across the page
            natdzign Level 3

            It's not working.

             

            I get the following message:  "Scene=Scene 1, layer=scrolling text, frame=1, Line 4 Statement must appear within on/onClipEvent handler.

             

            This is the code I entered.

             

            onClipEvent(enterFrame){
            _root.scrolling._x = _root.scrolling._x + 3;
            }
            _root.scrolling.onEnterFrame=function(){
            this._x +=3;
            if(this._x>0){
            this._x=Stage.width-this._width
            }
            }

             

             

            * the name of my instance is "scrolling"