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 - (Stage.width / 2);
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.rot = random(100) - 50;
_local1.onEnterFrame = FlyingStar;
}
function FlyingStar() {
this._x = this._x + this._xVel;
this._y = this._y + this._yVel;
this._rotation = this._rotation + this.rot;
this._xVel = this._xVel * accel;
this._yVel = this._yVel * accel;
if (this._alpha < 100) {
this._alpha = 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();
}
}
function createSnow(container, numberOfFlakes) {
var _local4 = 0;
while (_local4 < numberOfFlakes) {
var _local2 = container.attachMovie("snow_mc", "snow" + container.getNextHighestDepth(), container.getNextHighestDepth());
_local2.r = 1 + (Math.random() * speed);
_local2.k = -3.14159265358979 + (Math.random() * Math.PI);
_local2.rad = 0;
var _local3 = random(50) + 50;
_local2._xscale = _local3;
_local2._yscale = _local3;
_local2._alpha = random(100) + 50;
_local2._rotation = random(360);
_local2._x = random(movieWidth);
_local2._y = random(movieHeight);
_local2.onEnterFrame = function () {
this.rad = this.rad + ((this.k / 180) * Math.PI);
this._x = this._x - (Math.cos(this.rad) + wind);
this._y = this._y + speed;
this._rotation = this._rotation + this.r;
if (this._y >= movieHeight) {
this._y = -5;
}
if (this._x >= movieWidth) {
this._x = 1;
}
if (this._x <= 0) {
this._x = movieWidth - 1;
}
};
_local4++;
}
}
var initVel = 7;
var accel = 1.2;
var alphaChange = 5;
var myInterval = setInterval(AddStar, 5);
var maxOffset = Math.sqrt(Math.pow(Stage.width / 2, 2) + Math.pow(Stage.height / 2, 2));
var i = 0;
if (laa != 333) {
var my_sound = new Sound();
my_sound.attachSound("lu");
my_sound.start(0, 99999);
laa = 333;
}
Frame 39
stop();
Frame 168
stop();
Symbol 7 MovieClip [star] Frame 1
gotoAndStop(random(5) + 1);