Frame 1
stop();
Stage.showMenu = false;
MochiAd.showPreloaderAd({id:"185afdf22ca363a0", res:"600x450"});
Frame 2
play();
Frame 3
stop();
Frame 4
play();
Frame 5
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("a0ec8c85", this, 10301, true);
targ = 1;
balls = [];
bullets = [];
powerups = [];
var continues = 2;
var score = 0;
_global.checkme = false;
_global.totalScore = 0;
var bonus = 300;
var soundOn = true;
function addBall(group, x, y, speed, angle, s) {
b = _root.attachMovie(group, "ballmc" + d, d);
b._x = x;
b._y = y;
b._width = s;
b._height = s;
xs = Math.cos(angle) * speed;
ys = Math.sin(angle) * speed;
ang = Math.atan2(ys, xs);
b._rotation = ang * 57.2957795130823;
bo = (_root["ball" + d] = {mc:b, po:balls.length, x:b._x, y:b._y, speed:speed, xv:xs, yv:ys, rad:s / 2, group:group});
b.ob = bo;
balls.push(bo);
d++;
}
function moveBall(ob) {
ob.x = ob.x + ob.xv;
ob.y = ob.y + ob.yv;
hit = checkBounds(ob);
if (hit) {
ob.mc.gotoAndStop(2);
}
}
function checkBounds(ob) {
var _local4 = ob.x - bound.cenX;
var _local3 = ob.y - bound.cenY;
var _local2 = Math.atan2(_local3, _local4);
_local4 = _local4 + (Math.cos(_local2) * ob.rad);
_local3 = _local3 + (Math.sin(_local2) * ob.rad);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 >= bound.rad) {
xl2 = Math.cos(_local2) * ob.rad;
yl2 = Math.sin(_local2) * ob.rad;
ob.x = (bound.cenX + (Math.cos(_local2) * bound.rad)) - xl2;
ob.y = (bound.cenY + (Math.sin(_local2) * bound.rad)) - yl2;
if (ob != ship) {
ob.mc._rotation = _local2 * 57.2957795130823;
}
return(true);
}
return(false);
}
function rebound(ob) {
xdist = ob.x - bound.cenX;
ydist = ob.y - bound.cenY;
angle = Math.atan2(ydist, xdist) + (Math.PI/2);
xproject = (Math.cos(angle) * ob.xv) + (Math.sin(angle) * ob.yv);
yproject = (Math.cos(angle) * ob.yv) - (Math.sin(angle) * ob.xv);
yreverse = yproject * -1;
xnum = (xproject * Math.cos(angle)) - (yreverse * Math.sin(angle));
ynum = (yreverse * Math.cos(angle)) + (xproject * Math.sin(angle));
shipang = Math.atan2(ynum, xnum) * 57.2957795130823;
if (ob != ship) {
ob.xv = xnum;
ob.yv = ynum;
ang = Math.atan2(ob.yv, ob.xv);
ob.mc._rotation = ang * 57.2957795130823;
} else {
ob.ang = shipang;
}
}
function enemyShot(enemy) {
var _local5 = shipmc._x - enemy.x;
var _local6 = shipmc._y - enemy.y;
var _local3 = Math.atan2(_local6, _local5);
bu = _root.attachMovie("splatbomb", "blast" + _root.bul, ++_root.bul);
bu._x = enemy.x;
bu._y = enemy.y;
bu.xv = Math.cos(_local3) * 4;
bu.yv = Math.sin(_local3) * 4;
bu._rotation = _local3 * 57.2957795130823;
bu.onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xv;
this._y = this._y + this.yv;
hit = checkBounds({x:this._x, y:this._y, rad:3});
if (hit) {
this.removeMovieClip();
}
if (_root.shipmc.hitTest(this._x, this._y, true)) {
this.removeMovieClip();
}
}
};
}
function buildLevel(level) {
var _local1 = 0;
while (_local1 < level.length) {
ob = level[_local1];
addBall(ob.g, ob.x, ob.y, ob.speed, ob.angle, ob.s);
_local1++;
}
}
stop();
checkme = true;
_root.score = 0;
_root.bonus = 300;
_root.totalScore = 0;
_root.continues = 2;
_root.shipmc.removeMovieClip();
_root.popup.removeMovieClip();
for (var i in _root.bullets) {
_root.bullets[i].removeMovieClip();
}
var i = 0;
while (i < 10) {
_root["trail" + i].removeMovieClip();
i++;
}
_root.bullets = [];
bound = {cenX:boundmc._x, cenY:boundmc._y, rad:boundmc._width / 2};
balls = [];
var d = 0;
var pressed = false;
_root.attachMovie("front", "front", 999999);
front._x = 76;
front._y = 56;
this.onEnterFrame = function () {
a = balls;
var _local2 = 0;
while (_local2 < a.length) {
if (_root.balls[_local2] != undefined) {
ball = _root.balls[_local2];
moveBall(ball);
ball.mc._x = ball.x;
ball.mc._y = ball.y;
}
_local2++;
}
};
menuLevel = [{g:"ball", x:_root.bound.cenX + 93.65, y:_root.bound.cenY + -32.55, speed:3, angle:78, s:40}, {g:"ball", x:_root.bound.cenX + -29.35, y:_root.bound.cenY + 109.45, speed:3, angle:178, s:70}, {g:"divider", x:_root.bound.cenX + -6.35000000000002, y:_root.bound.cenY + -100.55, speed:2, angle:234, s:40}, {g:"mutant", x:_root.bound.cenX + -112.35, y:_root.bound.cenY + -28.55, speed:2, angle:320, s:70}];
buildLevel(menuLevel);
Instance of Symbol 305 MovieClip "sounds" in Frame 5
onClipEvent (load) {
function playStick() {
if (_root.soundOn) {
stick.start();
}
}
function playShot() {
if (_root.soundOn) {
shot.start();
}
}
function playPop() {
if (_root.soundOn) {
pop.start();
}
}
function playBoom() {
if (_root.soundOn) {
boom.start();
}
}
function playPowerup() {
if (_root.soundOn) {
powerup.start();
}
}
function playPowerdown() {
if (_root.soundOn) {
powerdown.start();
}
}
function playRocket() {
if (_root.soundOn) {
rocket.start();
}
}
function playSshot() {
if (_root.soundOn) {
sshot.start();
}
}
function playDrop() {
if (_root.soundOn) {
drop.start();
}
}
var soundpress = false;
bgloop = new Sound();
bgloop.attachSound("bgloop");
if (_root.soundOn == true) {
bgloop.start(0, 99999);
}
stick = new Sound();
stick.attachSound("stick");
shot = new Sound();
shot.attachSound("pew");
pop = new Sound();
pop.attachSound("pop");
boom = new Sound();
boom.attachSound("boom");
powerup = new Sound();
powerup.attachSound("powerupsound");
powerdown = new Sound();
powerdown.attachSound("powerdown");
rocket = new Sound();
rocket.attachSound("rocket");
sshot = new Sound();
sshot.attachSound("sshot");
drop = new Sound();
drop.attachSound("drop");
}
onClipEvent (enterFrame) {
if (Key.isDown(83)) {
if (soundpress == false) {
if (_root.soundOn == true) {
_root.soundOn = false;
_root.sounds.bgloop.stop();
} else {
_root.soundOn = true;
_root.sounds.bgloop.start(0, 99999);
}
soundpress = true;
}
} else {
soundpress = false;
}
}
Frame 6
function resetPlayer() {
shipmc.gotoAndStop(4);
ship.rad = 10;
ship.fireRate = 12;
ship.xv = 0;
ship.yv = 0;
gun = 1;
bounce = false;
rapidFire = false;
ship.shield = false;
pupob.missile = 0;
pupob.shield = 0;
pupob.bounce = 0;
pupob.rapid = 0;
pupob.mines = 0;
pupob.pmines = 0;
}
function updatePlayer() {
ang = ship.ang * (Math.PI/180);
ship.xv = Math.cos(ang) * ship.speed;
ship.yv = Math.sin(ang) * ship.speed;
ship.x = ship.x + ship.xv;
ship.y = ship.y + ship.yv;
shipmc._x = ship.x;
shipmc._y = ship.y;
shipmc._rotation = ship.ang;
hit = checkBounds(ship);
if (hit) {
rebound(ship);
ship.speed = ship.speed - 3;
if (ship.speed < 0) {
ship.speed = 0;
}
}
if (ship.speed > 3) {
t = _root.attachMovie("shipTrail", "trail" + trails, ++bul);
_root.trails++;
if (_root.trails == 10) {
_root.trails = 0;
}
t._x = shipmc._x;
t._y = shipmc._y;
t._rotation = shipmc._rotation;
t.onEnterFrame = function () {
if (!_root.gamePaused) {
if (ship.dead == true) {
this.removeMovieClip();
}
this._width = this._width - 1;
this._height = this._height - 1;
if (this._xscale <= 25) {
this.removeMovieClip();
}
}
};
}
}
function moveBullet(bullet) {
if (bullet.host.dead == true) {
bullet.gotoAndStop(3);
}
if (((bullet.xv == 0) && (bullet.yv == 0)) && (bullet.group != 4)) {
n = bullet.num;
bullet.removeMovieClip();
bullets.splice(n, 1);
var _local4 = n;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
}
if (bullet.dead == true) {
if (bullet.host.dead != true) {
h = bullet.host;
mineExplode(h);
h.dead = true;
}
n = bullet.num;
bullet.removeMovieClip();
bullets.splice(n, 1);
var _local4 = n;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
} else {
if (bullet.stuck != true) {
bullet._x = bullet._x + bullet.xv;
bullet._y = bullet._y + bullet.yv;
}
out = offScreen(bullet);
if (out) {
bullets.splice(bullet.num, 1);
var _local4 = bullet.num;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
bullet.removeMovieClip();
return(0);
}
hit = hitEnemy(bullet);
if (hit) {
bullets.splice(bullet.num, 1);
var _local4 = bullet.num;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
bullet.removeMovieClip();
return(0);
}
if (bullet.group == 2) {
if (bullet.targ != undefined) {
var _local7 = bullet._x - bullet.targ._x;
var _local8 = bullet._y - bullet.targ._y;
var _local5 = (Math.atan2(_local8, _local7) * 57.2957795130823) - 180;
if (_local5 < 0) {
_local5 = _local5 + 360;
}
if (_local5 > 360) {
_local5 = _local5 - 360;
}
rot = bullet._rotation;
if (rot < 0) {
rot = rot + 360;
}
if (rot > 360) {
rot = rot - 360;
}
if (rot > _local5) {
if ((rot - _local5) <= 180) {
bullet._rotation = bullet._rotation - 3;
} else {
bullet._rotation = bullet._rotation + 3;
}
} else if (rot != _local5) {
if ((_local5 - rot) <= 180) {
bullet._rotation = bullet._rotation + 2;
} else {
bullet._rotation = bullet._rotation - 2;
}
}
var _local6 = bullet._rotation * (Math.PI/180);
bullet.xv = Math.cos(_local6) * 10;
bullet.yv = Math.sin(_local6) * 10;
}
t = _root.attachMovie("misileTrail", "trail" + bul, ++bul);
t._x = bullet._x;
t._y = bullet._y;
t._rotation = bullet._rotation;
t.father = bullet;
t.onEnterFrame = function () {
if (!_root.gamePaused) {
if (this.father == undefined) {
this.removeMovieClip();
}
this._width = this._width - 1;
this._height = this._height - 1;
if (this._xscale <= 25) {
this.removeMovieClip();
}
}
};
t2 = _root.attachMovie("misileTrail", "trail" + bul, ++bul);
var _local5 = bullet._rotation * (Math.PI/180);
t2._x = bullet._x - (Math.cos(_local5) * 5);
t2._y = bullet._y - (Math.sin(_local5) * 5);
t2._rotation = bullet._rotation;
t2.father = bullet;
t2.onEnterFrame = function () {
if (!_root.gamePaused) {
if (this.father == undefined) {
this.removeMovieClip();
}
this._width = this._width - 1;
this._height = this._height - 1;
if (this._xscale <= 25) {
this.removeMovieClip();
}
}
};
} else if (bullet.group == 3) {
if (bullet.stuck == true) {
bullet._x = bullet.host.x;
bullet._y = bullet.host.y;
bullet.timer--;
if (bullet.timer <= 0) {
bullet.gotoAndStop(3);
}
}
} else if (bullet.group == 4) {
bullet.timer--;
if (bullet.timer <= 0) {
bullet._alpha = bullet._alpha - 2;
}
if (bullet._alpha <= 0) {
bullets.splice(bullet.num, 1);
var _local4 = bullet.num;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
bullet.removeMovieClip();
}
}
}
}
function offScreen(bullet) {
var _local3 = bullet._x - bound.cenX;
var _local4 = bullet._y - bound.cenY;
var _local9 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
var _local2 = Math.atan2(_local4, _local3);
var _local6 = bound.cenX + (Math.cos(_local2) * bound.rad);
var _local5 = bound.cenY + (Math.sin(_local2) * bound.rad);
var _local7 = bound.cenX + (Math.cos(_local2) * (bound.rad - 10));
var _local8 = bound.cenY + (Math.sin(_local2) * (bound.rad - 10));
if (_local9 > bound.rad) {
if (bullet.group != 2) {
bullet._x = _local6;
bullet._y = _local5;
} else {
bullet._x = _local7;
bullet._y = _local8;
}
if (bounce == true) {
if (bullet.bounced != true) {
bullet.bounced = true;
bullet.x = bullet._x;
bullet.y = bullet._y;
bullet.mc = bullet;
rebound(bullet);
} else if (bullet.stuck != true) {
return(true);
}
} else if (bullet.stuck != true) {
return(true);
}
}
}
function fire() {
_root.bul++;
if (gun == 1) {
bu = _root.attachMovie("blast", "blast" + _root.bul, _root.bul);
ang = _root.shipmc._rotation * (Math.PI/180);
bu._x = _root.shipmc._x + (Math.cos(ang) * (shipmc._width / 2));
bu._y = _root.shipmc._y + (Math.sin(ang) * (shipmc._height / 2));
bu.xv = Math.cos(ang) * 10;
bu.yv = Math.sin(ang) * 10;
bu.group = 1;
_root.bullets.push(bu);
bu.num = _root.bullets.length - 1;
}
}
stop();
for (i in _root.balls) {
_root.balls[i].mc.removeMovieClip();
delete _root.balls[i];
}
for (var j in _root.bullets) {
_root.bullets[j].removeMovieClip();
}
_root.bullets = [];
_root.balls = [];
_root.front.removeMovieClip();
_root.attachMovie("blocks", "blocks", 999999);
blocks._x = 300;
blocks._y = 224;
_root.blocks.blockdown.gotoAndPlay(2);
bound = {cenX:boundmc._x, cenY:boundmc._y, rad:boundmc._width / 2};
_root.attachMovie("ship", "shipmc", 88888);
shipmc._x = bound.cenX;
shipmc._y = bound.cenY;
ship = {mc:shipmc, x:shipmc._x, y:shipmc._y, xv:0, yv:0, speed:0, rot:8, ang:0, rad:10, fireRate:12, reload:0, shield:false, dead:false};
var d = 0;
var gun = 1;
var bul = 5000;
var gamePaused = false;
var pressed = false;
this.onEnterFrame = function () {
if (!gamePaused) {
_root.reload.gotoAndStop(10 - Math.floor((ship.reload / ship.fireRate) * 10));
if (Key.isDown(32)) {
if (ship.reload == 0) {
fire();
ship.reload = ship.fireRate;
}
}
if (ship.reload > 0) {
ship.reload--;
}
if (Key.isDown(38)) {
if (ship.speed == 0) {
ship.speed = 0.2;
}
if (ship.speed < 8) {
ship.speed = ship.speed + 0.2;
}
} else if (ship.speed >= 0.2) {
ship.speed = ship.speed - 0.2;
}
if (ship.speed <= 0.2) {
ship.speed = 0;
}
if (Key.isDown(39)) {
ship.ang = ship.ang + ship.rot;
} else if (Key.isDown(37)) {
ship.ang = ship.ang - ship.rot;
}
}
a = bullets;
var _local2 = 0;
while (_local2 < a.length) {
if (_root.bullets[_local2] != undefined) {
if (_root._currentFrame == 4) {
_root.bullets[_local2].removeMovieClip();
}
if (!gamePaused) {
moveBullet(_root.bullets[_local2]);
}
}
_local2++;
}
if (!gamePaused) {
if (ship.dead == false) {
updatePlayer();
}
managePowerups();
}
};
Frame 7
stop();
for (i in _root.balls) {
_root.balls[i].mc.removeMovieClip();
delete _root.balls[i];
}
for (var j in _root.bullets) {
_root.bullets[j].removeMovieClip();
}
_root.bullets = [];
_root.balls = [];
_root.front.removeMovieClip();
Instance of Symbol 337 MovieClip in Frame 7
on (press) {
getURL ("http://www.varstudios.com/index2.php", "_blank");
}
Frame 8
mc = _root.attachMovie("blocks2", "blocksgame", 60000);
mc._x = 300;
mc._y = 225;
function cleanUp() {
for (i in _root.balls) {
_root.balls[i].mc.removeMovieClip();
delete _root.balls[i];
}
_root.balls = [];
_root.bullets = [];
_root.front.removeMovieClip();
}
function addBall(group, x, y, speed, angle, s) {
x = Math.round(x);
y = Math.round(y);
b = _root.attachMovie(group, "ballmc" + d, d);
b._x = x;
b._y = y;
b._width = s;
b._height = s;
xs = Math.cos(angle) * speed;
ys = Math.sin(angle) * speed;
ang = Math.atan2(ys, xs);
b._rotation = ang * 57.2957795130823;
bo = (_root["ball" + d] = {mc:b, po:_root.balls.length, x:b._x, y:b._y, speed:speed, xv:xs, yv:ys, rad:s / 2, group:group});
b.ob = bo;
_root.balls.push(bo);
d++;
if (group == "divider") {
bo.timer = 300;
}
if (group == "mutant") {
bo.timer = 150;
}
}
function moveBall(ob) {
ob.x = ob.x + ob.xv;
ob.y = ob.y + ob.yv;
if (ob.group == "mutant") {
ob.timer--;
if (ob.timer <= 0) {
ob.timer = 150;
enemyShot(ob);
}
} else if (ob.group == "divider") {
ob.timer--;
if (ob.timer <= 0) {
ob.timer = 300;
var _local2 = 0;
for (var _local3 in balls) {
_local2 = _local2 + balls[_local3].rad;
}
if (_local2 < 200) {
addBall("divider", ob.x, ob.y, random(3) + 2, random(360), ob.rad * 2);
}
}
}
if (ship.shield == false) {
hitShip(ob);
} else {
hitShield(ob);
}
hit = checkBounds(ob);
if (hit) {
ob.mc.gotoAndStop(2);
}
}
function checkBounds(ob) {
var _local4 = ob.x - bound.cenX;
var _local3 = ob.y - bound.cenY;
var _local2 = Math.atan2(_local3, _local4);
_local4 = _local4 + (Math.cos(_local2) * ob.rad);
_local3 = _local3 + (Math.sin(_local2) * ob.rad);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local5 >= bound.rad) {
xl2 = Math.cos(_local2) * ob.rad;
yl2 = Math.sin(_local2) * ob.rad;
ob.x = (bound.cenX + (Math.cos(_local2) * bound.rad)) - xl2;
ob.y = (bound.cenY + (Math.sin(_local2) * bound.rad)) - yl2;
if (ob != ship) {
ob.mc._rotation = _local2 * 57.2957795130823;
}
return(true);
}
return(false);
}
function rebound(ob) {
xdist = ob.x - bound.cenX;
ydist = ob.y - bound.cenY;
angle = Math.atan2(ydist, xdist) + (Math.PI/2);
xproject = (Math.cos(angle) * ob.xv) + (Math.sin(angle) * ob.yv);
yproject = (Math.cos(angle) * ob.yv) - (Math.sin(angle) * ob.xv);
yreverse = yproject * -1;
xnum = (xproject * Math.cos(angle)) - (yreverse * Math.sin(angle));
ynum = (yreverse * Math.cos(angle)) + (xproject * Math.sin(angle));
shipang = Math.atan2(ynum, xnum) * 57.2957795130823;
if (ob != ship) {
ob.xv = xnum;
ob.yv = ynum;
ang = Math.atan2(ob.yv, ob.xv);
ob.mc._rotation = ang * 57.2957795130823;
} else {
ob.ang = shipang;
}
}
function splitBall(ob) {
_root.sounds.playPop();
s = ob.rad;
if (ob.group == "ball") {
_root.score = _root.score + 5;
} else if (ob.group == "divider") {
_root.score = _root.score + 10;
} else if (ob.group == "mutant") {
_root.score = _root.score + 15;
}
_root.scoretext.text = _root.score;
if (s == 50) {
s = 70;
}
if (s == 35) {
s = 40;
}
ob.mc.removeMovieClip();
_root.balls.splice(ob.po, 1);
var _local2 = ob.po;
while (_local2 < _root.balls.length) {
_root.balls[_local2].po--;
_local2++;
}
if (s == 10) {
var _local4 = _root.attachMovie("splat", "splat38363" + random(5), 38363 + random(5));
_local4._x = ob.x;
_local4._y = ob.y;
_local4._rotation = random(360);
dropPowerup(ob.x, ob.y);
return(0);
}
ang = random(360);
ang2 = ang - 180;
addBall(ob.group, ob.x, ob.y, ob.speed + random(3), ang, s);
addBall(ob.group, ob.x, ob.y, ob.speed + random(3), ang2, s);
dropPowerup(ob.x, ob.y);
}
function dropPowerup(x, y) {
chance = random(6);
if (chance == 0) {
var _local4 = random(powerupsnum);
var _local3 = _root.puporder[_local4];
var _local2 = _root.attachMovie("powerup", "powerup" + pup, ++pup);
_local2._x = x;
_local2._y = y;
_local2.gotoAndStop(_local3);
_local2.t = _local3;
_local2.num = powerups.length;
powerups.push(_local2);
}
}
function updatePowerup(pow) {
pow._alpha = pow._alpha - 0.2;
if (pow._alpha <= 10) {
powerups.splice(pow.num, 1);
var _local2 = pow.num;
while (_local2 < powerups.length) {
powerups[_local2].num--;
_local2++;
}
pow.removeMovieClip();
}
if (pow.hitTest(_root.shipmc.ship)) {
powerups.splice(pow.num, 1);
activatePowerup(pow.t);
var _local2 = pow.num;
while (_local2 < powerups.length) {
powerups[_local2].num--;
_local2++;
}
pow.removeMovieClip();
}
}
function activatePowerup(num) {
_root.sounds.playPowerup();
if (num == 1) {
_root.pupob.missile = timeLimit;
_root.pupob.mines = 0;
_root.pupob.pmines = 0;
gun = 2;
if (rapidFire == false) {
ship.fireRate = 24;
} else {
ship.fireRate = 12;
}
} else if (num == 2) {
_root.pupob.shield = timeLimit;
shipmc.gotoAndStop(2);
ship.shield = true;
ship.rad = 20;
} else if (num == 3) {
_root.pupob.bounce = timeLimit;
bounce = true;
} else if (num == 4) {
_root.pupob.rapid = timeLimit;
if (rapidFire == false) {
ship.fireRate = ship.fireRate / 2;
rapidFire = true;
}
} else if (num == 5) {
_root.pupob.mines = timeLimit;
_root.pupob.missile = 0;
_root.pupob.pmines = 0;
gun = 3;
if (rapidFire == false) {
ship.fireRate = 20;
} else {
ship.fireRate = 10;
}
} else if (num == 6) {
_root.pupob.missile = 0;
_root.pupob.mines = 0;
_root.pupob.pmines = timeLimit;
gun = 4;
if (rapidFire == false) {
ship.fireRate = 38;
} else {
ship.fireRate = 19;
}
} else if (num == 7) {
if (_root.lives < 3) {
_root.lives++;
_root["life" + _root.lives].gotoAndStop(1);
}
}
}
function managePowerups() {
if (_root.pupob.missile > 0) {
_root.pupob.missile--;
if (_root.pupob.missile <= 0) {
_root.sounds.playPowerdown();
_root.gun = 1;
ship.fireRate = 12;
if (_root.rapidFire == true) {
ship.fireRate = ship.fireRate / 2;
}
}
}
if (_root.pupob.shield > 0) {
_root.pupob.shield--;
if (_root.pupob.shield <= 0) {
_root.sounds.playPowerdown();
shipmc.gotoAndStop(1);
ship.shield = false;
ship.rad = 10;
}
}
if (_root.pupob.bounce > 0) {
_root.pupob.bounce--;
if (_root.pupob.bounce <= 0) {
_root.sounds.playPowerdown();
bounce = false;
}
}
if (_root.pupob.rapid > 0) {
_root.pupob.rapid--;
if (_root.pupob.rapid <= 0) {
_root.sounds.playPowerdown();
ship.fireRate = ship.fireRate * 2;
rapidFire = false;
}
}
if (_root.pupob.mines > 0) {
_root.pupob.mines--;
if (_root.pupob.mines <= 0) {
_root.sounds.playPowerdown();
_root.gun = 1;
ship.fireRate = 12;
if (_root.rapidFire == true) {
ship.fireRate = ship.fireRate / 2;
}
}
}
if (_root.pupob.pmines > 0) {
_root.pupob.pmines--;
if (_root.pupob.pmines <= 0) {
_root.sounds.playPowerdown();
_root.gun = 1;
ship.fireRate = 12;
if (_root.rapidFire == true) {
ship.fireRate = ship.fireRate / 2;
}
}
}
_root.mbar.gotoAndStop(50 - Math.round((pupob.missile / timeLimit) * 50));
_root.sbar.gotoAndStop(50 - Math.round((pupob.shield / timeLimit) * 50));
_root.bbar.gotoAndStop(50 - Math.round((pupob.bounce / timeLimit) * 50));
_root.rbar.gotoAndStop(50 - Math.round((pupob.rapid / timeLimit) * 50));
_root.mibar.gotoAndStop(50 - Math.round((pupob.mines / timeLimit) * 50));
_root.pbar.gotoAndStop(50 - Math.round((pupob.pmines / timeLimit) * 50));
}
function reduceLives() {
_root.sounds.playBoom();
_root["life" + _root.lives].gotoAndStop(2);
if (lives > 0) {
_root.lives--;
}
if (_root.lives == 0) {
_root.totalScore = _root.totalScore + (_root.score + _root.bonus);
_root.gamePaused = true;
for (i in _root.bullets) {
_root.bullets[i].removeMovieClip();
}
_root.bullets = [];
for (i in _root.powerups) {
_root.powerups[i].removeMovieClip();
}
powerups = [];
_root.attachMovie("popup", "popup", 99999);
popup._x = 300;
popup._y = 220;
_root.popup.gotoAndStop(2);
}
}
function resetPlayer() {
shipmc.gotoAndStop(4);
ship.rad = 10;
ship.fireRate = 12;
ship.xv = 0;
ship.yv = 0;
gun = 1;
bounce = false;
rapidFire = false;
ship.shield = false;
pupob.missile = 0;
pupob.shield = 0;
pupob.bounce = 0;
pupob.rapid = 0;
pupob.mines = 0;
pupob.pmines = 0;
}
function updatePlayer() {
ang = ship.ang * (Math.PI/180);
ship.xv = Math.cos(ang) * ship.speed;
ship.yv = Math.sin(ang) * ship.speed;
ship.x = ship.x + ship.xv;
ship.y = ship.y + ship.yv;
shipmc._x = ship.x;
shipmc._y = ship.y;
shipmc._rotation = ship.ang;
hit = checkBounds(ship);
if (hit) {
rebound(ship);
ship.speed = ship.speed - 3;
if (ship.speed < 0) {
ship.speed = 0;
}
}
if (ship.speed > 3) {
t = _root.attachMovie("shipTrail", "trail" + trails, ++bul);
_root.trails++;
if (_root.trails == 10) {
_root.trails = 0;
}
t._x = shipmc._x;
t._y = shipmc._y;
t._rotation = shipmc._rotation;
t.onEnterFrame = function () {
if (!_root.gamePaused) {
if (ship.dead == true) {
this.removeMovieClip();
}
this._width = this._width - 1;
this._height = this._height - 1;
if (this._xscale <= 25) {
this.removeMovieClip();
}
}
};
}
}
function moveBullet(bullet) {
if (bullet.host.dead == true) {
bullet.gotoAndStop(3);
}
if (((bullet.xv == 0) && (bullet.yv == 0)) && (bullet.group != 4)) {
n = bullet.num;
bullet.removeMovieClip();
bullets.splice(n, 1);
var _local4 = n;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
}
if (bullet.dead == true) {
if (bullet.host.dead != true) {
h = bullet.host;
mineExplode(h);
h.dead = true;
}
n = bullet.num;
bullet.removeMovieClip();
bullets.splice(n, 1);
var _local4 = n;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
} else {
if (bullet.stuck != true) {
bullet._x = bullet._x + bullet.xv;
bullet._y = bullet._y + bullet.yv;
}
out = offScreen(bullet);
if (out) {
bullets.splice(bullet.num, 1);
var _local4 = bullet.num;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
bullet.removeMovieClip();
return(0);
}
hit = hitEnemy(bullet);
if (hit) {
bullets.splice(bullet.num, 1);
var _local4 = bullet.num;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
bullet.removeMovieClip();
return(0);
}
if (bullet.group == 2) {
if (bullet.targ != undefined) {
var _local7 = bullet._x - bullet.targ._x;
var _local8 = bullet._y - bullet.targ._y;
var _local5 = (Math.atan2(_local8, _local7) * 57.2957795130823) - 180;
if (_local5 < 0) {
_local5 = _local5 + 360;
}
if (_local5 > 360) {
_local5 = _local5 - 360;
}
rot = bullet._rotation;
if (rot < 0) {
rot = rot + 360;
}
if (rot > 360) {
rot = rot - 360;
}
if (rot > _local5) {
if ((rot - _local5) <= 180) {
bullet._rotation = bullet._rotation - 3;
} else {
bullet._rotation = bullet._rotation + 3;
}
} else if (rot != _local5) {
if ((_local5 - rot) <= 180) {
bullet._rotation = bullet._rotation + 3;
} else {
bullet._rotation = bullet._rotation - 3;
}
}
var _local6 = bullet._rotation * (Math.PI/180);
bullet.xv = Math.cos(_local6) * 10;
bullet.yv = Math.sin(_local6) * 10;
}
t = _root.attachMovie("misileTrail", "trail" + bul, ++bul);
t._x = bullet._x;
t._y = bullet._y;
t._rotation = bullet._rotation;
t.father = bullet;
t.onEnterFrame = function () {
if (!_root.gamePaused) {
if (this.father == undefined) {
this.removeMovieClip();
}
this._width = this._width - 1;
this._height = this._height - 1;
if (this._xscale <= 25) {
this.removeMovieClip();
}
}
};
t2 = _root.attachMovie("misileTrail", "trail" + bul, ++bul);
var _local5 = bullet._rotation * (Math.PI/180);
t2._x = bullet._x - (Math.cos(_local5) * 5);
t2._y = bullet._y - (Math.sin(_local5) * 5);
t2._rotation = bullet._rotation;
t2.father = bullet;
t2.onEnterFrame = function () {
if (!_root.gamePaused) {
if (this.father == undefined) {
this.removeMovieClip();
}
this._width = this._width - 1;
this._height = this._height - 1;
if (this._xscale <= 25) {
this.removeMovieClip();
}
}
};
} else if (bullet.group == 3) {
if (bullet.stuck == true) {
bullet._x = bullet.host.x;
bullet._y = bullet.host.y;
bullet.timer--;
if (bullet.timer <= 0) {
bullet.gotoAndStop(3);
}
}
} else if (bullet.group == 4) {
bullet.timer--;
if (bullet.timer <= 0) {
bullet._alpha = bullet._alpha - 2;
}
if (bullet._alpha <= 0) {
bullets.splice(bullet.num, 1);
var _local4 = bullet.num;
while (_local4 < bullets.length) {
_root.bullets[_local4].num--;
_local4++;
}
bullet.removeMovieClip();
}
}
}
}
function mineExplode(ball) {
_root.sounds.playBoom();
for (var _local7 in balls) {
var _local2 = balls[_local7];
var _local3 = ball.x - _local2.x;
var _local4 = ball.y - _local2.y;
var _local5 = (_local3 * _local3) + (_local4 * _local4);
if (_local5 <= 6400) {
splitBall(_local2);
}
}
}
function explodePMine(bullet) {
_root.sounds.playBoom();
shrapnel(bullet, 0);
shrapnel(bullet, 45);
shrapnel(bullet, 90);
shrapnel(bullet, 135);
shrapnel(bullet, 180);
shrapnel(bullet, 225);
shrapnel(bullet, 270);
shrapnel(bullet, 315);
}
function offScreen(bullet) {
var _local3 = bullet._x - bound.cenX;
var _local4 = bullet._y - bound.cenY;
var _local9 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
var _local2 = Math.atan2(_local4, _local3);
var _local6 = bound.cenX + (Math.cos(_local2) * bound.rad);
var _local5 = bound.cenY + (Math.sin(_local2) * bound.rad);
var _local7 = bound.cenX + (Math.cos(_local2) * (bound.rad - 10));
var _local8 = bound.cenY + (Math.sin(_local2) * (bound.rad - 10));
if (_local9 > bound.rad) {
if (bullet.group != 2) {
bullet._x = _local6;
bullet._y = _local5;
} else {
bullet._x = _local7;
bullet._y = _local8;
}
if (bounce == true) {
if (bullet.bounced != true) {
bullet.bounced = true;
bullet.x = bullet._x;
bullet.y = bullet._y;
bullet.mc = bullet;
rebound(bullet);
} else if (bullet.stuck != true) {
return(true);
}
} else if (bullet.stuck != true) {
return(true);
}
}
}
function hitShield(ball) {
var _local4 = shipmc._x - ball.x;
var _local3 = shipmc._y - ball.y;
var _local16 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
var _local17 = Math.atan2(_local3, _local4) - Math.PI;
var _local13 = Math.cos(_local17) * (ship.rad + ball.rad);
var _local12 = Math.sin(_local17) * (ship.rad + ball.rad);
var _local2 = _local17 + (Math.PI/2);
if (_local16 < (ball.rad + ship.rad)) {
ball.x = shipmc._x + _local13;
ball.y = shipmc._y + _local12;
var _local9 = (Math.cos(_local2) * ball.xv) + (Math.sin(_local2) * ball.yv);
var _local15 = (Math.cos(_local2) * ball.yv) - (Math.sin(_local2) * ball.xv);
var _local8 = _local15 * -1;
var _local6 = (_local9 * Math.cos(_local2)) - (_local8 * Math.sin(_local2));
var _local7 = (_local8 * Math.cos(_local2)) + (_local9 * Math.sin(_local2));
ball.xv = _local6;
ball.yv = _local7;
_local17 = Math.atan2(ball.yv, ball.xv);
ball.mc._rotation = _local17 * 57.2957795130823;
var _local5 = shipmc._x - bound.cenX;
var _local10 = shipmc._y - bound.cenY;
var _local11 = Math.sqrt((_local5 * _local5) + (_local10 * _local10));
var _local14 = bound.rad - _local11;
if (_local14 <= ((ball.rad * 2) + ship.rad)) {
ship.ang = (Math.atan2(_local7, _local6) * 57.2957795130823) - 180;
ship.speed = ship.speed - 3;
}
}
}
function hitShip(ball) {
var _local3 = false;
var _local2 = shipmc._x + shipmc.point1._x;
var _local1 = shipmc._y + shipmc.point1._y;
if (ball.mc.hitTest(_local2, _local1, true)) {
_local3 = true;
}
_local2 = shipmc._x + shipmc.point2._x;
_local1 = shipmc._y + shipmc.point2._y;
if (ball.mc.hitTest(_local2, _local1, true)) {
_local3 = true;
}
_local2 = shipmc._x + shipmc.point3._x;
_local1 = shipmc._y + shipmc.point3._y;
if (ball.mc.hitTest(_local2, _local1, true)) {
_local3 = true;
}
if (_local3 == true) {
reduceLives();
shipmc.gotoAndStop(3);
}
}
function hitEnemy(bullet) {
for (var _local8 in _root.balls) {
var _local3 = _root.balls[_local8];
var _local6 = _local3.rad;
var _local7 = bullet._x - _local3.x;
var _local5 = bullet._y - _local3.y;
var _local4 = Math.sqrt((_local7 * _local7) + (_local5 * _local5));
if (bullet.group == 4) {
if (_local4 <= (_local6 + 30)) {
explodePMine(bullet);
bullets.splice(bullet.num, 1);
var _local8 = bullet.num;
while (_local8 < bullets.length) {
_root.bullets[_local8].num--;
_local8++;
}
bullet.gotoAndStop(2);
}
} else if (_local4 <= (_local6 + (bullet._width / 2))) {
if (bullet.group != 3) {
_local3.dead = true;
splitBall(_local3);
return(true);
}
if (bullet.stuck != true) {
_root.sounds.playStick();
bullet.gotoAndStop(2);
bullet.stuck = true;
bullet.host = _local3;
}
}
if (bullet.group == 2) {
if (bullet.minDist > _local4) {
bullet.minDist = _local4;
bullet.targ = _local3.mc;
}
}
}
}
function enemyShot(enemy) {
var _local5 = shipmc._x - enemy.x;
var _local6 = shipmc._y - enemy.y;
var _local3 = Math.atan2(_local6, _local5);
bu = _root.attachMovie("splatbomb", "blast" + _root.bul, ++_root.bul);
bu._x = enemy.x;
bu._y = enemy.y;
bu.xv = Math.cos(_local3) * 4;
bu.yv = Math.sin(_local3) * 4;
bu._rotation = _local3 * 57.2957795130823;
bu.onEnterFrame = function () {
if (!_root.gamePaused) {
this._x = this._x + this.xv;
this._y = this._y + this.yv;
hit = checkBounds({x:this._x, y:this._y, rad:3});
if (hit) {
this.removeMovieClip();
}
if (_root.shipmc.hitTest(this._x, this._y, true)) {
if (_root.ship.shield == false) {
if (shipmc._currentframe != 4) {
reduceLives();
shipmc.gotoAndStop(3);
}
}
this.removeMovieClip();
}
}
};
}
function shrapnel(bullet, angle) {
ang = angle * (Math.PI/180);
bu = _root.attachMovie("blast", "blast" + _root.bul, ++_root.bul);
bu.gotoAndStop(2);
bu._x = bullet._x;
bu._y = bullet._y;
bu.xv = Math.cos(ang) * 10;
bu.yv = Math.sin(ang) * 10;
bu.group = 1;
_root.bullets.push(bu);
bu.num = _root.bullets.length - 1;
}
function fire() {
_root.bul++;
if (gun == 1) {
_root.sounds.playShot();
bu = _root.attachMovie("blast", "blast" + _root.bul, _root.bul);
ang = _root.shipmc._rotation * (Math.PI/180);
bu._x = _root.shipmc._x + (Math.cos(ang) * (shipmc._width / 2));
bu._y = _root.shipmc._y + (Math.sin(ang) * (shipmc._height / 2));
bu.xv = Math.cos(ang) * 10;
bu.yv = Math.sin(ang) * 10;
bu.group = 1;
_root.bullets.push(bu);
bu.num = _root.bullets.length - 1;
} else if (gun == 2) {
_root.sounds.playRocket();
bu = _root.attachMovie("misile", "misile" + _root.bul, _root.bul);
ang = _root.shipmc._rotation * (Math.PI/180);
bu._x = _root.shipmc._x + (Math.cos(ang) * (shipmc._width / 2));
bu._y = _root.shipmc._y + (Math.sin(ang) * (shipmc._height / 2));
bu.xv = Math.cos(ang) * 10;
bu.yv = Math.sin(ang) * 10;
bu._rotation = Math.atan2(bu.yv, bu.xv) * 57.2957795130823;
bu.group = 2;
bu.minDist = 9999999 /* 0x98967F */;
bu.targ = undefined;
_root.bullets.push(bu);
bu.num = _root.bullets.length - 1;
} else if (gun == 3) {
_root.sounds.playSshot();
bu = _root.attachMovie("mine", "mine" + _root.bul, _root.bul);
ang = _root.shipmc._rotation * (Math.PI/180);
bu._x = _root.shipmc._x + (Math.cos(ang) * (shipmc._width / 2));
bu._y = _root.shipmc._y + (Math.sin(ang) * (shipmc._height / 2));
bu.xv = Math.cos(ang) * 10;
bu.yv = Math.sin(ang) * 10;
bu._rotation = Math.atan2(bu.yv, bu.xv) * 57.2957795130823;
bu.group = 3;
bu.stuck = false;
bu.stickx = undefined;
bu.sticky = undefined;
bu.host = undefined;
bu.timer = 60;
_root.bullets.push(bu);
bu.num = _root.bullets.length - 1;
} else if (gun == 4) {
_root.sounds.playDrop();
bu = _root.attachMovie("pmine", "pmine" + _root.bul, _root.bul);
ang = _root.shipmc._rotation * (Math.PI/180);
bu._x = _root.shipmc._x - ((Math.cos(ang) * (shipmc._width / 2)) / 2);
bu._y = _root.shipmc._y - ((Math.sin(ang) * (shipmc._height / 2)) / 2);
bu.xv = 0;
bu.yv = 0;
bu._rotation = Math.atan2(bu.yv, bu.xv) * 57.2957795130823;
bu.group = 4;
bu.timer = 300;
_root.bullets.push(bu);
bu.num = _root.bullets.length - 1;
}
}
function decreaseBonus() {
var _local2 = getTimer() - t1;
if (_local2 >= 1000) {
if (_root.bonus > 0) {
_root.bonus--;
}
t1 = getTimer();
}
}
function newLevel() {
levelnum++;
buildLevel(_root["level" + _root.levelnum]);
_root.leveltext.text = levelnum;
var _local2 = levelnum % 3;
if (_local2 == 0) {
if (powerupsnum < 7) {
powerupsnum++;
}
}
}
function buildLevel(level) {
var _local1 = 0;
while (_local1 < level.length) {
ob = level[_local1];
addBall(ob.g, ob.x, ob.y, ob.speed, ob.angle, ob.s);
_local1++;
}
}
stop();
cleanUp();
bound = {cenX:boundmc._x, cenY:boundmc._y, rad:boundmc._width / 2};
var ball = "ball";
var divider = "divider";
var mutant = "mutant";
var level1 = [{g:ball, x:_root.bound.cenX + 112.65, y:_root.bound.cenY + -59.55, speed:3, angle:54, s:40}];
var level2 = [{g:ball, x:_root.bound.cenX + 103.65, y:_root.bound.cenY + 68.45, speed:3, angle:23, s:40}, {g:ball, x:_root.bound.cenX + -111.35, y:_root.bound.cenY + -45.55, speed:3, angle:156, s:40}];
var level3 = [{g:ball, x:_root.bound.cenX + 113.65, y:_root.bound.cenY + -42.55, speed:2, angle:45, s:40}, {g:ball, x:_root.bound.cenX + -12.35, y:_root.bound.cenY + 126.45, speed:2, angle:78, s:40}, {g:ball, x:_root.bound.cenX + -92.35, y:_root.bound.cenY + -64.55, speed:3, angle:135, s:20}];
var level4 = [{g:ball, x:_root.bound.cenX + 92.65, y:_root.bound.cenY + 61.45, speed:4, angle:125, s:20}, {g:ball, x:_root.bound.cenX + 45.65, y:_root.bound.cenY + -134.55, speed:4, angle:150, s:20}, {g:ball, x:_root.bound.cenX + -103.35, y:_root.bound.cenY + 93.45, speed:3, angle:256, s:20}, {g:ball, x:_root.bound.cenX + -91.35, y:_root.bound.cenY + -85.55, speed:3, angle:340, s:20}, {g:ball, x:_root.bound.cenX + 126.65, y:_root.bound.cenY + -46.55, speed:3, angle:13, s:40}];
var level5 = [{g:divider, x:_root.bound.cenX + 125.65, y:_root.bound.cenY + 57.45, speed:3, angle:78, s:20}, {g:divider, x:_root.bound.cenX + -43.35, y:_root.bound.cenY + -104.55, speed:2, angle:150, s:20}, {g:ball, x:_root.bound.cenX + -114.35, y:_root.bound.cenY + 61.45, speed:3, angle:345, s:40}, {g:ball, x:_root.bound.cenX + 141.65, y:_root.bound.cenY + -25.55, speed:3, angle:12, s:40}];
var level6 = [{g:divider, x:_root.bound.cenX + 113.65, y:_root.bound.cenY + 60.45, speed:2, angle:78, s:40}, {g:ball, x:_root.bound.cenX + -108.35, y:_root.bound.cenY + 64.45, speed:3, angle:256, s:40}, {g:ball, x:_root.bound.cenX + 15.65, y:_root.bound.cenY + -114.55, speed:3, angle:310, s:40}];
var level7 = [{g:ball, x:_root.bound.cenX + 87.65, y:_root.bound.cenY + 92.45, speed:2, angle:67, s:70}, {g:divider, x:_root.bound.cenX + -98.35, y:_root.bound.cenY + 80.45, speed:3, angle:120, s:40}, {g:ball, x:_root.bound.cenX + 86.65, y:_root.bound.cenY + -105.55, speed:3, angle:235, s:20}];
var level8 = [{g:ball, x:_root.bound.cenX + 111.65, y:_root.bound.cenY + -47.55, speed:3, angle:10, s:40}, {g:ball, x:_root.bound.cenX + -0.350000000000023, y:_root.bound.cenY + 107.45, speed:3, angle:50, s:40}, {g:ball, x:_root.bound.cenX + -88.35, y:_root.bound.cenY + -67.55, speed:3, angle:130, s:40}, {g:ball, x:_root.bound.cenX + -132.35, y:_root.bound.cenY + 53.45, speed:3, angle:180, s:40}];
var level9 = [{g:divider, x:_root.bound.cenX + 144.65, y:_root.bound.cenY + 51.45, speed:3, angle:173, s:40}, {g:divider, x:_root.bound.cenX + -101.35, y:_root.bound.cenY + 101.45, speed:4, angle:278, s:40}, {g:ball, x:_root.bound.cenX + -34.35, y:_root.bound.cenY + -123.55, speed:2, angle:12, s:70}];
var level10 = [{g:divider, x:_root.bound.cenX + 92.65, y:_root.bound.cenY + 79.45, speed:2, angle:80, s:70}, {g:ball, x:_root.bound.cenX + -107.35, y:_root.bound.cenY + -54.55, speed:3, angle:23, s:40}];
var level11 = [{g:mutant, x:_root.bound.cenX + 125.65, y:_root.bound.cenY + 46.45, speed:2, angle:243, s:40}, {g:divider, x:_root.bound.cenX + 28.65, y:_root.bound.cenY + -114.55, speed:3, angle:100, s:40}, {g:ball, x:_root.bound.cenX + -76.35, y:_root.bound.cenY + 126.45, speed:3, angle:150, s:40}, {g:ball, x:_root.bound.cenX + -98.35, y:_root.bound.cenY + -45.55, speed:3, angle:310, s:40}];
var level12 = [{g:divider, x:_root.bound.cenX + 77.65, y:_root.bound.cenY + -49.55, speed:3, angle:78, s:70}, {g:ball, x:_root.bound.cenX + -97.35, y:_root.bound.cenY + 63.45, speed:3, angle:210, s:70}];
var level13 = [{g:mutant, x:_root.bound.cenX + 77.65, y:_root.bound.cenY + 89.45, speed:3, angle:78, s:40}, {g:mutant, x:_root.bound.cenX + 95.65, y:_root.bound.cenY + -118.55, speed:3, angle:167, s:40}, {g:divider, x:_root.bound.cenX + -113.35, y:_root.bound.cenY + 61.45, speed:3, angle:240, s:40}];
var level14 = [{g:divider, x:_root.bound.cenX + 120.65, y:_root.bound.cenY + 3.44999999999999, speed:3, angle:145, s:70}, {g:mutant, x:_root.bound.cenX + -24.35, y:_root.bound.cenY + 123.45, speed:3, angle:157, s:40}, {g:mutant, x:_root.bound.cenX + -59.35, y:_root.bound.cenY + -81.55, speed:2, angle:283, s:40}];
var level15 = [{g:ball, x:_root.bound.cenX + 130.65, y:_root.bound.cenY + -73.55, speed:2, angle:56, s:70}, {g:divider, x:_root.bound.cenX + 48.65, y:_root.bound.cenY + 98.45, speed:4, angle:157, s:70}, {g:mutant, x:_root.bound.cenX + -88.35, y:_root.bound.cenY + -86.55, speed:2, angle:23, s:20}];
var level16 = [{g:ball, x:_root.bound.cenX + 96.65, y:_root.bound.cenY + 40.45, speed:3, angle:34, s:40}, {g:divider, x:_root.bound.cenX + -55.35, y:_root.bound.cenY + 117.45, speed:3, angle:145, s:70}, {g:mutant, x:_root.bound.cenX + -14.35, y:_root.bound.cenY + -109.55, speed:2, angle:245, s:70}];
var level17 = [{g:ball, x:_root.bound.cenX + 74.65, y:_root.bound.cenY + -79.55, speed:3, angle:87, s:100}, {g:mutant, x:_root.bound.cenX + -20.35, y:_root.bound.cenY + 135.45, speed:3, angle:23, s:40}];
var level18 = [{g:divider, x:_root.bound.cenX + 74.65, y:_root.bound.cenY + 90.45, speed:2, angle:178, s:100}];
var level19 = [{g:ball, x:_root.bound.cenX + 115.65, y:_root.bound.cenY + 58.45, speed:2, angle:34, s:40}, {g:ball, x:_root.bound.cenX + -124.35, y:_root.bound.cenY + 8.44999999999999, speed:2, angle:178, s:40}, {g:ball, x:_root.bound.cenX + 48.65, y:_root.bound.cenY + -104.55, speed:2, angle:256, s:100}];
var level20 = [{g:mutant, x:_root.bound.cenX + 96.65, y:_root.bound.cenY + 76.45, speed:3, angle:168, s:100}];
var level21 = [{g:ball, x:_root.bound.cenX + 52.65, y:_root.bound.cenY + 105.45, speed:2, angle:35, s:100}, {g:ball, x:_root.bound.cenX + 45.65, y:_root.bound.cenY + -77.55, speed:2, angle:156, s:100}, {g:ball, x:_root.bound.cenX + -87.35, y:_root.bound.cenY + 76.45, speed:2, angle:220, s:40}];
var level22 = [{g:divider, x:_root.bound.cenX + 124.65, y:_root.bound.cenY + 60.45, speed:3, angle:22, s:20}, {g:divider, x:_root.bound.cenX + -58.35, y:_root.bound.cenY + 82.45, speed:4, angle:56, s:20}, {g:mutant, x:_root.bound.cenX + 70.65, y:_root.bound.cenY + -122.55, speed:4, angle:13, s:20}, {g:ball, x:_root.bound.cenX + -70.35, y:_root.bound.cenY + -85.55, speed:4, angle:167, s:20}, {g:ball, x:_root.bound.cenX + -150.35, y:_root.bound.cenY + 59.45, speed:3, angle:145, s:20}, {g:mutant, x:_root.bound.cenX + 31.65, y:_root.bound.cenY + 137.45, speed:4, angle:220, s:20}, {g:divider, x:_root.bound.cenX + -56.35, y:_root.bound.cenY + -147.55, speed:4, angle:300, s:20}, {g:ball, x:_root.bound.cenX + 114.65, y:_root.bound.cenY + -36.55, speed:2, angle:145, s:70}];
var level23 = [{g:ball, x:_root.bound.cenX + 98.65, y:_root.bound.cenY + -85.55, speed:3, angle:34, s:40}, {g:ball, x:_root.bound.cenX + -23.35, y:_root.bound.cenY + 84.45, speed:3, angle:45, s:40}, {g:divider, x:_root.bound.cenX + -110.35, y:_root.bound.cenY + -58.55, speed:3, angle:326, s:40}, {g:divider, x:_root.bound.cenX + 145.65, y:_root.bound.cenY + -8.55000000000001, speed:3, angle:211, s:40}, {g:mutant, x:_root.bound.cenX + 26.65, y:_root.bound.cenY + -132.55, speed:3, angle:356, s:40}, {g:mutant, x:_root.bound.cenX + 14.65, y:_root.bound.cenY + 152.45, speed:3, angle:22, s:40}];
var level24 = [{g:divider, x:_root.bound.cenX + 109.65, y:_root.bound.cenY + -87.55, speed:2, angle:53, s:100}, {g:ball, x:_root.bound.cenX + -42.35, y:_root.bound.cenY + 103.45, speed:2, angle:78, s:70}];
var level25 = [{g:mutant, x:_root.bound.cenX + 97.65, y:_root.bound.cenY + 39.45, speed:3, angle:78, s:70}, {g:mutant, x:_root.bound.cenX + -75.35, y:_root.bound.cenY + 107.45, speed:3, angle:150, s:70}, {g:mutant, x:_root.bound.cenX + -14.35, y:_root.bound.cenY + -113.55, speed:3, angle:260, s:40}];
var level26 = [{g:ball, x:_root.bound.cenX + 129.65, y:_root.bound.cenY + 36.45, speed:3, angle:56, s:70}, {g:ball, x:_root.bound.cenX + -115.35, y:_root.bound.cenY + 32.45, speed:3, angle:167, s:70}, {g:ball, x:_root.bound.cenX + 45.65, y:_root.bound.cenY + -106.55, speed:2, angle:356, s:70}, {g:divider, x:_root.bound.cenX + 36.65, y:_root.bound.cenY + 115.45, speed:3, angle:24, s:40}];
var level27 = [{g:divider, x:_root.bound.cenX + 92.65, y:_root.bound.cenY + 35.45, speed:3, angle:345, s:70}, {g:divider, x:_root.bound.cenX + -11.35, y:_root.bound.cenY + 129.45, speed:3, angle:25, s:70}, {g:divider, x:_root.bound.cenX + -76.35, y:_root.bound.cenY + 77.45, speed:3, angle:245, s:70}];
var level28 = [{g:mutant, x:_root.bound.cenX + 117.65, y:_root.bound.cenY + 34.45, speed:2, angle:67, s:100}, {g:divider, x:_root.bound.cenX + -3.35000000000002, y:_root.bound.cenY + 119.45, speed:3, angle:145, s:70}, {g:ball, x:_root.bound.cenX + 28.65, y:_root.bound.cenY + -136.55, speed:3, angle:222, s:40}];
var level29 = [{g:mutant, x:_root.bound.cenX + 67.65, y:_root.bound.cenY + 97.45, speed:2, angle:10, s:100}, {g:mutant, x:_root.bound.cenX + -63.35, y:_root.bound.cenY + -98.55, speed:2, angle:200, s:100}];
var level30 = [{g:ball, x:_root.bound.cenX + 126.65, y:_root.bound.cenY + 6.44999999999999, speed:2, angle:243, s:100}, {g:ball, x:_root.bound.cenX + -35.35, y:_root.bound.cenY + 98.45, speed:2, angle:23, s:100}, {g:divider, x:_root.bound.cenX + -17.35, y:_root.bound.cenY + -104.55, speed:2, angle:200, s:70}, {g:mutant, x:_root.bound.cenX + -100.35, y:_root.bound.cenY + 33.45, speed:2, angle:300, s:70}];
var level31 = [{g:ball, x:_root.bound.cenX + 123.65, y:_root.bound.cenY + -52.55, speed:3, angle:21, s:70}, {g:ball, x:_root.bound.cenX + -2.35000000000002, y:_root.bound.cenY + 120.45, speed:2, angle:45, s:100}, {g:mutant, x:_root.bound.cenX + -70.35, y:_root.bound.cenY + -51.55, speed:2, angle:222, s:100}, {g:divider, x:_root.bound.cenX + 27.65, y:_root.bound.cenY + -130.55, speed:3, angle:300, s:20}, {g:divider, x:_root.bound.cenX + -97.35, y:_root.bound.cenY + 115.45, speed:4, angle:100, s:20}];
var level32 = [{g:ball, x:_root.bound.cenX + 84.65, y:_root.bound.cenY + 54.45, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + 13.65, y:_root.bound.cenY + -115.55, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + -76.35, y:_root.bound.cenY + -37.55, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + -27.35, y:_root.bound.cenY + 78.45, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + -127.35, y:_root.bound.cenY + 93.45, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + -112.35, y:_root.bound.cenY + -96.55, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + 127.65, y:_root.bound.cenY + -72.55, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + 136.65, y:_root.bound.cenY + 96.45, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + 41.65, y:_root.bound.cenY + 138.45, speed:4, angle:25, s:20}, {g:ball, x:_root.bound.cenX + -139.35, y:_root.bound.cenY + 6.44999999999999, speed:4, angle:25, s:20}];
var level33 = [{g:mutant, x:_root.bound.cenX + 115.65, y:_root.bound.cenY + 75.45, speed:5, angle:200, s:20}, {g:divider, x:_root.bound.cenX + 54.65, y:_root.bound.cenY + -99.55, speed:5, angle:100, s:20}, {g:divider, x:_root.bound.cenX + -96.35, y:_root.bound.cenY + 135.45, speed:8, angle:340, s:20}, {g:ball, x:_root.bound.cenX + -80.35, y:_root.bound.cenY + 3.44999999999999, speed:1, angle:22, s:20}, {g:ball, x:_root.bound.cenX + 135.65, y:_root.bound.cenY + -77.55, speed:1, angle:22, s:20}, {g:ball, x:_root.bound.cenX + 66.65, y:_root.bound.cenY + 159.45, speed:2, angle:55, s:20}, {g:ball, x:_root.bound.cenX + -81.35, y:_root.bound.cenY + -140.55, speed:2, angle:55, s:20}, {g:mutant, x:_root.bound.cenX + -118.35, y:_root.bound.cenY + -71.55, speed:8, angle:340, s:20}, {g:mutant, x:_root.bound.cenX + -3.35000000000002, y:_root.bound.cenY + 121.45, speed:8, angle:25, s:20}, {g:mutant, x:_root.bound.cenX + 36.65, y:_root.bound.cenY + -149.55, speed:8, angle:50, s:20}];
var level34 = [{g:ball, x:_root.bound.cenX + 1.64999999999998, y:_root.bound.cenY + 1.44999999999999, speed:0, angle:10, s:20}];
var level35 = [{g:ball, x:_root.bound.cenX + 78.65, y:_root.bound.cenY + 87.45, speed:3, angle:10, s:100}, {g:divider, x:_root.bound.cenX + -80.35, y:_root.bound.cenY + 76.45, speed:3, angle:100, s:100}, {g:mutant, x:_root.bound.cenX + 18.65, y:_root.bound.cenY + -102.55, speed:3, angle:190, s:100}];
_root.attachMovie("ship", "shipmc", 99998);
shipmc._x = bound.cenX;
shipmc._y = bound.cenY;
ship = {mc:shipmc, x:shipmc._x, y:shipmc._y, xv:0, yv:0, speed:0, rot:8, ang:0, rad:10, fireRate:12, reload:0, shield:false, dead:false};
puporder = [7, 4, 1, 2, 5, 3, 6];
pupob = {missile:0, shield:0, bounce:0, rapid:0, mines:0, pmines:0};
var d = 0;
var pressed = false;
var gun = 1;
var bul = 5000;
var trails = 0;
var pup = 1500;
var powerupsnum = 3;
var lives = 3;
var gamePaused = true;
var levelnum = 1;
missiles = false;
shield = false;
bounce = false;
rapidFire = false;
mines = false;
_root.attachMovie("popup", "popup", 99999);
popup._x = 300;
popup._y = 220;
_root.popup.gotoAndStop(4);
var timeLimit = 300;
this.onEnterFrame = function () {
if (!gamePaused) {
_root.reload.gotoAndStop(38 - Math.floor((ship.reload / ship.fireRate) * 38));
if (Key.isDown(32)) {
if (ship.reload == 0) {
fire();
ship.reload = ship.fireRate;
}
}
if (ship.reload > 0) {
ship.reload--;
}
if (Key.isDown(38)) {
if (ship.speed == 0) {
ship.speed = 0.2;
}
if (ship.speed < 8) {
ship.speed = ship.speed + 0.2;
}
} else if (ship.speed >= 0.2) {
ship.speed = ship.speed - 0.2;
}
if (ship.speed <= 0.2) {
ship.speed = 0;
}
if (Key.isDown(39)) {
ship.ang = ship.ang + ship.rot;
} else if (Key.isDown(37)) {
ship.ang = ship.ang - ship.rot;
}
if (ship.dead == false) {
updatePlayer();
}
if ((bullets.length > balls.length) && (bullets.length > powerups.length)) {
a = _root.bullets;
} else if (balls.length > powerups.length) {
a = _root.balls;
} else {
a = _root.powerups;
}
var _local2 = 0;
while (_local2 < a.length) {
if (_root.balls[_local2] != undefined) {
ball = _root.balls[_local2];
moveBall(ball);
ball.mc._x = ball.x;
ball.mc._y = ball.y;
}
if (_root.bullets[_local2] != undefined) {
moveBullet(_root.bullets[_local2]);
}
if (_root.powerups[_local2] != undefined) {
updatePowerup(_root.powerups[_local2]);
}
_local2++;
}
managePowerups();
if (_root.balls.length == 0) {
resetPlayer();
ship.x = bound.cenX;
ship.y = bound.cenY;
ship.ang = 0;
_root.totalScore = _root.totalScore + (_root.score + _root.bonus);
_root.gamePaused = true;
for (_local2 in _root.bullets) {
_root.bullets[_local2].removeMovieClip();
}
_root.bullets = [];
for (_local2 in _root.powerups) {
_root.powerups[_local2].removeMovieClip();
}
powerups = [];
_root.attachMovie("popup", "popup", 99999);
popup._x = 300;
popup._y = 220;
_root.popup.gotoAndStop(3);
}
decreaseBonus();
}
if (Key.isDown(80)) {
if (_root.pressed == false) {
if (_root.gamePaused == true) {
_root.gamePaused = false;
for (var _local2 in balls) {
balls[_local2].mc.anim.play();
}
shipmc.ship.play();
shipmc.boom.play();
} else {
for (var _local2 in balls) {
balls[_local2].mc.anim.stop();
}
shipmc.ship.stop();
shipmc.boom.stop();
_root.gamePaused = true;
}
_root.pressed = true;
}
} else {
_root.pressed = false;
}
};
var t1 = getTimer();
Instance of Symbol 354 MovieClip in Frame 8
on (press) {
_root.gamePaused = true;
_root.attachMovie("popup", "popup", 99999);
_root.popup._x = 300;
_root.popup._y = 220;
_root.popup.gotoAndStop(5);
}
Instance of Symbol 52 MovieClip in Symbol 55 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Instance of Symbol 57 MovieClip in Symbol 59 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Instance of Symbol 61 MovieClip in Symbol 63 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Instance of Symbol 65 MovieClip in Symbol 67 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Instance of Symbol 69 MovieClip in Symbol 71 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Instance of Symbol 73 MovieClip in Symbol 75 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Instance of Symbol 77 MovieClip in Symbol 80 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 6;
}
Symbol 93 MovieClip [popup] Frame 1
stop();
Symbol 93 MovieClip [popup] Frame 2
stop();
for (i in _root.balls) {
_root.balls[i].mc.removeMovieClip();
delete _root.balls[i];
}
_root.balls = [];
resetPlayer();
ship.x = bound.cenX;
ship.y = bound.cenY;
ship.ang = 0;
_root.lives = 3;
_root.life1.gotoAndStop(1);
_root.life2.gotoAndStop(1);
_root.life3.gotoAndStop(1);
_root.totalScore = _root.totalScore - _root.bonus;
totaltext.text = _root.totalScore;
connum.text = _root.continues;
cont.onPress = function () {
if (_root.continues > 0) {
_root.score = 0;
_root.scoretext.text = 0;
_root.bonus = 300;
_root.gamePaused = false;
_root.continues--;
_root.levelnum--;
_root.newLevel();
_root.resetPlayer();
this._parent.removeMovieClip();
}
};
quit.onPress = function () {
_root.gotoAndPlay("title");
};
Symbol 93 MovieClip [popup] Frame 3
stop();
nxtbtn.onPress = function () {
_root.score = 0;
_root.scoretext.text = 0;
_root.bonus = 300;
if (_root.levelnum == 35) {
_root.gotoAndStop(4);
} else {
_root.resetPlayer();
_root.ship.xv = 0;
_root.ship.yv = 0;
_root.gamePaused = false;
_root.newLevel();
this._parent.removeMovieClip();
}
};
aim = "score";
var count = 0;
this.onEnterFrame = function () {
if (aim == "score") {
if (count < _root.score) {
count = count + 5;
scoretext.text = count;
} else {
scoretext.text = _root.score;
aim = "bonus";
boing._y = 74;
count = 0;
}
} else if (aim == "bonus") {
if (count < _root.bonus) {
count = count + 5;
bonustext.text = count;
} else {
bonustext.text = _root.bonus;
boing._y = 135;
aim = "total";
count = 0;
}
} else if (aim == "total") {
if (count < (_root.score + _root.bonus)) {
count = count + 10;
totaltext.text = count;
} else {
totaltext.text = _root.score + _root.bonus;
aim = "finished";
count = 0;
}
}
};
Symbol 93 MovieClip [popup] Frame 4
stop();
cont.onPress = function () {
_root.score = 0;
_root.bonus = 300;
_root.gamePaused = false;
_root.buildLevel(_root["level" + _root.levelnum]);
this._parent.removeMovieClip();
};
Symbol 93 MovieClip [popup] Frame 5
stop();
cont.onPress = function () {
_root.gamePaused = false;
this._parent.removeMovieClip();
};
qut.onPress = function () {
for (i in _root.balls) {
_root.balls[i].mc.removeMovieClip();
delete _root.balls[i];
}
_root.balls = [];
_root.gotoAndStop("title");
};
Symbol 102 MovieClip Frame 11
_parent.removeMovieClip();
Symbol 108 MovieClip Frame 15
_parent.removeMovieClip();
Symbol 109 MovieClip [pmine] Frame 1
stop();
Symbol 109 MovieClip [pmine] Frame 2
stop();
Symbol 110 MovieClip [powerup] Frame 1
stop();
Symbol 110 MovieClip [powerup] Frame 2
stop();
Symbol 110 MovieClip [powerup] Frame 3
stop();
Symbol 110 MovieClip [powerup] Frame 4
stop();
Symbol 110 MovieClip [powerup] Frame 5
stop();
Symbol 110 MovieClip [powerup] Frame 6
stop();
Symbol 110 MovieClip [powerup] Frame 7
stop();
Symbol 125 MovieClip Frame 25
_parent.dead = true;
Symbol 126 MovieClip [mine] Frame 1
stop();
Symbol 126 MovieClip [mine] Frame 2
stop();
Symbol 126 MovieClip [mine] Frame 3
stop();
Symbol 131 MovieClip [blast] Frame 1
stop();
Symbol 131 MovieClip [blast] Frame 2
stop();
Symbol 148 MovieClip Frame 13
_root.resetPlayer();
Symbol 150 MovieClip Frame 100
_parent.gotoAndStop(1);
Symbol 151 MovieClip [ship] Frame 1
stop();
Symbol 151 MovieClip [ship] Frame 2
stop();
Symbol 151 MovieClip [ship] Frame 3
stop();
Symbol 151 MovieClip [ship] Frame 4
stop();
Symbol 177 MovieClip Frame 16
_root.rebound(_parent.ob);
_parent.gotoAndStop(1);
Symbol 178 MovieClip [mutant] Frame 1
stop();
Symbol 178 MovieClip [mutant] Frame 2
stop();
Symbol 188 MovieClip Frame 16
_root.rebound(_parent.ob);
_parent.gotoAndStop(1);
Symbol 189 MovieClip [ball] Frame 1
stop();
Symbol 189 MovieClip [ball] Frame 2
stop();
Symbol 216 MovieClip Frame 17
_root.rebound(_parent.ob);
_parent.gotoAndStop(1);
Symbol 217 MovieClip [divider] Frame 1
stop();
Symbol 217 MovieClip [divider] Frame 2
stop();
Symbol 223 Button
on (press) {
_root.targ = "game";
blockup.play();
}
Symbol 226 Button
on (press) {
_root.targ = "controls";
blockup.play();
}
Symbol 229 Button
on (press) {
_root.targ = "credits";
blockup.play();
}
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 21
stop();
_root.gotoAndStop(_root.targ);
gotoAndStop (1);
Symbol 270 MovieClip [blocks2] Frame 21
stop();
Instance of Symbol 270 MovieClip [blocks2] "blockdown" in Symbol 271 MovieClip [front] Frame 1
onClipEvent (load) {
if (_root.visited != true) {
this.gotoAndStop(75);
_root.visited = true;
} else {
this.gotoAndPlay(1);
}
}
Symbol 355 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function showPreloaderAd(options) {
var _local29 = {clip:_root, ad_msec:11000, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812};
options = _parseOptions(options, _local29);
var _local15 = options.clip;
var _local25 = options.ad_msec;
delete options.ad_msec;
var _local28 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
return(null);
}
_local15.stop();
var mc = _local15._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local16 = _getRes(options);
var _local5 = _local16[0];
var _local14 = _local16[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local24 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local26 = options.outline;
delete options.outline;
var _local6 = _local8.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local8.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local24);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local26, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local5 - 20, 0);
_local7.lineTo(_local5 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local25;
chk.ad_timeout = _local28;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
var _local15 = {clip:_root, ad_msec:11000, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd"};
options = _parseOptions(options, _local15);
var _local6 = options.clip;
var _local12 = options.ad_msec;
delete options.ad_msec;
var _local14 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
return(null);
}
_local6.stop();
var mc = _local6._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local7 = _getRes(options);
var _local16 = _local7[0];
var _local13 = _local7[1];
mc._x = _local16 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local12;
chk.ad_timeout = _local14;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function load(options) {
var _local14 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local14);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.3";
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(false);
}
if (_local7._mochiad_loaded) {
return(false);
}
var _local13 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local13);
var _local12 = _getRes(options);
options.res = (_local12[0] + "x") + _local12[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local11 = _local4.server;
delete _local4.server;
var _local10 = _local11.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local10);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local10);
}
}
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local10;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local11 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 290 MovieClip Frame 152
stop();
_root.nextFrame();
Symbol 324 Button
on (press) {
_root.targ = "title";
_root.blocks.blockup.gotoAndPlay(2);
}
Symbol 348 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 2
stop();