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].h = 0;
this[na].l = 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 _local4;
var _local3;
var _local5;
var _local8;
var _local7;
var _local6;
var _local9;
_local7 = _root._xmouse;
_local6 = _root._ymouse;
_local4 = this._x;
_local3 = this._y;
switch (t1) {
case 1 :
this._rotation = wrapvalue(this._rotation + 5);
this.s = this.s + (wv[this.h] / 3);
if ((++this.h) == WVM) {
this.h = 0;
}
if ((this.mba == 0) && (rand(28) == 0)) {
_local5 = setT(SCX / 2, SCY / 2, "eye", 2, 6);
_local5._rotation = this._rotation;
chgS(_local5, bdy.s);
this.eyemc = _local5;
this.mba = 15;
}
if (this.mba > 0) {
this.mba--;
bdy.eyemc._rotation = this._rotation;
bdy.eyemc._xscale = this.s;
bdy.eyemc._yscale = this.s;
}
break;
case 2 :
if (this._totalframes == this._currentframe) {
this.removeMovieClip();
}
break;
case 3 :
sp = 10;
if (rand(8) == 0) {
this.h = rand(4);
}
switch (this.h) {
case 0 :
_local3 = _local3 - sp;
break;
case 1 :
_local4 = _local4 + sp;
break;
case 2 :
_local3 = _local3 + sp;
break;
case 3 :
_local4 = _local4 - sp;
}
ax = brdRight(this);
if (_local4 > ax) {
_local4 = ax;
this.h = rand(4);
}
ax = brdLeft(this);
if (_local4 < ax) {
_local4 = ax;
this.h = rand(4);
}
ay = brdBottom(this);
if (_local3 > ay) {
_local3 = ay;
this.h = rand(4);
}
ay = brdTop(this);
if (_local3 < ay) {
_local3 = ay;
this.h = rand(4);
}
break;
case 4 :
this._rotation = rand(360);
if ((++this.h) == 5) {
this.removeMovieClip();
}
break;
case 5 :
if (rand(28) == 0) {
this.l = rand(2);
}
if (!(this.l === 0)) {
} else {
_local4 = _local4 + this.xx;
_local3 = _local3 + this.yy;
this._rotation = wrapvalue(this._rotation + this.rs);
}
this.h++;
if (((((this.h > 100) || (_local3 < hideTop(this))) || (_local3 > hideBottom(this))) || (_local4 < hideLeft(this))) || (_local4 > hideRight(this))) {
this.removeMovieClip();
}
break;
case 6 :
if (rand(20) == 0) {
this.xx = randF(10) - 5;
this.h = rand(2);
}
if (!(this.h === 0)) {
} else {
_local3 = _local3 + 5;
_local4 = _local4 + this.xx;
}
if (this.h == 0) {
this.l = ((this.l == 2) ? 3 : 2);
this.gotoAndStop(this.l);
} else {
this.gotoAndStop(1);
}
if ((rand(28) == 0) && (this.mba == 0)) {
this.mba = 15;
_local5 = setT(_local4, _local3, "we", 2, 3);
_local5._rotation = this._rotation;
chgS(_local5, this.s);
this.eyemc = _local5;
}
if (this.mba > 0) {
this.mba--;
this.eyemc._rotation = this._rotation;
this.eyemc._xscale = this.s;
eyemc._yscale = this.s;
this.eyemc._x = _local4;
this.eyemc._y = _local3;
}
if (_local3 <= hideBottom(this)) {
break;
}
this.removeMovieClip();
}
this._x = _local4;
this._y = _local3;
if ((this.smo == 0) && (t1 != 2)) {
this._xscale = this.s;
this._yscale = this.s;
}
};
return(this[na]);
}
SCX = Stage.width;
SCY = Stage.height;
MTDP = 300;
lo = 0;
mba = 0;
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);
tim1._visible = false;
tim1.onEnterFrame = function () {
if (rand(20) == 0) {
c = setT(rand(SCX), rand(SCY), "chr1", 4, 4);
c._rotation = rand(360);
c.gotoAndStop(rand(2) + 2);
chgS(c, 70);
}
if (rand(30) == 0) {
c = setT(SCX / 2, SCY / 2, "chr1", 5, 1);
c.xx = rand(101) - 50;
c.yy = rand(101) - 50;
c.rs = rand(51) - 25;
chgS(c, 70);
c.gotoAndStop(rand(2) + 2);
}
lo++;
if (lo == 50) {
lo = 0;
c = setT(rand(SCX), 0, "w", 6, 2);
chgS(c, 70);
c._y = hideTop(c);
c.mba = 0;
}
};
bdy = setT(SCX / 2, SCY / 2, "bd", 1, 5);
chgS(bdy, 100);
bdy.mba = 0;
i = 0;
while (i < 5) {
c = setT(rand(SCX), rand(SCY), "chr1", 3, 8);
c.h = rand(4);
c.gotoAndStop(1);
chgS(c, 60);
i++;
}
this.attachMovie("screen", "scr1", 10000);
this.scr1._x = 200;
this.scr1._y = 150;
this.scr1._alpha = 50;
sndObj[0] = new Sound(this);
sndObj[0].attachSound("pjtit.mp3");
sndObj[0].onSoundComplete = function () {
this.start();
};
sndObj[0].start();