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.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 < 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();
}
}
var initVel = 7;
var accel = 1.2;
var alphaChange = 10;
var maxOffset = Math.sqrt(Math.pow(Stage.width / 2, 2) + Math.pow(Stage.height / 2, 2));
var i = 0;
_root.universe_mc._alpha = 0;
_root.onEnterFrame = function () {
_root.universe_mc._alpha = _root.universe_mc._alpha + 1;
};
if (laa != 333) {
var my_sound = new Sound();
my_sound.attachSound("lups");
my_sound.start(0, 99999);
laa = 333;
var myInterval = setInterval(AddStar, 2);
}
Frame 53
stop();
_root.onEnterFrame = function () {
_root.universe_mc._alpha = 50;
if (random(10) < 2) {
m._x = (-40 + random(20)) - 10;
m._y = (-30 + random(20)) - 10;
}
if (random(10) < 2) {
m._rotation = -2 + random(4);
}
};