Frame 1
function AddStar() {
var _local1 = universe_mc.attachMovie("star", "star_" + i, i);
i++;
_local1._x = Math.random() * Stage.width;
_local1._y = Math.random() * Stage.height;
_local1._alpha = 0;
var _local3 = _local1._x;
var _local2 = _local1._y - (Stage.height / 2);
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local5 = Math.atan2(_local2, _local3);
_local1._xVel = initVel * Math.cos(_local5);
_local1._yVel = initVel * Math.sin(_local5);
_local1._xscale = (maxOffset - _local4) / 7;
_local1._yscale = (maxOffset - _local4) / 7;
_local1.onEnterFrame = FlyingStar;
}
function FlyingStar() {
this._x = this._x + this._xVel;
this._y = this._y + this._yVel;
this._xVel = this._xVel * accel;
this._yVel = this._yVel * accel;
if (this._alpha < 50) {
this._alpha = this._alpha + alphaChange;
} else {
this._alpha = 50;
}
if ((((this._x < (-this._width)) || (this._x > (Stage.width + this._width))) || (this._y < (-this._height))) || (this._y > (Stage.height + this._height))) {
this.removeMovieClip();
}
}
var initVel = 3;
var accel = 1.02;
var alphaChange = 2;
var myInterval = setInterval(AddStar, 2);
var maxOffset = Math.sqrt(Math.pow(Stage.width / 2, 2) + Math.pow(Stage.height / 2, 2));
var i = 0;
if (tuitui != 333) {
var my_sound = new Sound();
my_sound.attachSound("yh");
my_sound.start(0, 99999);
tuitui = 333;
}
Symbol 3 MovieClip [star] Frame 1
gotoAndStop(random(5) + 1);
Symbol 8 MovieClip Frame 1238
stop();