Frame 1
function r2xx(r, sp) {
return(sp * Math.cos(r));
}
function r2yy(r, sp) {
return(sp * Math.sin(r));
}
function xy2r(xx, yy) {
return((Math.atan2(yy, xx) / Math.PI) * 180);
}
function rand(a) {
return(Math.floor(Math.random() * a));
}
function randF(a) {
return(Math.random() * a);
}
function wrapvalue(a) {
return(a % 360);
}
function rgb(r, g, b) {
return(((r << 16) + (g << 8)) + b);
}
function chgS(mc, s) {
mc.s = s;
mc._xscale = s;
mc._yscale = s;
}
function brdRight(mc) {
return(SCX - (mc._width / 2));
}
function brdBottom(mc) {
return(SCY - (mc._height / 2));
}
function brdTop(mc) {
return(mc._height / 2);
}
function brdLeft(mc) {
return(mc._width / 2);
}
function hideRight(mc) {
return(SCX + (mc._width / 2));
}
function hideBottom(mc) {
return((a = SCY + (mc._height / 2)));
}
function hideTop(mc) {
return((-mc._height) / 2);
}
function hideLeft(mc) {
return((-mc._width) / 2);
}
function setT(x, y, imgn, t1, pri) {
if (!tdp[pri]) {
tdp[pri] = 0;
}
na = ((imgn + pri) + "_") + tdp[pri];
this.attachMovie(imgn, na, (pri * MTDP) - tdp[pri]);
tdp[pri]++;
if (tdp[pri] == MTDP) {
tdp[pri] = 0;
}
this[na].t = t1;
this[na]._x = x;
this[na]._y = y;
this[na]._alpha = 255;
this[na].h = 0;
this[na]._xscale = 100;
this[na]._yscale = 100;
this[na].s = 100;
this[na].xx = 0;
this[na].yy = 0;
this[na].smo = 0;
if (!(t1 === 1)) {
} else {
this[na].ks = 0;
}
this[na].onEnterFrame = function () {
var _local5;
var _local3;
var _local4;
var _local8;
var _local7;
var _local6;
var _local9;
_local7 = _root._xmouse;
_local6 = _root._ymouse;
_local5 = this._x;
_local3 = this._y;
switch (this.t) {
case 1 :
_local3 = _local3 + this.yy;
if (rand(10) == 0) {
_local3 = _local3 + rand(50);
}
_local5 = _local5 + (wv[this.h] / 2);
if ((++this.h) == WVM) {
this.h = 0;
}
if (rand(15) == 0) {
this.rs = rand(31) - 15;
}
if (rand(50) == 0) {
this.t = 2;
this.yy = -3 - rand(8);
this.xx = rand(21) - 10;
}
this._rotation = wrapvalue(this._rotation + this.rs);
if (_local3 > hideBottom(this)) {
this.removeMovieClip();
}
break;
case 2 :
_local5 = _local5 + this.xx;
_local3 = _local3 + this.yy;
if (this.yy < 24) {
this.yy++;
}
this._rotation = wrapvalue(this._rotation + this.rs);
if (_local3 > hideBottom(this)) {
this.removeMovieClip();
}
break;
case 3 :
_local3 = _local3 - this.yy;
_local5 = _local5 + this.xx;
this.yy = this.yy + 0.2;
this.xx = this.xx + 0.2;
this.s = this.s + 5;
this._alpha = this._alpha - 20;
if (this._alpha < 50) {
this.removeMovieClip();
}
this._rotation = wrapvalue(this._rotation - 20);
break;
case 4 :
this.h++;
if (rand(5) == 0) {
_local4 = setT(((SCX / 2) + 7) + rand(3), ((SCY / 2) + 5) + rand(3), "iki", 3, 5);
_local4._alpha = 255;
chgS(_local4, 50);
_local4.yy = 3;
_local4.xx = 2 + rand(3);
_local4._rotaion = rand(360);
}
if (this.h != 20) {
break;
}
ikiok = 1;
this.removeMovieClip();
}
this._x = _local5;
this._y = _local3;
if (this.smo == 0) {
this._xscale = this.s;
this._yscale = this.s;
}
};
return(this[na]);
}
SCX = Stage.width;
SCY = Stage.height;
MTDP = 300;
lo = 0;
ikiok = 1;
var tdp = new Array();
var WVM = 32;
var wv = [-1, -2, -3, -4, -5, -6, -7, -8, -8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1];
var sndObj = new Array(2);
sndObj[0] = new Sound(this);
sndObj[0].attachSound("xm1.mp3");
sndObj[0].onSoundComplete = function () {
this.start();
};
sndObj[0].start();
tim1._visible = false;
tim1.onEnterFrame = function () {
if ((lo % 5) == 0) {
c = setT(rand(SCX), (SCY / 2) + 50, "s" + (rand(4) + 1), 1, 10);
chgS(c, 100);
c._alpha = 255;
c._y = hideTop(c);
c.yy = 3 + rand(3);
c.rs = rand(31) - 15;
}
lo++;
if ((rand(32) == 0) && (ikiok == 1)) {
ikiok = 0;
c = setT(SCX / 2, SCY / 2, "k", 4, 3);
}
};