Greetings - I’ve been prowling and found a start for what I’m trying to do. Need help refining it. I pilfered the snowconfetti.fla AS and have modified it, but not quite there.
I want to attach a MC at a random _y location, and move it left to right across the stage, at random speeds. Then when it goes offstage, a new one is generated.
Right now the interval loads a new clip at 8 sec. no matter where the current clip resides on stage, so I’m sure that is wrong.
function brand() {
clip = attachMovie("brand_mc", "brand"+i, i);
clip._x = -50;
clip._y = Math.floor(Math.random()*640);
clip.xspeed = Math.random()*4-1;
clip.onEnterFrame = move;
i++;
if(i > 20){
clearInterval(myInterval);
}
}
function move() {
this._x += this.xspeed;
if (this._x>1100) {
this.removeMovieClip();
brand();
}
}
myInterval = setInterval(brand, 8000);
Thanks much for the help!