AS2 How to Dynamically Duplicate Movieclips Until They Fill the Stage?

135 views Asked by At

I am wondering how I would go about dynamically duplicating a movieclip (that runs a Tweenlite animation), until it fills the stage? The idea is to have snowflakes animate in and fill the screen (white-out) and that the movieclips are coming in at random x and y positions based on a stage area.

Thanks so much!

1

There are 1 answers

0
animaacija On BEST ANSWER
var i = 0;

attachMovie("a_snowFlake_mc","a",this.getNextHighestDepth()); //AS linkage reference

onEnterFrame = function(){

duplicateMovieClip("a","ac"+i,this.getNextHighestDepth());
    _root["ac"+i]._x = Math.random()*Stage.height;
    _root["ac"+i]._y = Math.random()*Stage.width;
    i++;
}