Frame 1
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;
var pv;
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);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&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__("32d6de72", this, 10301, true);
function preloadSite() {
var _local3 = _root.getBytesLoaded();
var _local2 = _root.getBytesTotal();
var _local4 = Math.round((_local3 / _local2) * 100);
loadingBar._xscale = _local4;
percentClip.percentDisplay.text = _local4 + "%";
percentClip._x = loadingBar._x + loadingBar._width;
bytesDisplay.text = ((("loaded " + _local3) + " of ") + _local2) + " bytes";
if (_local3 >= _local2) {
c++;
if (c > 20) {
clearInterval(loadingCall);
gotoAndPlay(_root._currentframe + 1);
}
}
}
stop();
c = 0;
loadingBar._xscale = 1;
var loadingCall = setInterval(preloadSite, 50);
Frame 3
MochiAd.showPreGameAd({id:"3de8e1e73ba352a8", res:"550x550"});
stop();
Frame 4
stop();
best = 0;
ever = true;
Instance of Symbol 153 MovieClip in Frame 4
on (release) {
getURL ("http://www.kongregate.com/?gamereferral=elaztik", "_blank");
}
Frame 5
stop();
Instance of Symbol 160 MovieClip in Frame 5
on (release) {
getURL ("http://www.yellowdoggames.com?ref=elaztik", "_BLANK");
}
Frame 6
stop();
_root.kongregateServices.connect();
for (var i in _root) {
if (typeof(_root[i]) == "movieclip") {
_root[i].removeMovieClip();
}
}
attachMovie("newmouse", "newmouse", _root.getNextHighestDepth());
attachMovie("circle", "circle", _root.getNextHighestDepth(), {_x:300, _y:350});
attachMovie("crosshair", "crosshair", _root.getNextHighestDepth());
attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:250, _y:200});
Frame 7
sound.stop();
sound = new Sound(this);
sound.attachSound("song");
sound.start(0, 99);
for (var i in _root) {
if (typeof(_root[i]) == "movieclip") {
_root[i].removeMovieClip();
}
}
attachMovie("newmouse", "newmouse", _root.getNextHighestDepth());
attachMovie("circle", "circle", _root.getNextHighestDepth(), {_x:300, _y:350});
attachMovie("crosshair", "crosshair", _root.getNextHighestDepth());
attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:250, _y:200});
Frame 8
function addEnemy(num) {
switch (num) {
case 1 :
var _local2 = random(360);
var _local4 = _root.circle._x + (300 * Math.cos(_local2));
var _local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eball", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
break;
case 2 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eballmiss", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
break;
case 3 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eballshoot", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
break;
case 4 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eball_2", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
break;
case 5 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eballmiss_2", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
}
}
function youwin() {
gpaused = true;
_root.attachMovie("youwin", "youwin", _root.getNextHighestDepth(), {_x:300, _y:300});
}
stop();
Mouse.hide();
upgraded = false;
score = 0;
mscore = 0;
maxtime = 40;
gpaused = false;
levelnum = 1;
powered = false;
balls = 0;
seconds = 0;
ss = 0.004;
timer = 0;
enemySpot = 0;
enemy = new Array();
enemys = "";
attached = false;
ttime = 0;
c = 0;
this.onEnterFrame = function () {
c++;
if (((c % 30) == 0) && (!gpaused)) {
seconds++;
c = 0;
}
if (Key.isDown(80)) {
gpaused = true;
if (!attached) {
_root.attachMovie("paused", "paused", _root.getNextHighestDepth(), {_x:300, _y:300});
attached = true;
}
}
if (!gpaused) {
timer++;
if (timer >= maxtime) {
addEnemy(random(levelnum) + 1);
if (levelnum < 3) {
maxtime = (random(50) + 30) / levelnum;
} else {
maxtime = (random(50) + 30) / 3;
}
timer = 0;
ttime++;
}
if (score < mscore) {
score = score + random(10);
}
}
if (ttime == (8 * levelnum)) {
levelnum++;
ttime = 0;
_root.attachMovie("nicejob", "nice", _root.getNextHighestDepth(), {_x:275, _y:275});
}
};
Frame 9
sound.stop();
sound = new Sound(this);
sound.attachSound("song");
sound.start(0, 99);
for (var i in _root) {
if (typeof(_root[i]) == "movieclip") {
trace(_root[i].name);
_root[i].removeMovieClip();
}
}
attachMovie("newmouse", "newmouse", _root.getNextHighestDepth());
attachMovie("circle", "circle", _root.getNextHighestDepth(), {_x:300, _y:350});
attachMovie("crosshair", "crosshair", _root.getNextHighestDepth());
attachMovie("ball", "ball", _root.getNextHighestDepth(), {_x:250, _y:200});
Frame 10
function addEnemy(num) {
switch (num) {
case 1 :
var _local2 = random(360);
var _local4 = _root.circle._x + (300 * Math.cos(_local2));
var _local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eball", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
amount--;
break;
case 2 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eballmiss", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
amount--;
break;
case 3 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eballshoot", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
amount--;
break;
case 4 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eball_2", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
amount--;
break;
case 5 :
_local2 = random(360);
_local4 = _root.circle._x + (300 * Math.cos(_local2));
_local3 = _root.circle._y + (300 * Math.sin(_local2));
enemy.push(_root.attachMovie("eballmiss_2", "ball_" + balls, _root.getNextHighestDepth(), {_x:_local4, _y:_local3, id:enemy.length}));
balls++;
amount--;
}
}
function youwin() {
gpaused = true;
_root.attachMovie("youwin", "youwin", _root.getNextHighestDepth(), {_x:300, _y:300});
}
function youwin2() {
gpaused = true;
t = _root.attachMovie("youwin", "youwin", _root.getNextHighestDepth(), {_x:300, _y:300});
t.gotoAndStop(12);
}
stop();
Mouse.hide();
amount = random(100) + 25;
maxAmount = amount;
upgraded = false;
score = 0;
mscore = 0;
maxtime = 40;
gpaused = false;
levelnum = 1;
powered = false;
balls = 0;
seconds = 0;
ss = 0.004;
timer = 0;
enemySpot = 0;
enemy = new Array();
enemys = "";
attached = false;
ttime = 0;
c = 0;
this.onEnterFrame = function () {
seconds = maxAmount - amount;
if (((c % 30) == 0) && (!gpaused)) {
c = 0;
}
if (Key.isDown(80)) {
gpaused = true;
if (!attached) {
_root.attachMovie("paused", "paused", _root.getNextHighestDepth(), {_x:300, _y:300});
attached = true;
}
}
if (!gpaused) {
timer++;
if (timer >= maxtime) {
addEnemy(random(levelnum) + 1);
if (levelnum < 3) {
maxtime = (random(50) + 30) / levelnum;
} else {
maxtime = (random(50) + 30) / 3;
}
timer = 0;
ttime++;
}
if (score < mscore) {
score = score + random(10);
}
}
if (ttime == (8 * levelnum)) {
levelnum++;
ttime = 0;
_root.attachMovie("nicejob", "nice", _root.getNextHighestDepth(), {_x:275, _y:275});
}
if (amount <= 0) {
youwin2();
}
};
Frame 11
_root.seconds = _root.best;
Symbol 10 Button
on (release) {
getURL ("http://www.yellowdoggames.com/?ref=Elaztik", "_blank");
}
Symbol 14 Button
on (release) {
getURL ("http://www.kongregate.com/?gamereferral=elaztik", "_blank");
}
Symbol 16 Button
on (release) {
_root.gpaused = false;
_root.attached = false;
this.removeMovieClip();
}
Symbol 18 Button
on (release) {
_root.gotoAndStop(6);
this.removeMovieClip();
}
Symbol 19 MovieClip [paused] Frame 10
stop();
this._x = 300;
this._y = 300;
_root.gpaused = true;
Mouse.show();
_root.kongregateStats.submit("HighScore", _root.score);
_root.kongregateStats.submit("HighestLevel", _root.levelnum);
Symbol 22 Button
on (release) {
if (_root.ever) {
_root.gotoAndPlay(7);
} else {
_root.gotoAndPlay(9);
}
this.removeMovieClip();
}
Symbol 33 MovieClip Frame 1
smax = _root.seconds;
s = 0;
spd = 0.25;
this.onEnterFrame = function () {
if (s < 1) {
cur._y = 357;
cur.info.text = "You should try playing first!";
} else if (s < 3) {
cur._y = 353;
cur.info.text = "You must have tried to loose";
} else if (s < 5) {
cur._y = 349;
cur.info.text = "Rank: Moth Ball";
_root.kongregateStats.submit("Mothball", s);
} else if (s < 8) {
cur._y = 343;
cur.info.text = "Rank: Dirt";
} else if (s < 11) {
cur._y = 337;
cur.info.text = "Rank: Sea Weed";
spd = 0.5;
} else if (s < 16) {
cur._y = 331;
cur.info.text = "Rank: Worm";
} else if (s < 20) {
cur._y = 319;
cur.info.text = "Rank: Pet Rock.";
} else if (s < 24) {
cur._y = 308;
cur.info.text = "Rank: Beached Whale";
_root.kongregateStats.submit("BeachedWhale", s);
} else if (s < 28) {
cur._y = 295;
cur.info.text = "Rank: Goldfish";
} else if (s < 30) {
cur._y = 283;
cur.info.text = "Rank: Cat";
} else if (s < 31) {
cur._y = 271;
cur.info.text = "Rank: Rabbid Dog";
spd = 1;
} else if (s < 38) {
cur._y = 238;
cur.info.text = "Rank: Wolf";
} else if (s < 43) {
cur._y = 212;
cur.info.text = "Rank: Lion";
} else if (s < 55) {
cur._y = 183;
cur.info.text = "Rank: Bear";
} else if (s < 68) {
cur._y = 156;
cur.info.text = "Rank: Wolly Mammoth";
} else if (s < 80) {
} else if (s < 81) {
cur._y = 102;
cur.info.text = "Rank: Caveman";
_root.kongregateStats.submit("Caveman", s);
} else if (s < 120) {
cur._y = 54;
cur.info.text = "Rank: Tank";
} else if (s < 121) {
cur._y = 45;
cur.info.text = "Rank: F-16";
} else if (s > 200) {
cur._y = 32;
cur.info.text = "H4X0R";
_root.kongregateStats.submit("H4XOR", s);
}
if (s < smax) {
trace(s);
s = s + spd;
}
};
Symbol 37 Button
on (release) {
getURL ("http://mkprogramming.com", "_blank");
}
Symbol 42 MovieClip [youwin] Frame 1
Mouse.show();
Symbol 42 MovieClip [youwin] Frame 10
stop();
this._x = 300;
this._y = 300;
_root.HPScoreService.postScore(_root.seconds, "Normal");
_root.kongregateScores.setMode("Normal");
_root.kongregateScores.submit(_root.seconds);
_root.kongregateStats.submit("TotalSeconds", _root.seconds);
_root.kongregateStats.submit("HighestLevel", _root.levelnum);
NonobaAPI.SubmitScore("Highscore", root.seconds, function (response) {
switch (response) {
case NonobaAPI.SUCCESS :
trace("The score was submitted successfully");
break;
case NonobaAPI.NOT_LOGGED_IN :
trace("The user is not logged in");
break;
case NonobaAPI.ERROR :
trace("An error occurred.");
}
});
NonobaAPI.SubmitScore("HighLevel", _root.levelnum, function (response) {
switch (response) {
case NonobaAPI.SUCCESS :
trace("The score was submitted successfully");
break;
case NonobaAPI.NOT_LOGGED_IN :
trace("The user is not logged in");
break;
case NonobaAPI.ERROR :
trace("An error occurred.");
}
});
_root.gpaused = true;
if (_root.seconds > _root.best) {
_root.best = _root.seconds;
this.gotoAndStop(11);
}
Instance of Symbol 26 MovieClip in Symbol 42 MovieClip [youwin] Frame 10
on (release) {
getURL ("http://www.kongregate.com/?gamereferral=elaztik", "_blank");
}
Symbol 42 MovieClip [youwin] Frame 11
stop();
_root.kongregateScores.setMode("Normal");
_root.kongregateScores.submit(_root.seconds);
Symbol 42 MovieClip [youwin] Frame 12
stop();
_root.HPScoreService.postScore(_root.seconds, "Normal");
_root.kongregateScores.setMode("Normal");
_root.kongregateScores.submit(_root.seconds);
_root.kongregateStats.submit("TotalSeconds", _root.seconds);
_root.kongregateStats.submit("HighestLevel", _root.levelnum);
NonobaAPI.SubmitScore("Highscore", root.seconds, function (response) {
switch (response) {
case NonobaAPI.SUCCESS :
trace("The score was submitted successfully");
break;
case NonobaAPI.NOT_LOGGED_IN :
trace("The user is not logged in");
break;
case NonobaAPI.ERROR :
trace("An error occurred.");
}
});
NonobaAPI.SubmitScore("HighLevel", _root.levelnum, function (response) {
switch (response) {
case NonobaAPI.SUCCESS :
trace("The score was submitted successfully");
break;
case NonobaAPI.NOT_LOGGED_IN :
trace("The user is not logged in");
break;
case NonobaAPI.ERROR :
trace("An error occurred.");
}
});
Symbol 44 MovieClip [newmouse] Frame 1
this.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
};
Symbol 50 MovieClip [nicejob] Frame 1
stop();
c = 0;
this.onEnterFrame = function () {
c++;
if (c > 50) {
this._alpha = this._alpha - 5;
}
if (this._alpha < 0) {
this.removeMovieClip();
}
};
Symbol 52 MovieClip [crosshair] Frame 1
dist_x = 0;
dist_y = 0;
distance = 0;
time = 0;
mdist = 2;
cmdist = 30;
this.onEnterFrame = function () {
if (!gpaused) {
this._x = _root._xmouse;
this._y = _root._ymouse;
dist_x = this._x - _root.circle._x;
dist_y = this._y - _root.circle._y;
distance = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
if (!_root.powered) {
if (distance > 45) {
angle = Math.atan2(dist_y, dist_x);
this._x = _root.circle._x + (45 * Math.cos(angle));
this._y = _root.circle._y + (45 * Math.sin(angle));
}
} else {
angle = Math.atan2(dist_y, dist_x);
this._x = _root.circle._x + ((45 * mdist) * Math.cos(angle));
this._y = _root.circle._y + ((45 * mdist) * Math.sin(angle));
time++;
if (time >= 10) {
_root.powered = false;
time = 0;
}
}
var dist_x = (_root.ball._x - _root.circle._x);
var dist_y = (_root.ball._y - _root.circle._y);
var distance = Math.sqrt((dist_x * dist_x) + (dist_y * dist_y));
var angle = Math.atan2(dist_y, dist_x);
if (distance > 0) {
_root.circle._x = _root.circle._x + (Math.cos(angle) * distance);
_root.circle._y = _root.circle._y + (Math.sin(angle) * distance);
}
}
};
Symbol 54 MovieClip [circle] Frame 1
function checkHits() {
x = 0;
while (x < _root.enemy.length) {
if (_root.enemy[x] != undefined) {
var _local3 = ((this._width / 2) + 1) + ((_root.enemy[x]._width / 2) + 1);
distance_x = Math.abs(_root.enemy[x]._x - this._x);
distance_y = Math.abs(_root.enemy[x]._y - this._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= _local3) && ((_root.enemy[x].collision == 0) || (this.collision == 0))) {
_root.enemy[x].collision = 1;
if (!_root.enemy[x].hit) {
this.shrink(_root.enemy[x].mass);
}
_root.enemy[x].hit = true;
this.collision = 1;
manage_bounce(this, _root.enemy[x]);
} else if (distance > _local3) {
_root.enemy[x].collision = 0;
this.collision = 0;
}
}
x++;
}
}
function manage_bounce(ball, ball2) {
dx = ball._x - ball2._x;
dy = ball._y - ball2._y;
collisionision_angle = Math.atan2(dy, dx);
magnitude_1 = Math.sqrt((ball.xspeed * ball.xspeed) + (ball.yspeed * ball.yspeed));
magnitude_2 = Math.sqrt((ball2.xspeed * ball2.xspeed) + (ball2.yspeed * ball2.yspeed));
direction_1 = Math.atan2(ball.yspeed, ball.xspeed);
direction_2 = Math.atan2(ball2.yspeed, ball2.xspeed);
new_xspeed_1 = magnitude_1 * Math.cos(direction_1 - collisionision_angle);
new_yspeed_1 = magnitude_1 * Math.sin(direction_1 - collisionision_angle);
new_xspeed_2 = magnitude_2 * Math.cos(direction_2 - collisionision_angle);
new_yspeed_2 = magnitude_2 * Math.sin(direction_2 - collisionision_angle);
final_xspeed_1 = (((ball.mass - ball2.mass) * new_xspeed_1) + ((ball2.mass + ball2.mass) * new_xspeed_2)) / (ball.mass + ball2.mass);
final_xspeed_2 = (((ball.mass + ball.mass) * new_xspeed_1) + ((ball2.mass - ball.mass) * new_xspeed_2)) / (ball.mass + ball2.mass);
final_yspeed_1 = new_yspeed_1;
final_yspeed_2 = new_yspeed_2;
ball.xspeed = ((Math.cos(collisionision_angle) * final_xspeed_1) + (Math.cos(collisionision_angle + (Math.PI/2)) * final_yspeed_1)) * 2;
ball.yspeed = ((Math.sin(collisionision_angle) * final_xspeed_1) + (Math.sin(collisionision_angle + (Math.PI/2)) * final_yspeed_1)) * 2;
ball2.xspeed = (Math.cos(collisionision_angle) * final_xspeed_2) + (Math.cos(collisionision_angle + (Math.PI/2)) * final_yspeed_2);
ball2.yspeed = (Math.sin(collisionision_angle) * final_xspeed_2) + (Math.sin(collisionision_angle + (Math.PI/2)) * final_yspeed_2);
if ((Math.abs(ball2.xspeed) < 1) || (Math.abs(ball2.yspeed) < 1)) {
ball2.xspeed = ball2.xspeed * 3;
ball2.yspeed = ball2.yspeed * 3;
}
if ((Math.abs(ball2.xspeed) > 150) || (Math.abs(ball2.yspeed) > 150)) {
ball2.implode();
}
}
function reset() {
trace("resized");
mass = 100;
maxwidth = startsize;
maxheight = startsize;
this._height = startsize;
this._width = startsize;
}
stop();
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.5, 3));
this.filters = [dropShad];
startsize = 100;
xspeed = 0;
yspeed = 0;
friction = 0.9;
collision = 0;
speed_scale = 0.08;
mass = 100;
maxwidth = startsize;
maxheight = startsize;
x = 0;
while (x < 1) {
x++;
}
this.onEnterFrame = function () {
if (!_root.gpaused) {
xspeed = xspeed * friction;
yspeed = yspeed * friction;
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (this._width > maxwidth) {
this._width = this._width - 0.5;
}
if (this._height > maxheight) {
this._height = this._height - 0.5;
}
}
if ((Math.abs(this.xspeed) > 20) || (Math.abs(this.yspeed) > 20)) {
this.xspeed = 0;
this.yspeed = 0;
}
};
Symbol 56 MovieClip [ball] Frame 1
function checkHits() {
x = 0;
while (x < _root.enemy.length) {
if (_root.enemy[x] != undefined) {
var _local3 = ((this._width / 2) + 2) + ((_root.enemy[x]._width / 2) + 2);
distance_x = Math.abs(_root.enemy[x]._x - this._x);
distance_y = Math.abs(_root.enemy[x]._y - this._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= _local3) && (_root.enemy[x].collision == 0)) {
_root.gpaused = true;
_root.attachMovie("youwin", "youwin", _root.getNextHighestDepth(), {_x:300, _y:300});
} else if (distance > _local3) {
_root.enemy[x].collision = 0;
this.collision = 0;
}
}
x++;
}
}
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.5, 3));
this.filters = [dropShad];
xspeed = 0;
yspeed = 0;
friction = 0.9;
collision = 0;
speed_scale = 0.08;
sx = 0;
sy = 0;
mass = 4;
this.drawline = _root.createEmptyMovieClip("drawline_" + _root.balls, _root.getNextHighestDepth());
drawline.dead = false;
drawline.lineStyle(1, 3355443, 100);
drawline.moveTo(this._x, this._y);
drawline.onEnterFrame = function () {
if (this.dead) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
drawline.die = function () {
this._alpha = this._alpha - 5;
this.dead = true;
};
this.onEnterFrame = function () {
if (!_root.gpaused) {
var _local5 = (_root.crosshair._x - this._x) * speed_scale;
var _local3 = (_root.crosshair._y - this._y) * speed_scale;
xspeed = xspeed + _local5;
yspeed = yspeed + _local3;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
this._x = this._x + xspeed;
this._y = this._y + yspeed;
drawline.clear();
drawline.lineStyle(2, 0, 100);
var _local9 = _root.newmouse._x;
var _local7 = _root.newmouse._y;
var _local6 = this._x;
var _local4 = this._y;
var _local10 = _root.crosshair._x;
var _local8 = _root.crosshair._y;
drawline.moveTo(_local9, _local7);
drawline.curveTo(_local10, _local8, _local6, _local4);
checkHits();
if (this._x < 15) {
this._x = 15;
this.xspeed = this.xspeed * -1;
} else if (this._x > 585) {
this._x = 585;
this.xspeed = this.xspeed * -1;
}
if (this._y < 15) {
this._y = 15;
this.yspeed = this.yspeed * -1;
} else if (this._y > 585) {
this._y = 585;
this.yspeed = this.yspeed * -1;
}
}
};
Symbol 229 MovieClip [__Packages.NonobaAPI] Frame 0
class NonobaAPI
{
static var api;
function NonobaAPI () {
throw new Error("ERROR!: You cannot create an instance of the NonobaAPI class!");
}
static function GetShopItemKeys(callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, null);
}
return(undefined);
}
if (api && (api.ShowShop)) {
api.GetShopItemKeys(callback);
} else {
cachedRequests.push(function () {
NonobaAPI.GetShopItemKeys(callback);
});
}
}
static function HasShopItem(item, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, false, null);
}
return(undefined);
}
if (api && (api.ShowShop)) {
api.HasShopItem(item, callback);
} else {
cachedRequests.push(function () {
NonobaAPI.HasShopItem(item, callback);
});
}
}
static function ShowShop(item, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.ShowShop)) {
api.ShowShop(item, callback);
} else {
cachedRequests.push(function () {
NonobaAPI.ShowShop(item, callback);
});
}
}
static function Login(callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.Login)) {
api.Login(callback);
} else {
cachedRequests.push(function () {
NonobaAPI.Login(callback);
});
}
}
static function SubmitScore(key, score, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.SubmitScore)) {
api.SubmitScore(key, score, callback);
} else {
cachedRequests.push(function () {
NonobaAPI.SubmitScore(key, score, callback);
});
}
}
static function AwardAchievement(key, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, 0);
}
return(undefined);
}
if (api && (api.AwardAchievement)) {
api.AwardAchievement(key, callback);
} else {
cachedRequests.push(function () {
NonobaAPI.AwardAchievement(key, callback);
});
}
}
static function SetUserData(key, value, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.SetUserData)) {
api.SetUserData(key, value, callback);
} else {
cachedRequests.push(function () {
NonobaAPI.SetUserData(key, value, callback);
});
}
}
static function GetUserData(key, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, "");
}
return(undefined);
}
if (api && (api.GetUserData)) {
api.GetUserData(key, callback);
} else {
cachedRequests.push(function () {
NonobaAPI.GetUserData(key, callback);
});
}
}
static function GetUsername(callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, "");
}
return(undefined);
}
if (api && (api.GetUsername)) {
api.GetUsername(callback);
} else {
cachedRequests.push(function () {
NonobaAPI.GetUsername(callback);
});
}
}
static function Init(container) {
function emptyCache() {
var _local1 = 0;
while (_local1 < NonobaAPI.cachedRequests.length) {
NonobaAPI.cachedRequests[_local1]();
_local1++;
}
NonobaAPI.cachedRequests = [];
}
if (isInited) {
throw new Error("NonobaAPI can not be re-initialized!");
}
isInited = true;
var _local3 = _root.nonoba$apicodeas2;
if (!_local3) {
failed = true;
emptyCache();
}
System.security.allowDomain("*");
container = container || _root;
api = container.createEmptyMovieClip("___NonobaAPI__loader", container.getNextHighestDepth());
var _local5 = new MovieClipLoader();
_local5.addListener({onLoadComplete:function () {
var loadTimer = setInterval(mx.utils.Delegate.create(NonobaAPI, function () {
if (!(NonobaAPI.api.SubmitScore === undefined)) {
clearInterval(loadTimer);
emptyCache();
}
}), 500);
}, onLoadError:function () {
NonobaAPI.failed = true;
emptyCache();
}});
_local5.loadClip(_local3, api);
}
static var SUCCESS = "SUCCESS";
static var NOT_LOGGED_IN = "user not logged in";
static var ERROR = "error";
static var isInited = false;
static var loading = false;
static var cachedRequests = [];
static var failed = false;
}
Symbol 230 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 231 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
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.adLoaded = function (width, height) {
};
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 showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
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.adLoaded = function (width, height) {
};
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 showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
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 _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_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 _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".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 64 MovieClip [eball] Frame 1
function implode() {
if (!added) {
_root.mscore = _root.mscore + 100;
added = true;
}
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.25, 3));
this.filters = [dropShad];
dead = false;
xspeed = 0;
yspeed = 0;
mass = 10;
collision = 0;
friction = 0.9;
added = false;
speed_scale = _root.ss;
dist_x = (_root.circle._x - this._x) * speed_scale;
dist_y = (_root.circle._y - this._y) * speed_scale;
hit = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
if (!hit) {
xspeed = xspeed + dist_x;
yspeed = yspeed + dist_y;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
}
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (hit || (onscreen)) {
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
}
}
};
Symbol 66 MovieClip [eball_2] Frame 1
function implode() {
if (!added) {
_root.mscore = _root.mscore + 100;
added = true;
}
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.25, 3));
this.filters = [dropShad];
dead = false;
xspeed = 0;
yspeed = 0;
mass = 10;
collision = 0;
friction = 0.9;
added = false;
speed_scale = _root.ss;
dist_x = (_root.circle._x - this._x) * speed_scale;
dist_y = (_root.circle._y - this._y) * speed_scale;
hit = false;
c = 0;
gone = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
c++;
if (!hit) {
xspeed = xspeed + dist_x;
yspeed = yspeed + dist_y;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
}
if ((c % 30) == 0) {
dist_x = dist_x + (xspeed * 2);
dist_y = dist_y + (yspeed * 2);
gone = true;
}
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if ((hit || (gone)) || (onscreen)) {
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
}
}
};
Symbol 69 MovieClip [eballmiss] Frame 1
function blowup() {
x = 1;
while (x < 6) {
var _local5 = Math.atan2(_root.circle._y - this._y, _root.circle._x - this._x);
var _local6 = Math.round((_local5 * 180) / Math.PI);
var _local9 = _local6 + 90;
var _local3 = _local9 + ((Math.random() * 40) - 20);
var _local4 = 6;
var _local8 = Math.sin(_local3 * (Math.PI/180)) * _local4;
var _local7 = (-Math.cos(_local3 * (Math.PI/180))) * _local4;
_root.enemy.push(_root.attachMovie("eballsm", "ball_" + _root.balls, _root.getNextHighestDepth(), {_x:this._x, _y:this._y, xspeed:_local8, yspeed:_local7, id:_root.enemy.length}));
_root.balls++;
x++;
}
implode();
}
function implode() {
if (!added) {
_root.mscore = _root.mscore + 200;
added = true;
}
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.25, 3));
this.filters = [dropShad];
xspeed = 0;
added = false;
yspeed = 0;
dc = 0;
mass = 2;
timer = "";
dead = false;
collision = 0;
friction = 0.9;
speed_scale = _root.ss;
dist_x = (_root.circle._x - this._x) * speed_scale;
dist_y = (_root.circle._y - this._y) * speed_scale;
hit = false;
c = 90;
countdown = false;
dontmove = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
if (!hit) {
xspeed = xspeed + dist_x;
yspeed = yspeed + dist_y;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
}
var _local4 = Math.abs(_root.circle._x - this._x);
var _local3 = Math.abs(_root.circle._y - this._y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if ((_local5 < 200) && (!countdown)) {
countdown = true;
dontmove = true;
}
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (dontmove && (!hit)) {
this._x = this._x - xspeed;
this._y = this._y - yspeed;
}
if (countdown) {
c--;
if ((c % 30) == 0) {
timer = "" + (c / 30);
}
if (c == 0) {
blowup();
countdown = false;
}
}
if (hit || (onscreen)) {
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
dc++;
}
}
if (dc > 120) {
implode();
}
};
Symbol 72 MovieClip [eballmiss_2] Frame 1
function blowup() {
var _local12 = 36;
x = 0;
while (x < 10) {
var _local3 = _local12 * x;
var _local4 = random(6) + 2;
var _local6 = Math.sin(_local3 * (Math.PI/180)) * _local4;
var _local5 = (-Math.cos(_local3 * (Math.PI/180))) * _local4;
_root.enemy.push(_root.attachMovie("eballsm", "ball_" + _root.balls, _root.getNextHighestDepth(), {_x:this._x, _y:this._y, xspeed:_local6, yspeed:_local5, id:_root.enemy.length}));
_root.balls++;
x++;
}
implode();
}
function implode() {
if (!added) {
_root.mscore = _root.mscore + 200;
added = true;
}
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.25, 3));
this.filters = [dropShad];
xspeed = 0;
added = false;
yspeed = 0;
mass = 2;
timer = "";
dc = 0;
dead = false;
collision = 0;
friction = 0.9;
speed_scale = _root.ss;
dist_x = (_root.circle._x - this._x) * speed_scale;
dist_y = (_root.circle._y - this._y) * speed_scale;
hit = false;
c = 90;
countdown = false;
dontmove = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
if (!hit) {
xspeed = xspeed + dist_x;
yspeed = yspeed + dist_y;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
}
var _local4 = Math.abs(_root.circle._x - this._x);
var _local3 = Math.abs(_root.circle._y - this._y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if ((_local5 < 200) && (!countdown)) {
countdown = true;
dontmove = true;
}
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (dontmove && (!hit)) {
this._x = this._x - xspeed;
this._y = this._y - yspeed;
}
if (countdown) {
c--;
if ((c % 30) == 0) {
timer = "" + (c / 30);
}
if (c == 0) {
blowup();
countdown = false;
}
}
if (hit || (onscreen)) {
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
dc++;
}
}
if (dc > 120) {
implode();
}
};
Symbol 74 MovieClip [eballshoot] Frame 1
function blowup() {
x = 0;
while (x < 2) {
var _local5 = Math.atan2(_root.circle._y - this._y, _root.circle._x - this._x);
var _local6 = Math.round((_local5 * 180) / Math.PI);
var _local9 = _local6 + 90;
var _local3 = (_local9 + (Math.random() * 15)) - 7.5;
var _local4 = 5;
var _local8 = Math.sin(_local3 * (Math.PI/180)) * _local4;
var _local7 = (-Math.cos(_local3 * (Math.PI/180))) * _local4;
_root.enemy.push(_root.attachMovie("eballspawn", "ball_" + _root.balls, _root.getNextHighestDepth(), {_x:this._x, _y:this._y, xspeed:_local8, yspeed:_local7, id:_root.enemy.length}));
_root.balls++;
x++;
}
implode();
}
function implode() {
if (!added) {
_root.mscore = _root.mscore + 200;
added = true;
}
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
var dropShad = (new flash.filters.DropShadowFilter(10, 120, 0, 10, 15, 15, 0.25, 3));
this.filters = [dropShad];
xspeed = 0;
added = false;
yspeed = 0;
mass = 2;
timer = "";
dead = false;
collision = 0;
friction = 0.9;
speed_scale = _root.ss;
dist_x = (_root.circle._x - this._x) * speed_scale;
dist_y = (_root.circle._y - this._y) * speed_scale;
hit = false;
c = 90;
countdown = false;
dontmove = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
if (!hit) {
xspeed = xspeed + dist_x;
yspeed = yspeed + dist_y;
xspeed = xspeed * friction;
yspeed = yspeed * friction;
}
var _local4 = Math.abs(_root.circle._x - this._x);
var _local3 = Math.abs(_root.circle._y - this._y);
var _local5 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if ((_local5 < 200) && (!countdown)) {
countdown = true;
dontmove = true;
}
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (dontmove && (!hit)) {
this._x = this._x - xspeed;
this._y = this._y - yspeed;
}
if (countdown) {
blowup();
countdown = false;
}
if (hit || (onscreen)) {
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
}
}
};
Symbol 76 MovieClip [eballsm] Frame 1
function implode() {
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
mass = 2;
collision = 0;
dead = false;
hit = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
}
};
Symbol 78 MovieClip [eballspawn] Frame 1
function implode() {
dead = true;
this.xspeed = 0;
this.yspeed = 0;
this._x = -123;
this.removeMovieClip();
}
mass = 2;
collision = 0;
dead = false;
hit = false;
this.onEnterFrame = function () {
if (!_root.gpaused) {
this._x = this._x + xspeed;
this._y = this._y + yspeed;
if (this._x < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._x > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
if (this._y < -20) {
this.yspeed = 0;
this.xspeed = 0;
implode();
} else if (this._y > 620) {
this.yspeed = 0;
this.xspeed = 0;
implode();
}
}
};
Symbol 81 Button
on (release) {
upgraded = false;
score = 0;
mscore = 0;
level = new Array();
level[0] = new Array(60, 120, 200, 280, 380, 450, 500, 600, 630, 660);
level[1] = new Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
gpaused = true;
levelnum = 1;
powered = false;
balls = 0;
ss = 0.0009;
timer = 0;
enemySpot = 0;
enemy = new Array();
enemys = "";
_root.gotoAndStop(5);
}
Symbol 84 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 85 MovieClip [gameover] Frame 14
stop();
this._x = 300;
this._y = 300;
_root.gpaused = true;
_root.kongregateStats.submit("HighScore", _root.score);
_root.kongregateStats.submit("HighestLevel", _root.levelnum);
Symbol 93 Button
on (release) {
trace(_root.upgraded);
if (!_root.upgraded) {
if (!_root.ship.shoot) {
_root.ship.shoot = true;
_root.upgraded = true;
this.fade = true;
} else {
if (_root.ship.sspeed > 15) {
_root.ship.sspeed = _root.ship.sspeed - 5;
} else {
attachMovie("max", "max", _root.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse});
}
_root.upgraded = true;
this.fade = true;
}
}
if (_root.upgraded) {
this.fade = true;
}
}
Symbol 94 Button
on (release) {
trace(_root.upgraded);
if (!_root.upgraded) {
if (_root.crosshair.cmdist > 5) {
_root.crosshair.cmdist = _root.crosshair.cmdist - 7.5;
_root.upgraded = true;
this.fade = true;
} else {
attachMovie("max", "max", _root.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse});
}
}
if (_root.upgraded) {
this.fade = true;
}
}
Symbol 95 Button
on (release) {
trace(_root.upgraded);
if (!_root.upgraded) {
if ((!_root.circle.startsize) < 200) {
_root.circle.startsize = _root.circle.startsize + 20;
_root.upgraded = true;
this.fade = true;
} else {
attachMovie("max", "max", _root.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse});
}
}
if (_root.upgraded) {
this.fade = true;
}
}
Symbol 97 Button
on (release) {
trace(_root.upgraded);
if (!_root.upgraded) {
if ((!_root.crosshair.mdist) < 4) {
_root.crosshair.mdist = _root.crosshair.mdist + 0.25;
_root.upgraded = true;
this.fade = true;
} else {
attachMovie("max", "max", _root.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse});
}
}
if (_root.upgraded) {
this.fade = true;
}
}
Symbol 99 Button
on (release) {
this.fade = true;
}
Symbol 100 MovieClip [upgrades] Frame 1
Mouse.show();
fade = false;
this.onEnterFrame = function () {
trace(fade);
if (fade) {
this._alpha = this._alpha - 4;
if (this._alpha < 0) {
_root.startagain();
this.removeMovieClip();
}
}
};
Symbol 127 Button
on (release) {
getURL ("http://kongregate.com/", "_blank");
}
Symbol 153 MovieClip Frame 117
_root.gotoAndPlay(_root._currentframe + 1);
Symbol 160 MovieClip Frame 72
_root.gotoAndPlay(_root._currentframe + 1);
Symbol 166 Button
on (release) {
ever = true;
_root.gotoAndPlay(7);
}
Symbol 207 Button
on (release) {
getURL ("http://www.yellowdoggames.com/ref=Elaztik", "_blank");
}
Symbol 208 Button
on (release) {
ever = false;
_root.gotoAndPlay(9);
}
Symbol 212 Button
on (release) {
_root.gotoAndStop(11);
}
Symbol 214 Button
on (release) {
getURL ("http://www.kongregate.com/?gamereferral=elaztik", "_blank");
}
Symbol 220 MovieClip Frame 1
this.onEnterFrame = function () {
x = 0;
while (x < _root.enemy.length) {
if (this.hitTest(_root.enemy[x]._x, _root.enemy[x]._y)) {
_root.enemy[x].onscreen = true;
}
x++;
}
};
Symbol 228 Button
on (release) {
_root.gotoAndStop(6);
}