1 Reply Latest reply on Mar 26, 2008 7:07 AM by 1pt619

    Actionscript Help!

    WebberJJJJJ
      I got this piece of code here that creates snow. i implemented it on a stopped frame, but when i go to a different frame i want it to stop/disappear. but alas, im just a designer and not much of a programmer. here it is:

      var flakeCount:Number = 0;

      function createFlakes():Void{
      this.createEmptyMovieClip("flake_"+flakeCount,flakeCount+1);
      this["flake_"+flakeCount].attachMovie("snowFlake_mc","flake",1);
      trace(this["flake_"+flakeCount]);
      trace("@");
      flakeCount++;
      }

      var numFlakes:Number = 200;

      for(var i:Number=0;i<numFlakes;i++){
      createFlakes();
      }



      Anyone know the answer? Thanks!
        • 1. Actionscript Help!
          1pt619
          /////Put all of your snow flakes into an empty movie clip - "flakes"

          var flakeCount:Number = 0;
          _root.createEmptyMovieClip("flakes",1);

          function createFlakes():Void{
          flakes.attachMovie("snowFlake_mc","flake"+flakeCount,1+flakeCount);
          flakeCount++;
          }
          var numFlakes:Number = 200;
          for(var i:Number=0;i<numFlakes;i++){
          createFlakes();
          }


          ///// Then add this code to unload "flakes" in the other frame
          flakes.unloadMovie();