iostream71
Programmer
i want to make some stars and have them twinkle randomly. this is what i have so far:
just duplicating a single star MC 100 times and randomly placing...but i'm not sure how to make them twinkle randomly
for(i = 0; i < 100; i++){
duplicateMovieClip(star, 'star' + i, i);
xHigh = 699;
xLow = 1;
yHigh = 1;
yLow = 171;
alphaHigh = 100;
alphaLow = 10;
randAlpha = Math.floor(Math.random() * (alphaHigh - alphaLow)) + alphaLow;
randX = Math.floor(Math.random() * (xHigh - xLow)) + xLow;
randY = Math.floor(Math.random() * (yHigh - yLow)) + yLow;
_root['star' + i]._x = randX;
_root['star' + i]._y = randY;
_root['star' + i]._alpha = randAlpha;
}
just duplicating a single star MC 100 times and randomly placing...but i'm not sure how to make them twinkle randomly
for(i = 0; i < 100; i++){
duplicateMovieClip(star, 'star' + i, i);
xHigh = 699;
xLow = 1;
yHigh = 1;
yLow = 171;
alphaHigh = 100;
alphaLow = 10;
randAlpha = Math.floor(Math.random() * (alphaHigh - alphaLow)) + alphaLow;
randX = Math.floor(Math.random() * (xHigh - xLow)) + xLow;
randY = Math.floor(Math.random() * (yHigh - yLow)) + yLow;
_root['star' + i]._x = randX;
_root['star' + i]._y = randY;
_root['star' + i]._alpha = randAlpha;
}