num = 50;
i = 1;
centerX = Stage.width/2;
centerY = Stage.height/2;
while (num>=i) {
a.duplicateMovieClip("a"+i, i);
var b = this["a"+i];
b.rX = (random(25)+10)/1000;
b.rY = (random(25)+10)/1000;
b._x = random(centerX);
b._y = random(centerY);
b.gotoAndPlay(random(10)+1)
i++;
}
a._visible = 0;
a.onEnterFrame = function () {
i = 1;
while (num>=i) {
b = _root["a"+i];
b.xvel = b.xvel+((centerX-b._x)*b.rX);
b.yvel = b.yvel+((centerY-b._y)*b.rY);
b._x = b._x+b.xvel;
b._y = b._y+b.yvel;
i++;
}
}
i = 1;
centerX = Stage.width/2;
centerY = Stage.height/2;
while (num>=i) {
a.duplicateMovieClip("a"+i, i);
var b = this["a"+i];
b.rX = (random(25)+10)/1000;
b.rY = (random(25)+10)/1000;
b._x = random(centerX);
b._y = random(centerY);
b.gotoAndPlay(random(10)+1)
i++;
}
a._visible = 0;
a.onEnterFrame = function () {
i = 1;
while (num>=i) {
b = _root["a"+i];
b.xvel = b.xvel+((centerX-b._x)*b.rX);
b.yvel = b.yvel+((centerY-b._y)*b.rY);
b._x = b._x+b.xvel;
b._y = b._y+b.yvel;
i++;
}
}
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}