Frame 1
function itemHandler1(obj, item) {
getURL ("http://www.nonoba.com");
}
MovieClip.prototype.tabEnabled = false;
Button.prototype.tabEnabled = false;
TextField.prototype.tabEnabled = false;
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item1 = new ContextMenuItem("FIVE", itemHandler1);
myMenu.customItems.push(item1);
_root.menu = myMenu;
mochi.MochiServices.connect("259d0c4753cbf115");
Frame 2
stop();
gotoAndPlay (4);
Frame 3
stop();
Frame 4
stop();
hp2 = 50;
Instance of Symbol 42 MovieClip "tempchar" in Frame 4
onClipEvent (load) {
if (hitTest(_root.enemyd)) {
_root.health._xscale = _root.health._xscale - 1;
}
}
Instance of Symbol 44 MovieClip "hp2" in Frame 4
onClipEvent (enterFrame) {
this._xscale = _root.hp2;
if (_root.hp2 <= 0) {
_root.hp2 = 0;
_root.gotoAndPlay(5);
}
}
Instance of Symbol 46 MovieClip "enemyd" in Frame 4
onClipEvent (enterFrame) {
if (_root.tempchar.hitTest(this)) {
_root.hp2 = _root.hp2 - 500;
}
}
Frame 5
function createBullets() {
var _local2 = this.attachMovie("bullet", "bullet" + bulletCount, 1000 + bulletCount);
bulletCount++;
_local2._x = (shipMc._x + (shipMc._width / 2)) - (_local2._width / 2);
_local2._y = shipMc._y + _local2._height;
bulletArray.push(_local2);
}
function moveBullets() {
if (bulletReady && (Key.isDown(32))) {
bulletReady = false;
currentTime = getTimer();
createBullets();
} else if ((currentTime + bulletDelay) <= getTimer()) {
bulletReady = true;
}
var _local1 = 0;
while (_local1 < bulletArray.length) {
bulletArray[_local1]._y = bulletArray[_local1]._y - bulletSpeed;
_local1++;
}
}
var bulletSpeed = 5;
var bulletReady = true;
var bulletDelay = 555;
var bulletArray = [];
var bulletCount = 0;
var shipMc = player;
this.onEnterFrame = function () {
moveBullets();
};
function wait() {
_root.score++;
}
stop();
hp = 625;
hp2 = 50;
var score = 0;
myTimer = setInterval(wait, 1000);
my_sound15 = new Sound();
my_sound15.attachSound("s1");
my_sound15.start(0, 0);
my_sound15.onSoundComplete = function () {
my_sound25 = new Sound();
my_sound25.attachSound("s2");
my_sound25.start(0, 99999);
};
var rain_speed = 30;
var rain_direction = 4;
var rain_density = 55;
_root.createEmptyMovieClip("rain_mc", _root.getNextHighestDepth());
i = 0;
while (i <= rain_density) {
_root.rain_mc.attachMovie("drop", "drop" + i, _root.rain_mc.getNextHighestDepth(), {_x:Math.random() * Stage.width, _y:Math.random() * Stage.height, _rotation:-50});
i++;
}
var inter = setInterval(function () {
i = 0;
while (i <= rain_density) {
_root.rain_mc["drop" + i]._y = _root.rain_mc["drop" + i]._y + rain_speed;
_root.rain_mc["drop" + i]._x = _root.rain_mc["drop" + i]._x + 5;
if (_root.rain_mc["drop" + i]._y > Stage.height) {
_root.rain_mc["drop" + i]._y = 0;
} else if (_root.rain_mc["drop" + i]._x > Stage.width) {
_root.rain_mc["drop" + i]._x = 0;
} else if (_root.rain_mc["drop" + i]._x < 0) {
_root.rain_mc["drop" + i]._x = Stage.width;
}
i++;
}
}, 20);
init = function () {
width = 700;
height = 700;
max_snowsize = 10;
snowflakes = 50;
snow = 0;
while (snow < snowflakes) {
t = attachMovie("snow", "snow" + snow, snow);
t._alpha = 20 + (Math.random() * 60);
t._x = ((-width) / 2) + (Math.random() * (1.5 * width));
t._y = ((-height) / 2) + (Math.random() * (1.5 * height));
t._xscale = (t._yscale = 50 + (Math.random() * (max_snowsize * 10)));
t.k = 1 + (Math.random() * 2);
t.wind = -1.5 + (Math.random() * 4.2);
t.onEnterFrame = mover;
snow++;
}
};
mover = function () {
this._y = this._y + this.k;
this._x = this._x + this.wind;
if (this._y > (height + 10)) {
this._y = -20;
}
if (this._x > (width + 20)) {
this._x = ((-width) / 2) + (Math.random() * (1.5 * width));
this._y = -20;
} else if (this._x < -20) {
this._x = ((-width) / 2) + (Math.random() * (1.5 * width));
this._y = -20;
}
};
init();
Instance of Symbol 288 MovieClip "smithy" in Frame 5
onClipEvent (load) {
if (hitTest(_root.bullet)) {
_root.health._xscale = _root.health._xscale - 1;
}
}
Instance of Symbol 292 MovieClip "hp" in Frame 5
onClipEvent (enterFrame) {
this._xscale = _root.hp;
if (_root.hp <= 0) {
_root.hp = 0;
_root.gotoAndPlay(10);
}
}
Instance of Symbol 320 MovieClip "b3" in Frame 5
onClipEvent (enterFrame) {
this._rotation = this._rotation + 12;
this._y = this._y + 12;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 625) + 75;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 625) + 75;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 625) + 75;
}
}
Instance of Symbol 321 MovieClip "b2" in Frame 5
onClipEvent (enterFrame) {
this._rotation = this._rotation + 8;
this._y = this._y + 8;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 650) + 50;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 650) + 50;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 650) + 50;
}
}
Instance of Symbol 320 MovieClip "b1" in Frame 5
onClipEvent (enterFrame) {
this._rotation = this._rotation + 4;
this._y = this._y + 4;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 322 MovieClip "q4" in Frame 5
onClipEvent (enterFrame) {
with (_root.player) {
mySpeed = 3;
myJump = 3;
if (Key.isDown(40)) {
_y = _y + mySpeed;
}
if (Key.isDown(38)) {
_y = _y - mySpeed;
}
if (Key.isDown(37)) {
_x = _x - mySpeed;
}
if (Key.isDown(39)) {
_x = _x + mySpeed;
}
if (walls.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x - myJump;
}
if (walls.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x + myJump;
}
if (walls.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y - myJump;
}
if (walls.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y + myJump;
}
if (_root.end.hitTest(_x, getBounds(_root).yMax, true)) {
_root.gotoAndStop(3);
}
}
}
Instance of Symbol 401 MovieClip "player" in Frame 5
onClipEvent (load) {
if (hitTest(_root.e1)) {
_root.health._xscale = _root.health._xscale - 1;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(82)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c4)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c5)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c6)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c7)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.c8)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.q1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.q2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.q3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.q4)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s4)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s5)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s6)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s7)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s8)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s9)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s10)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s11)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s12)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s13)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s14)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s15)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s16)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s17)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s18)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s19)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s20)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.s21)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.l1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.l2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.smithy)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sh1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sh2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sh3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sh4)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sh5)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.thunder)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.magnum)) {
_x = -500;
_y = 500;
}
if (_root.player.hitTest(_root.magnum2)) {
_x = -500;
_y = 500;
}
if (_root.player.hitTest(_root.bounceback)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn4)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn5)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn6)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.sn7)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.frozen)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.b1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.b2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.b3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.star1)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.star2)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.star3)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.star4)) {
_x = 357;
_y = 590;
}
if (_root.player.hitTest(_root.star5)) {
_x = 357;
_y = 590;
}
}
Instance of Symbol 404 MovieClip "tempcharq" in Frame 5
onClipEvent (load) {
if (hitTest(_root.enemyq)) {
_root.health._xscale = _root.health._xscale - 1;
}
}
Instance of Symbol 405 MovieClip "hp2" in Frame 5
onClipEvent (enterFrame) {
this._xscale = _root.hp2;
if (_root.hp2 <= 0) {
_root.hp2 = 0;
_root.gotoAndPlay(8);
}
}
Instance of Symbol 406 MovieClip "enemyq" in Frame 5
onClipEvent (enterFrame) {
if (_root.tempcharq.hitTest(this)) {
_root.hp2 = _root.hp2 - 500;
}
}
Frame 6
stop();
hp2 = 50;
init = function () {
width = 700;
height = 700;
max_snowsize = 10;
snowflakes = 50;
snow = 0;
while (snow < snowflakes) {
t = attachMovie("snow", "snow" + snow, snow);
t._alpha = 20 + (Math.random() * 60);
t._x = ((-width) / 2) + (Math.random() * (1.5 * width));
t._y = ((-height) / 2) + (Math.random() * (1.5 * height));
t._xscale = (t._yscale = 50 + (Math.random() * (max_snowsize * 10)));
t.k = 1 + (Math.random() * 2);
t.wind = -1.5 + (Math.random() * 4.2);
t.onEnterFrame = mover;
snow++;
}
};
mover = function () {
this._y = this._y + this.k;
this._x = this._x + this.wind;
if (this._y > (height + 10)) {
this._y = -20;
}
if (this._x > (width + 20)) {
this._x = ((-width) / 2) + (Math.random() * (1.5 * width));
this._y = -20;
} else if (this._x < -20) {
this._x = ((-width) / 2) + (Math.random() * (1.5 * width));
this._y = -20;
}
};
init();
Instance of Symbol 411 MovieClip "star5" in Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 15;
this._y = this._y + 15;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 412 MovieClip "star4" in Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 12;
this._y = this._y + 12;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 413 MovieClip "star3" in Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 9;
this._y = this._y + 9;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 414 MovieClip "star2" in Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
this._y = this._y + 6;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 415 MovieClip "star1" in Frame 6
onClipEvent (enterFrame) {
this._rotation = this._rotation + 3;
this._y = this._y + 3;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 404 MovieClip "tempcha" in Frame 6
onClipEvent (load) {
if (hitTest(_root.enemy)) {
_root.health._xscale = _root.health._xscale - 1;
}
}
Instance of Symbol 405 MovieClip "hp2" in Frame 6
onClipEvent (enterFrame) {
this._xscale = _root.hp2;
if (_root.hp2 <= 0) {
_root.hp2 = 0;
_root.gotoAndPlay(9);
}
}
Instance of Symbol 406 MovieClip "enemy" in Frame 6
onClipEvent (enterFrame) {
if (_root.tempcha.hitTest(this)) {
_root.hp2 = _root.hp2 - 500;
}
}
Frame 7
stop();
hp2 = 50;
init = function () {
width = 700;
height = 700;
max_snowsize = 10;
snowflakes = 50;
snow = 0;
while (snow < snowflakes) {
t = attachMovie("snow", "snow" + snow, snow);
t._alpha = 20 + (Math.random() * 60);
t._x = ((-width) / 2) + (Math.random() * (1.5 * width));
t._y = ((-height) / 2) + (Math.random() * (1.5 * height));
t._xscale = (t._yscale = 50 + (Math.random() * (max_snowsize * 10)));
t.k = 1 + (Math.random() * 2);
t.wind = -1.5 + (Math.random() * 4.2);
t.onEnterFrame = mover;
snow++;
}
};
mover = function () {
this._y = this._y + this.k;
this._x = this._x + this.wind;
if (this._y > (height + 10)) {
this._y = -20;
}
if (this._x > (width + 20)) {
this._x = ((-width) / 2) + (Math.random() * (1.5 * width));
this._y = -20;
} else if (this._x < -20) {
this._x = ((-width) / 2) + (Math.random() * (1.5 * width));
this._y = -20;
}
};
init();
Instance of Symbol 320 MovieClip "b3" in Frame 7
onClipEvent (enterFrame) {
this._rotation = this._rotation + 12;
this._y = this._y + 12;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 625) + 75;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 625) + 75;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 625) + 75;
}
}
Instance of Symbol 321 MovieClip "b2" in Frame 7
onClipEvent (enterFrame) {
this._rotation = this._rotation + 8;
this._y = this._y + 8;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 650) + 50;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 650) + 50;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 650) + 50;
}
}
Instance of Symbol 320 MovieClip "b1" in Frame 7
onClipEvent (enterFrame) {
this._rotation = this._rotation + 4;
this._y = this._y + 4;
if (this._y >= 700) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x <= 50) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
if (this._x >= 650) {
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 675) + 25;
}
}
Instance of Symbol 404 MovieClip "tempchaa" in Frame 7
onClipEvent (load) {
if (hitTest(_root.enemyy)) {
_root.health._xscale = _root.health._xscale - 1;
}
}
Instance of Symbol 405 MovieClip "hp2" in Frame 7
onClipEvent (enterFrame) {
this._xscale = _root.hp2;
if (_root.hp2 <= 0) {
_root.hp2 = 0;
_root.gotoAndPlay(8);
}
}
Instance of Symbol 406 MovieClip "enemyy" in Frame 7
onClipEvent (enterFrame) {
if (_root.tempchaa.hitTest(this)) {
_root.hp2 = _root.hp2 - 500;
}
}
Frame 8
gotoAndPlay (6);
Frame 9
gotoAndPlay (7);
Frame 10
stopAllSounds();
gotoAndPlay (11);
Frame 11
stop();
clearInterval(myTimer);
mochi.MochiScores.showLeaderboard({boardID:"03b088394204ad9e", score:_root.score});
myInterval = setInterval(countUp, 1000);
Frame 12
stop();
my_sound55 = new Sound();
my_sound55.attachSound("finish");
my_sound55.start(0, 0);
credits._visible = false;
creditsa._visible = true;
creditsb._visible = false;
Frame 13
stop();
Frame 14
stop();
Symbol 10 MovieClip Frame 5
gotoAndPlay (1);
Symbol 11 MovieClip [bullet] Frame 1
my_sound15 = new Sound();
my_sound15.attachSound("bulletsound");
my_sound15.start(0, 0);
this.onEnterFrame = function () {
if ((((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) || (this._y > Stage.height)) {
this.removeMovieClip();
}
};
Instance of Symbol 10 MovieClip in Symbol 11 MovieClip [bullet] Frame 1
onClipEvent (enterFrame) {
if (_root.smithy.hitTest(this)) {
_root.hp = _root.hp - 0.5;
}
}
Symbol 22 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 31 Button
on (release) {
_root.play();
}
Symbol 32 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 32 MovieClip Frame 2
gotoAndPlay (1);
Symbol 435 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 436 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 39 Button
on (release, keyPress "<Enter>") {
if (password == "5") {
gotoAndStop (4);
} else if (password == "55") {
gotoAndStop (4);
} else {
gotoAndStop (3);
}
}
Symbol 46 MovieClip Frame 470
stop();
Symbol 82 MovieClip Frame 121
stop();
Symbol 86 MovieClip Frame 419
stopAllSounds();
Symbol 86 MovieClip Frame 470
stop();
Symbol 90 MovieClip Frame 5000
stop();
Symbol 101 MovieClip Frame 5000
stop();
Symbol 108 MovieClip Frame 20
gotoAndPlay (1);
Symbol 113 MovieClip Frame 296
stop();
Symbol 114 MovieClip Frame 222
stop();
Symbol 119 MovieClip Frame 900
gotoAndPlay (1);
Symbol 123 MovieClip Frame 11111
gotoAndPlay (1);
Symbol 164 MovieClip Frame 4785
my_sound40 = new Sound();
my_sound40.attachSound("starthing");
my_sound40.start(0, 4);
my_sound40.onSoundComplete = function () {
my_sound45 = new Sound();
my_sound45.attachSound("starthingv2");
my_sound45.start(0, 0);
};
Symbol 164 MovieClip Frame 5000
stop();
Symbol 166 MovieClip Frame 5000
stop();
Symbol 168 MovieClip Frame 5000
stop();
Symbol 170 MovieClip Frame 5000
stop();
Symbol 172 MovieClip Frame 5000
stop();
Symbol 174 MovieClip Frame 5000
stop();
Symbol 176 MovieClip Frame 5000
stop();
Symbol 178 MovieClip Frame 5000
stop();
Symbol 182 MovieClip Frame 41
gotoAndPlay (1);
Symbol 183 MovieClip Frame 5000
stop();
Symbol 186 MovieClip Frame 5000
stop();
Symbol 191 MovieClip Frame 5000
stop();
Symbol 202 MovieClip Frame 5000
stop();
Symbol 213 MovieClip Frame 5000
stop();
Symbol 224 MovieClip Frame 5000
stop();
Symbol 232 MovieClip Frame 5000
stop();
Symbol 240 MovieClip Frame 5000
stop();
Symbol 250 MovieClip Frame 5000
stop();
Symbol 256 MovieClip Frame 1200
stop();
Symbol 288 MovieClip Frame 5000
stop();
Symbol 296 MovieClip Frame 7
gotoAndPlay (1);
Symbol 297 MovieClip Frame 701
gotoAndPlay (1);
Symbol 298 MovieClip Frame 501
gotoAndPlay (1);
Symbol 308 MovieClip Frame 13
gotoAndPlay (1);
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 325 MovieClip Frame 20
gotoAndPlay (1);
Symbol 326 MovieClip Frame 94
gotoAndPlay (1);
Symbol 328 MovieClip Frame 20
gotoAndPlay (1);
Symbol 329 MovieClip Frame 410
gotoAndPlay (1);
Symbol 331 MovieClip Frame 20
gotoAndPlay (1);
Symbol 332 MovieClip Frame 180
gotoAndPlay (1);
Symbol 333 MovieClip Frame 20
gotoAndPlay (1);
Symbol 334 MovieClip Frame 150
gotoAndPlay (1);
Symbol 337 MovieClip Frame 20
gotoAndPlay (1);
Symbol 338 MovieClip Frame 144
gotoAndPlay (1);
Symbol 339 MovieClip Frame 15
gotoAndPlay (1);
Symbol 340 MovieClip Frame 100
gotoAndPlay (1);
Symbol 343 MovieClip Frame 20
gotoAndPlay (1);
Symbol 344 MovieClip Frame 290
gotoAndPlay (1);
Symbol 346 MovieClip Frame 15
gotoAndPlay (1);
Symbol 347 MovieClip Frame 70
gotoAndPlay (1);
Symbol 349 MovieClip Frame 20
gotoAndPlay (1);
Symbol 350 MovieClip Frame 200
gotoAndPlay (1);
Symbol 353 MovieClip Frame 20
gotoAndPlay (1);
Symbol 354 MovieClip Frame 320
gotoAndPlay (1);
Symbol 357 MovieClip Frame 20
gotoAndPlay (1);
Symbol 358 MovieClip Frame 160
gotoAndPlay (1);
Symbol 360 MovieClip Frame 20
gotoAndPlay (1);
Symbol 361 MovieClip Frame 130
gotoAndPlay (1);
Symbol 363 MovieClip Frame 25
gotoAndPlay (1);
Symbol 364 MovieClip Frame 300
gotoAndPlay (1);
Symbol 367 MovieClip Frame 20
gotoAndPlay (1);
Symbol 368 MovieClip Frame 180
gotoAndPlay (1);
Symbol 370 MovieClip Frame 20
gotoAndPlay (1);
Symbol 371 MovieClip Frame 230
gotoAndPlay (1);
Symbol 373 MovieClip Frame 25
gotoAndPlay (1);
Symbol 374 MovieClip Frame 400
gotoAndPlay (1);
Symbol 377 MovieClip Frame 15
gotoAndPlay (1);
Symbol 378 MovieClip Frame 110
gotoAndPlay (1);
Symbol 380 MovieClip Frame 100
gotoAndPlay (1);
Symbol 382 MovieClip Frame 20
gotoAndPlay (1);
Symbol 383 MovieClip Frame 600
gotoAndPlay (1);
Symbol 385 MovieClip Frame 20
gotoAndPlay (1);
Symbol 386 MovieClip Frame 200
gotoAndPlay (1);
Symbol 388 MovieClip Frame 20
gotoAndPlay (1);
Symbol 389 MovieClip Frame 220
gotoAndPlay (1);
Symbol 390 MovieClip Frame 5000
stop();
Symbol 397 MovieClip Frame 20
gotoAndPlay (1);
Symbol 399 MovieClip Frame 20
gotoAndPlay (1);
Symbol 406 MovieClip Frame 5000
stop();
Symbol 409 MovieClip Frame 5000
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 411 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 413 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 414 MovieClip Frame 1
stop();
Symbol 414 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 415 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 8
this._y = (-Math.random()) * 300;
this._x = (Math.random() * 300) + 25;
_root.score = _root.score + 100;
_root.killed++;
_root.time = _root.time + 0.8;
gotoAndStop (1);
Symbol 422 Button
on (release) {
credits._visible = false;
creditsa._visible = true;
creditsb._visible = false;
}
Symbol 423 Button
on (release) {
credits._visible = true;
creditsa._visible = false;
creditsb._visible = true;
}
Symbol 431 MovieClip Frame 200
gotoAndPlay (1);