1 Reply Latest reply on Oct 22, 2006 5:27 PM by kglad

    Need Help with this code

    Clandestinex337 Level 1
      Alright so i have this code that makes a bottle every two seconds and moves from the right to left. But once it moves off the screen the bottle gets moved to the center of the stage and stays there. How can I make this so that it doesnt stay there and stays off the stage?

      [url]http://img.photobucket.com/albums/v398/clandestinex337/test.swf[/url]

      also im woundering how i can make the bottles closer together so their isnt that big of a gap between the other bottles..

      Heres the code


      i = 100;
      while (i>1) {
      _root.attachMovie("bottle", "bottle"+i, i);
      _root["bottle"+i]._x = 400+(i*100); _
      _root["bottle"+i].onEnterFrame=function(){
      this._x-=5;
      if(this._x<=100){
      this._x=100
      this.play();
      this.onEnterFrame=null;
      }
      }
      i--;
      }


      I got this code from someone else and i dont really know what each line of code does so if someone could be so kind to expaine whats going on in this script?

      THANKS