Combined Code
movieClip 2 star {
}
// unknown tag 88 length 64
movieClip 8 {
}
movieClip 9 {
frame 1 {
function AddStar() {
var v1 = universe_mc.attachMovie('star', 'star_' + i, i);
++i;
v1._x = Stage.width / 2 - 1 + 2 * Math.random();
v1._y = Stage.height / 2 - 1 + 2 * Math.random();
v1._alpha = 0;
var v3 = v1._x - Stage.width / 2;
var v2 = v1._y - Stage.height / 2;
var v4 = Math.sqrt(v3 * v3 + v2 * v2);
var v5 = Math.atan2(v2, v3);
v1._xVel = initVel * Math.cos(v5);
v1._yVel = initVel * Math.sin(v5);
v1._xscale = (maxOffset - v4) / 7;
v1._yscale = (maxOffset - v4) / 7;
v1.onEnterFrame = FlyingStar;
}
function FlyingStar() {
this._x += this._xVel;
this._y += this._yVel;
this._xVel *= accel;
this._yVel *= accel;
if (this._alpha < 100) {
this._alpha += alphaChange;
} else {
this._alpha = 100;
}
if (this._x < -this._width || this._x > Stage.width + this._width || this._y < -this._height || this._y > Stage.height + this._height) {
this.removeMovieClip();
}
}
this.createEmptyMovieClip('universe_mc', 10);
var initVel = 4;
var accel = 1.1;
var alphaChange = 3;
var myInterval = setInterval(AddStar, 50);
var maxOffset = Math.sqrt(Math.pow(Stage.width / 2, 2) + Math.pow(Stage.height / 2, 2));
var i = 0;
}
}
movieClip 11 {
}