Frame 1
stop();
_root.WPI_ArcadeStartSingleGame = function () {
trace("WPI_ArcadeStartSingleGame called - the current game has started");
};
_root.WPI_ArcadeStopSingleGame = function (score) {
trace("WPI_ArcadeStopSingleGame called - the current game has finished with score: " + score);
};
Frame 2
stop();
stopAllSounds();
mm.gotoAndPlay(1);
lives = 1;
var sound = new Sound(this);
sound.attachSound("menumoosic");
sound.start(0, 99999);
sound.setVolume(50);
Instance of Symbol 150 MovieClip "structions" in Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 166 MovieClip "scorescreen" in Frame 2
onClipEvent (load) {
if (_parent.dead) {
_visible = true;
} else {
_visible = false;
}
}
Frame 3
function particleness() {
p++;
if (p > (s + 200)) {
p = s + 3;
}
attachMovie("particle", "p_" + p, p);
this["p_" + p]._rotation = Math.random() * 360;
this["p_" + p]._x = ship._x - (Math.cos((ship._rotation * Math.PI) / 180) * shipwid);
this["p_" + p]._y = ((ship._y + 15) + ((Math.random() * 15) - (Math.random() * 15))) - (Math.sin((ship._rotation * Math.PI) / 180) * shipwid);
this["p_" + p].spd = 8 + (Math.random() * 5);
this["p_" + p]._alpha = (Math.random() * 40) + 60;
if (this["p_" + p]._alpha > alph) {
this["p_" + p]._alpha = alph;
}
this["p_" + p].onEnterFrame = function () {
if (dead) {
removeMovieClip(this);
}
if (!gpause) {
this._x = this._x - this.spd;
this._rotation = this._rotation + this.spd;
this._alpha = this._alpha - this.spd;
if ((this._alpha <= 0) || (this._x < -20)) {
removeMovieClip(this);
}
}
};
}
function espawn() {
a++;
if (a > (s + 400)) {
a = s + 201;
}
attachMovie("asteroid", "a_" + a, a);
this["a_" + a]._rotation = Math.random() * 360;
this["a_" + a].gotoAndStop(Math.round(Math.random() * 3) + 1);
this["a_" + a]._x = Stage.width + 100;
this["a_" + a]._y = (Math.random() * (Stage.height - this["a_" + a]._height)) + (this["a_" + a]._height / 2);
this["a_" + a].xspd = (5 + (Math.random() * 5)) * (90 / stimemax);
this["a_" + a].yint = Math.round(Math.random() * 4) + 1;
this["a_" + a].yspd = this["a_" + a].yint - (Math.round(Math.random()) * this["a_" + a].yint);
this["a_" + a].rspd = this["a_" + a].xspd - ((Math.round(Math.random()) * this["a_" + a].xspd) * 2);
this["a_" + a].hit = false;
this["a_" + a].onEnterFrame = function () {
if (dead) {
removeMovieClip(this);
}
if (!gpause) {
this._x = this._x - this.xspd;
this._y = this._y - this.yspd;
if (this._y < (this._height / 2)) {
this._y = this._height / 2;
this.yspd = this.yspd * -1;
}
if (this._y > (Stage.height - (this._height / 2))) {
this._y = Stage.height - (this._height / 2);
this.yspd = this.yspd * -1;
}
this._rotation = this._rotation - (this.rspd / 2);
if ((this._x < (-10 - this._width)) || (this._x > (Stage.width + 105))) {
removeMovieClip(this);
}
if (this.hit && (!damage)) {
damage = true;
}
var _local3 = -shipwid;
while (_local3 < shipwid) {
var _local2 = -shiphei;
while (_local2 < shiphei) {
if (naut.hitTest(_local3 + naut._x, _local2 + naut._y, true) && (this.hitTest(_local3 + naut._x, _local2 + naut._y, true))) {
this.hit = true;
}
if (ship.hitTest(_local3 + ship._x, _local2 + ship._y, true) && (this.hitTest(_local3 + ship._x, _local2 + ship._y, true))) {
if (this.hit == false) {
if (ship._x < this._x) {
if (this.xspd > 0) {
xspd = (-this.xspd) * 3;
this.xspd = this.xspd * -1.1;
} else {
xspd = this.xspd * 3;
this.xspd = this.xspd * 2;
}
} else if (this.xspd < 0) {
xspd = (-this.xspd) * 3;
this.xspd = this.xspd * -1.1;
} else {
xspd = this.xspd * 3;
this.xspd = this.xspd * 2;
}
}
if (ship._y < this._y) {
yspd = (-this.yspd) * 2;
this.yspd = this.yspd * -0.5;
} else {
yspd = (-this.yspd) * 2;
this.yspd = this.yspd * -0.5;
}
this.hit = true;
}
_local2 = _local2 + 10;
}
_local3 = _local3 + 15;
}
if ((this.hitTest(ship) == false) && (this.hitTest(naut) == false)) {
this.hit = false;
}
}
};
}
function starspawn() {
g++;
if (g > (s + 600)) {
g = s + 401;
}
attachMovie("goodstar", "gs_" + g, g);
this["gs_" + g]._rotation = Math.random() * 360;
this["gs_" + g]._x = Stage.width + 100;
this["gs_" + g]._y = (Math.random() * (Stage.height - this["gs_" + g]._height)) + (this["gs_" + g]._height / 2);
this["gs_" + g].spd = 5 + (Math.random() * 5);
this["gs_" + g].rspd = this["gs_" + g].spd - ((Math.round(Math.random()) * this["gs_" + g].spd) * 2);
this["gs_" + g].onEnterFrame = function () {
if (dead) {
removeMovieClip(this);
}
if (!gpause) {
this._x = this._x - this.spd;
this._rotation = this._rotation + (this.rspd / 3);
if (this.hitTest(naut)) {
splode(2, this._x, this._y);
starcount = starcount + 1;
score = score + 5;
removeMovieClip(this);
}
if (this._x < (-10 - this._width)) {
removeMovieClip(this);
}
}
};
}
function spawnguy() {
v++;
if (v > 800) {
v = 601;
}
attachMovie("wiggi", "w_" + v, v);
this["w_" + v]._rotation = Math.random() * 360;
this["w_" + v]._xscale = this["w_" + v]._xscale * -1;
this["w_" + v].frame1 = Math.round(Math.random() * 2) + 1;
this["w_" + v].wiggi.head.gotoAndStop(this["w_" + v].frame1);
this["w_" + v].wiggi.hand1.gotoAndStop(this["w_" + v].frame1);
this["w_" + v].wiggi.hand2.gotoAndStop(this["w_" + v].frame1);
this["w_" + v].wiggi.foot1.gotoAndStop(this["w_" + v].frame1);
this["w_" + v].wiggi.foot2.gotoAndStop(this["w_" + v].frame1);
this["w_" + v]._x = Stage.width + 100;
this["w_" + v]._y = (Math.random() * (Stage.height - this["w_" + v]._height)) + (this["w_" + v]._height / 2);
this["w_" + v].spd = 5 + (Math.random() * 5);
this["w_" + v].rspd = this["w_" + v].spd - ((Math.round(Math.random()) * this["w_" + v].spd) * 2);
this["w_" + v].onEnterFrame = function () {
if (dead) {
removeMovieClip(this);
}
if (!gpause) {
this._x = this._x - this.spd;
this._rotation = this._rotation + (this.rspd / 4);
if (this.hitTest(ship)) {
splode(1, this._x, this._y);
wigsave = wigsave + 1;
score = score + 10;
removeMovieClip(this);
}
if (this._x < (-10 - this._width)) {
removeMovieClip(this);
}
}
this.wiggi.head.gotoAndStop(this.frame1);
this.wiggi.hand1.gotoAndStop(this.frame1);
this.wiggi.hand2.gotoAndStop(this.frame1);
this.wiggi.foot1.gotoAndStop(this.frame1);
this.wiggi.foot2.gotoAndStop(this.frame1);
};
}
function splode(blah, xspot, yspot) {
var _local2 = s + 1000;
while (_local2 < (s + 1020)) {
attachMovie("splodepart", "bs_" + _local2, _local2);
this["bs_" + _local2].gotoAndStop(blah);
this["bs_" + _local2]._x = xspot;
this["bs_" + _local2]._y = yspot;
this["bs_" + _local2]._alpha = 70 + (Math.random() * 30);
this["bs_" + _local2].rot = Math.random() * 360;
this["bs_" + _local2].spd = 5 + (Math.random() * 5);
this["bs_" + _local2].onEnterFrame = function () {
this._y = this._y + (this.spd * Math.cos((Math.PI/180) * this.rot));
this._x = this._x - (this.spd * Math.sin((Math.PI/180) * this.rot));
this._rotation = this._rotation + (this.spd / 2);
this._alpha = this._alpha - this.spd;
if (this._alpha <= 0) {
removeMovieClip(this);
}
};
_local2++;
}
}
stop();
var sound = new Sound(this);
sound.attachSound("moosic");
sound.start(0, 99999);
sound.setVolume(50);
var spawncount = 0;
var damage = false;
var dead = false;
var score = 0;
var yspd = 0;
var xspd = 0;
var slow = 0.9;
var xmid = ((ship._x + _xmouse) / 2);
var ymid = ((ship._y + _ymouse) / 2);
var shipwid = (ship._width / 2);
var shiphei = (ship._height / 2);
var inte = 9;
var s = 0;
while (s < 100) {
attachMovie("star", "s_" + s, s);
this["s_" + s]._x = Math.random() * Stage.width;
this["s_" + s]._y = Math.random() * Stage.height;
this["s_" + s].spd = 5 + (Math.random() * 10);
this["s_" + s]._alpha = this["s_" + s].spd * 10;
this["s_" + s].onEnterFrame = function () {
if (dead) {
removeMovieClip(this);
}
if (!gpause) {
this._x = this._x - this.spd;
if (this._x <= -25) {
this._x = Stage.width + 25;
this._y = Math.random() * Stage.height;
}
}
};
s++;
}
var wigsave = 0;
var starcount = 0;
var lives = 5;
var pdown = false;
var gpause = false;
var p = (s + 3);
var a = (s + 201);
var g = (s + 401);
var v = (s + 601);
var stime = 0;
var stimemax = 132.5;
var oldxmouse = _xmouse;
var guyspawn = false;
var dtime = 0;
var alph = 100;
onEnterFrame = function () {
if (lives <= 0) {
sound.stop();
dead = true;
removeMovieClip(line);
Mouse.show();
gpause = false;
gotoAndStop ("start");
scorescreen._visible = true;
_root.WPI_ArcadeStopSingleGame(score);
}
if (!dead) {
if (!gpause) {
if (damage) {
dtime++;
if (dtime == 1) {
lives = lives - 1;
light.play();
}
if (((((dtime == 1) || (dtime == 10)) || (dtime == 20)) || (dtime == 30)) || (dtime == 40)) {
alph = 20;
}
if ((((dtime == 5) || (dtime == 15)) || (dtime == 25)) || (dtime == 35)) {
alph = 100;
}
if (dtime > 45) {
alph = 100;
damage = false;
dtime = 0;
}
}
naut._alpha = alph;
ship._alpha = alph;
Mouse.hide();
naut._x = _xmouse;
naut._y = _ymouse;
naut._rotation = (-(oldxmouse - _xmouse)) / 1.5;
oldxmouse = _xmouse;
if ((Key.isDown(40) || (Key.isDown(83))) && ((!Key.isDown(38)) && (!Key.isDown(87)))) {
if (yspd <= 15) {
yspd = yspd + 2;
}
} else if ((Key.isDown(38) || (Key.isDown(87))) && ((!Key.isDown(40)) && (!Key.isDown(83)))) {
if (yspd >= -15) {
yspd = yspd - 2;
}
} else {
yspd = yspd * slow;
}
if ((Key.isDown(39) || (Key.isDown(68))) && ((!Key.isDown(37)) && (!Key.isDown(65)))) {
if (xspd <= 15) {
xspd = xspd + 2;
}
} else if ((Key.isDown(37) || (Key.isDown(65))) && ((!Key.isDown(39)) && (!Key.isDown(68)))) {
if (xspd >= -15) {
xspd = xspd - 2;
}
} else {
xspd = xspd * slow;
}
if (ship._y < shiphei) {
ship._y = shiphei;
yspd = yspd * -0.5;
}
if (ship._y > (Stage.height - shiphei)) {
ship._y = Stage.height - shiphei;
yspd = yspd * -0.5;
}
if (ship._x < shipwid) {
ship._x = shipwid;
xspd = xspd * -0.5;
}
if (ship._x > (Stage.width - shipwid)) {
ship._x = Stage.width - shipwid;
xspd = xspd * -0.5;
}
ship._x = ship._x + xspd;
ship._y = ship._y + yspd;
ship._rotation = yspd;
var _local2 = 0;
while (_local2 < 3) {
particleness();
_local2++;
}
createEmptyMovieClip("line", s + 1);
line.moveTo(ship._x, ship._y);
line.lineStyle(2, 16777215, alph);
line.curveTo(xmid, ymid, _xmouse - 20, _ymouse);
xmid = xmid + (((((ship._x + _xmouse) - 20) / 2) - xmid) / inte);
ymid = ymid + ((((ship._y + _ymouse) / 2) - ymid) / inte);
stime++;
if ((spawncount % 4) == 0) {
if ((!guyspawn) && (stime > (stimemax / 5))) {
if ((Math.random() * 100) > 98) {
spawnguy();
guyspawn = true;
}
}
}
if ((!goodspawn) && (stime > (stimemax / 2))) {
starspawn();
goodspawn = true;
}
if (stime > stimemax) {
espawn();
if (stimemax > 50) {
stimemax = stimemax - 7.5;
}
guyspawn = false;
goodspawn = false;
spawncount++;
stime = 0;
}
} else {
Mouse.show();
}
if (Key.isDown(80)) {
if (!pdown) {
if (gpause) {
gpause = false;
} else {
gpause = true;
}
}
pdown = true;
} else {
pdown = false;
}
}
};
Symbol 10 MovieClip [asteroid] Frame 1
stop();
Symbol 10 MovieClip [asteroid] Frame 2
stop();
Symbol 10 MovieClip [asteroid] Frame 3
stop();
Symbol 10 MovieClip [asteroid] Frame 4
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 1
stop();
Symbol 46 MovieClip Frame 17
gotoAndPlay (15);
Symbol 47 Button
on (release) {
getURL ("http://www.wiggiworld.com", "_blank");
}
Symbol 56 MovieClip Frame 15
stop();
Symbol 58 Button
on (release) {
_root.gotoAndPlay("start");
}
Symbol 72 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
bl = _root.getBytesLoaded();
bt = _root.getBytesTotal();
perc = (bl / bt) * 100;
bar.bar._xscale = perc;
if (perc >= 100) {
this.gotoAndPlay("goplay");
delete this.onEnterFrame;
}
};
Symbol 72 MovieClip Frame 25
stop();
Symbol 115 Button
on (release) {
if ((structions._visible == false) && (scorescreen._visible == false)) {
sound.stop();
nextFrame();
_root.WPI_ArcadeStartSingleGame();
}
}
Symbol 116 Button
on (release) {
if (scorescreen._visible == false) {
structions._visible = true;
}
}
Symbol 125 Button
on (release) {
getURL ("http://coolio-niato.newgrounds.com/", _blank);
}
Symbol 126 Button
on (release) {
getURL ("http://donutmaster.newgrounds.com/", _blank);
}
Symbol 148 Button
on (release) {
_visible = false;
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 150 MovieClip Frame 2
stop();
Symbol 153 Button
on (release) {
if ((namebox.text != "") && (namebox.text != "Input Name")) {
ab20_09 = new LoadVars();
ab20_09.z = namebox.text;
ab20_09.x = _parent.score;
ab20_09.c = 1547;
ab20_09.v = "VNHBZL";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
_visible = false;
getURL ("http://www.armorbot.com/mytable/?id=1547", _blank);
}
}
Symbol 164 Button
on (release) {
_visible = false;
}
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 2
stop();
Symbol 174 MovieClip Frame 1
stop();