3 Replies Latest reply on Nov 18, 2007 7:50 AM by kglad

    Stopping variable

    symetric Level 1
      I have a script running that produces random snow flakes, the problem is that I want to stop it at a certain frame in the main timeline but nothing I do seems to delet it/stop it. Your help would be gratefully received!

      My script:
      snowNumber = 5;
      for (i=0; i<snowNumber; i++) {
      newSnow = snow.duplicateMovieClip("snow"+i, i);
      newSnow._x = Math.random()*Stage.width;
      newSnow._y = -Math.random()*550;
      newSnow.maxSnowSpeed = Math.random()*6;
      newSnow.wind = Math.random()*8;
      newSnow._xscale = newSnow._yscale=newSnow.alpha=Math.random()*100+40;
      newSnow.onEnterFrame = function() {
      this._rotation -= this.maxSnowSpeed+1;
      if(this._y>Stage.height || this._x>Stage.width || this._x<0){
      this._y = -Math.random()*600;
      this._x = Math.random()*Stage.width;
      } else {
      this._y += this.maxSnowSpeed+1;
      this._x += this.wind-5;
      }

      this._alpha = this.alpha;
      };
      }