17 Replies Latest reply on Jul 23, 2007 8:45 PM by kglad

    :confused; Newbie - how do I invert the loop ?

    mccosh Level 1
      hello, I am fairly new at AS and I am confused about this code :;...

      I want my animation to run top to bottom and I thought that just by changing the line: this._y-=loopSpeed to this._y+=loopSpeed I would be able to do it... however... I am able then to change the direction of the loop does not happen any longer... I have just one image running down the screen and that is it.

      What am I missing ?

      here is the code:

      onClipEvent(load)
      {
      looping.duplicateMovieClip("bground");
      bground._y=looping._y+looping._height;
      loopStarty=this._y
      loopSpeed=3;
      }
      onClipEvent(enterFrame)
      {
      if(_root.road.loopStart)
      {
      this._y-=loopSpeed;
      if(this._y<=(loopStarty-looping._height))
      {
      this._y=loopStarty-loopSpeed;
      }
      }
      }

      Appreciate any help you guys can give me... this is my first attempt and I am getting a little frustrated already...

      Cheers

      Ariane