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;
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__("debb3d6a", this, 10301, true);
var savefile = SharedObject.getLocal("magneticgame");
highscore = savefile.data.highsc;
if (highscore == null) {
highscore = 0;
}
gameSong = new Sound();
gameSong.attachSound("fight");
_quality = "MEDIUM";
Frame 2
stop();
Frame 3
stop();
Mouse.show();
gpause = false;
fader.swapDepths(10);
Frame 4
function nuke() {
attachMovie("nukefade", "nukefade", 10000);
for (var _local1 in misl) {
if (misl[_local1]._currentframe != 2) {
cmbocnt++;
combo = combo + (10 * cmbocnt);
combotime = 20;
misl[_local1].gotoAndStop(2);
}
}
}
function attachMS(dir, dpth) {
if (dir == 1) {
msgl.attachMovie("mglo", "mg" + dpth, dpth);
} else {
msgl.attachMovie("mglo_r", "mg" + dpth, dpth);
}
msgl["mg" + dpth]._x = _xmouse;
msgl["mg" + dpth]._y = _ymouse;
}
function attachBlock(xpos, ypos, dpth) {
blok.attachMovie("block", "b" + dpth, dpth);
var _local1 = blok["b" + dpth];
_local1._x = xpos;
_local1._y = ypos;
_local1.xmv = random(10) - 5;
_local1.ymv = 0;
_local1.hw = _local1._width / 2;
_local1.hh = _local1._height / 2;
}
function attachBase(xpos, ypos, dpth) {
attachMovie("base", "ba" + dpth, dpth);
var _local2 = _root["ba" + dpth];
bases.push(_root["ba" + dpth]);
_local2._x = xpos;
_local2._y = ypos;
basetot++;
_local2.hits = 1;
}
function attachMissile(xpos, ypos, dpth, targ_x, targ_y, plain) {
misl.attachMovie("missile", "m" + dpth, dpth);
misl.createEmptyMovieClip(("m" + dpth) + 1, dpth + 1);
misl[("m" + dpth) + 1].lineStyle(1, 16711680, 50);
misl[("m" + dpth) + 1].moveTo(xpos, ypos);
var _local1 = misl["m" + dpth];
misls.push(misl["m" + dpth]);
_local1._x = xpos;
if ((((Math.random() * 100) > 98) and (_local1.redir == null)) and (plain != true)) {
if (random(2) == 0) {
_local1.gotoAndStop(3);
misl[("m" + dpth) + 1].lineStyle(1, 255, 50);
} else {
_local1.gotoAndStop(4);
misl[("m" + dpth) + 1].lineStyle(1, 65331, 50);
}
} else if ((((Math.random() * 100) > 94) and (lvl > 15)) and (plain != true)) {
_local1.splitlvl = random(100) + 10;
_local1.gotoAndStop(6);
misl[("m" + dpth) + 1].lineStyle(2, 16711680, 50);
} else if ((((Math.random() * 100) > 80) and (lvl > 7)) and (plain != true)) {
_local1.redir = random(190) + 10;
_local1.targ_x = targ_x;
_local1.gotoAndStop(5);
} else {
_local1.gotoAndStop(1);
}
_local1._y = ypos;
_local1.dpth = dpth;
_local1.speed = ((random(15) + 6) / 20) + (lvl / 25);
findTarget(_local1._x, _local1._y, targ_x, targ_y);
_local1.xmv = xmv * _local1.speed;
_local1.ymv = ymv * _local1.speed;
ang = ang * 57.2957795130823;
_local1._rotation = ang;
_local1.hw = _local1._width / 2;
_local1.hh = _local1._height / 2;
}
function dist(x1, y1, x2, y2) {
xdist = x2 - x1;
ydist = y2 - y1;
distance = Math.sqrt((xdist * xdist) + (ydist * ydist));
}
function angle(x1, y1, x2, y2) {
ad = x2 - x1;
op = y2 - y1;
ang = Math.atan2(op, ad);
ang = ang * 57.2957795130823;
}
function anglexy(ang) {
ang = ang / 57.2957795130823;
xmv = Math.cos(ang);
ymv = Math.sin(ang);
}
function findTarget(x1, y1, x2, y2) {
ad = x2 - x1;
op = y2 - y1;
ang = Math.atan2(op, ad);
xmv = Math.cos(ang);
ymv = Math.sin(ang);
}
function processPush(obj, x2, y2, pw) {
ad = x2 - obj._x;
op = y2 - obj._y;
ds = Math.sqrt((ad * ad) + (op * op));
obj.obp = int((pw / ds) * 10) / 10;
if (obj.obp > 1) {
ang = Math.atan2(op, ad);
xmv = Math.cos(ang);
ymv = Math.sin(ang);
if (obj.obp > 2) {
obj.obp = 2;
}
obj.obp = obj.obp + ((random(100) - 50) / 50);
obj.xmv = obj.xmv + ((-xmv) * obj.obp);
obj.ymv = obj.ymv + ((-ymv) * obj.obp);
}
}
createEmptyMovieClip("blok", 20);
createEmptyMovieClip("misl", 21);
createEmptyMovieClip("msgl", 10);
createEmptyMovieClip("flsh", -20000);
power.swapDepths(91);
fader.swapDepths(2000000);
brdr.swapDepths(90);
flshs = 0;
gameSong.start(0, 1000000);
gameisover = false;
ms._x = _xmouse;
ms._y = _ymouse;
stop();
basetot = 0;
misls = new Array();
bases = new Array();
onMouseDown = function () {
mousedown = true;
if (!gpause) {
if (powerup != "Reverse Polarity") {
attachMS(1, mscnt);
} else {
attachMS(-1, mscnt);
}
}
mscnt++;
};
onMouseUp = function () {
mousedown = false;
};
mscnt = 0;
block = function () {
};
block.prototype = new MovieClip();
block.prototype.onEnterFrame = function () {
if (!gpause) {
this._x = this._x + this.xmv;
this._y = this._y + this.ymv;
this.blk._rotation = this.blk._rotation + this.xmv;
this.hw = this._width / 2;
this.hh = this._height / 2;
this.ht._width = Math.abs(this.xmv * 2);
this.ht._height = Math.abs(this.ymv * 2);
i = misls.length;
while (i >= 0) {
if (this.hitTest(misls[i])) {
if (misls[i]._currentframe == 3) {
nuke();
}
if (misls[i]._currentframe == 4) {
powerup = "Reverse Polarity";
power.txt._x = misls[i]._x - power._x;
power.txt._y = misls[i]._y - power._y;
power.cnt = 0;
pwrcnt = 1000;
}
misls[i].gotoAndStop(2);
cmbocnt++;
combo = combo + (10 * cmbocnt);
combotime = 20;
misls.splice(i, 1);
}
i--;
}
this.grnd = grnd - this.hw;
if (this._y < this.grnd) {
this.ymv = this.ymv + 0.5;
this.gotoAndStop(2);
}
if (this._y >= this.grnd) {
this.gotoAndStop(1);
this.xmv = this.xmv * 0.8;
if (this._y > this.grnd) {
this._y = this.grnd;
this.ymv = this.ymv * -0.6;
if (Math.abs(this.ymv) < 2) {
this.ymv = 0;
if (Math.abs(this.xmv) < 2) {
this.blk._rotation = 0;
}
if (mhits > 0) {
metl.gotoAndPlay(2);
mhits--;
}
} else {
mhits = 3;
metl.gotoAndPlay(2);
}
}
}
if (this._x < (edge1 + 15)) {
this._x = edge1 + 15;
if (this.xmv < 0) {
this.xmv = this.xmv * -1;
metl.gotoAndPlay(2);
}
}
if (this._x > (edge2 - 15)) {
this._x = edge2 - 15;
if (this.xmv > 0) {
this.xmv = this.xmv * -1;
metl.gotoAndPlay(2);
}
}
if (mousedown and (!gameisover)) {
if (powerup != "Reverse Polarity") {
processPush(this, _xmouse, _ymouse, 130);
} else {
this.xmv = (((_xmouse + random(14)) - 7) - this._x) / (10 + this.getDepth());
this.ymv = (((_ymouse + random(14)) - 7) - this._y) / (10 + this.getDepth());
}
}
}
if (this.xmv > maxx) {
xmv = maxx;
}
if (this.xmv < (-maxx)) {
xmv = -maxx;
}
if (this.ymv > maxy) {
ymv = maxy;
}
if (this.ymv < (-maxy)) {
ymv = -maxy;
}
};
maxx = 10;
maxy = 10;
grnd = 350;
edge1 = 25;
edge2 = 575;
Object.registerClass("block", block);
Missile = function () {
};
Missile.prototype = new MovieClip();
Missile.prototype.onEnterFrame = function () {
if (!gpause) {
if (this._y > this.redir) {
this.redir = null;
this.speed = this.speed * 1.6;
if (basetot > 1) {
this.targcho = new Array();
i = 0;
while (i < bases.length) {
if (bases[i]._x != this.targ_x) {
this.targcho.push(bases[i]);
}
i++;
}
basetarg = random(targcho.length);
findTarget(this._x, this._y, this.targcho[basetarg]._x, 375);
this.xmv = xmv * this.speed;
this.ymv = ymv * this.speed;
ang = ang * 57.2957795130823;
this._rotation = ang;
}
}
if (this._y > this.splitlvl) {
this.splitlvl = null;
if (basetot > 1) {
basetarg = 0;
attachMissile(this._x, this._y, bls, bases[basetarg]._x, 375, true);
bls = bls + 2;
basetarg = 1;
attachMissile(this._x, this._y, bls, bases[basetarg]._x, 375, true);
bls = bls + 2;
if (basetot > 2) {
basetarg = 2;
attachMissile(this._x, this._y, bls, bases[basetarg]._x, 375, true);
bls = bls + 2;
}
}
if (basetot > 1) {
misl[("m" + this.getDepth()) + 1].removeMovieClip();
this.removeMovieClip();
}
}
if (this._currentframe != 2) {
this._x = this._x + this.xmv;
this._y = this._y + this.ymv;
misl[("m" + this.getDepth()) + 1].lineTo(this._x, this._y);
}
if (this._x == 0) {
this.removeMovieClip();
}
if (this._y > grnd) {
this.gotoAndStop(2);
}
i = bases.length - 1;
while (i >= 0) {
if (bases[i].hitTest(this._x, this._y, true) and (this._currentframe != 2)) {
bases[i].hits++;
bases[i].base.gotoAndStop(bases[i].hits);
if (bases[i].hits > 3) {
bases[i].removeMovieClip();
bases.splice(i, 1);
basetot--;
}
this.gotoAndStop(2);
}
i--;
}
}
};
Object.registerClass("missile", Missile);
bls = 0;
timer = 0;
Mouse.hide();
attachBase(300, grnd + 6, 1);
attachBase(109, grnd + 6, 2);
attachBase(491, grnd + 6, 3);
combo = 0;
cmbocnt = 0;
combotime = 0;
score = 0;
cmbo.swapDepths(9000);
gover.swapDepths(100000);
onEnterFrame = function () {
if (!gpause) {
if (powerup != null) {
power.txt.pwr = powerup;
power._alpha = (pwrcnt / 1000) * 100;
pwrcnt = pwrcnt - 5;
if (pwrcnt <= 0) {
powerup = null;
}
} else {
power.pwr = " ";
power._alpha = 0;
}
if (combotime > 0) {
combotime--;
cmbo.cnt = "Combo x" + cmbocnt;
if ((cmbo._currentframe == 1) or (cmbo._currentframe == 19)) {
cmbo.gotoAndPlay("up");
}
} else {
if (cmbo._currentframe == 11) {
cmbo.gotoAndPlay("down");
}
score = score + combo;
combo = 0;
cmbocnt = 0;
}
if (!gameisover) {
brdr.aaa = score;
timer++;
} else {
aaa = " ";
}
oldlvl = lvl;
lvl = int(timer / 400) + 1;
if (oldlvl != lvl) {
if (lvl == 8) {
excube.gotoAndStop(2);
excube.lvl = ("Level " + lvl) + "!";
attachBlock(random(550) + 25, -25, bks);
bks++;
}
if (lvl == 16) {
excube.gotoAndStop(2);
excube.lvl = ("Level " + lvl) + "!";
attachBlock(random(550) + 25, -25, bks);
bks++;
}
if (lvl == 24) {
excube.gotoAndStop(2);
excube.lvl = ("Level " + lvl) + "!";
attachBlock(random(550) + 25, -25, bks);
bks++;
}
}
brdr.lvlt = "Level " + lvl;
lnchint = 60 - lvl;
if (lnchint < 40) {
lnchint = 40;
}
if (((timer / lnchint) == int(timer / lnchint)) and (bases.length > 0)) {
lnch = int(lvl / 1.5);
if (lnch > 10) {
lnch = 10;
}
i = 0;
while (i < (random(lnch) + 1)) {
basetarg = random(bases.length);
attachMissile(random(550) + 25, -random(100), bls, bases[basetarg]._x, 375);
bls = bls + 2;
i++;
}
}
if (mousedown) {
bdist = 10000;
i = 0;
while (i < bases.length) {
dist(bases[i]._x, bases[i]._y, _xmouse, _ymouse);
if (distance < bdist) {
bdist = distance;
baseon = bases[i];
}
i++;
}
baseon.gotoAndStop(2);
}
if (basetot == 0) {
gover.gotoAndPlay(2);
gameisover = true;
basetot = -1;
}
paus._visible = false;
} else {
paus._visible = true;
}
mstarg._x = _xmouse;
mstarg._y = _ymouse;
if (Key.isDown(32) and (!nosp)) {
nosp = true;
if (!gpause) {
mstarg._visible = false;
Mouse.show();
gpause = true;
} else {
mstarg._visible = true;
Mouse.hide();
gpause = false;
}
}
if (!Key.isDown(32)) {
nosp = false;
}
};
paus._visible = false;
excube.swapDepths(90030);
power.swapDepths(90031);
mstarg.swapDepths(100001);
paus.swapDepths(90032);
bks = 0;
i = 0;
while (i < 1) {
attachBlock((175 * i) + 100, 300, bks);
bks++;
i++;
}
Frame 5
for (var i in _root) {
removeMovieClip(_root[i]);
}
gameSong.stop();
gotoAndStop ("game");
Symbol 7 MovieClip Frame 7
_root.expl.gotoAndPlay(2);
Symbol 7 MovieClip Frame 11
i = _root.misls.length;
while (i >= 0) {
if (_parent.hitTest(_root.misls[i]) and (_root.misls[i]._currentframe != 2)) {
if (_root.misls[i]._currentframe == 3) {
_root.nuke();
}
if (_root.misls[i]._currentframe == 4) {
_root.powerup = "Reverse Polarity";
_root.pwrcnt = 1000;
}
_root.cmbocnt++;
_root.combo = _root.combo + (10 * _root.cmbocnt);
_root.combotime = 20;
_root.misls[i].gotoAndStop(2);
_root.misls.splice(i, 1);
}
i--;
}
Symbol 7 MovieClip Frame 25
stop();
_root.misl[("m" + _parent.getDepth()) + 1].removeMovieClip();
_parent.removethis.removeMovieClip();
_parent.removeMovieClip();
Symbol 10 MovieClip [missile] Frame 2
_root.flsh.attachMovie("flsh", "fl" + _root.flshs, _root.flshs);
_root.flsh["fl" + _root.flshs]._x = this._x;
_root.flsh["fl" + _root.flshs]._y = this._y;
_root.flshs++;
Symbol 25 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 18
_parent.gotoAndStop(1);
Symbol 29 MovieClip [base] Frame 1
stop();
base.gotoAndStop(hits);
Symbol 29 MovieClip [base] Frame 2
base.gotoAndStop(hits);
Symbol 32 MovieClip [mglo_r] Frame 4
if (_root.mousedown) {
if (_root.powerup != "Reverse Polarity") {
_root.attachMS(1, _root.mscnt);
} else {
_root.attachMS(-1, _root.mscnt);
}
_root.mscnt++;
}
Symbol 32 MovieClip [mglo_r] Frame 11
this.removeMovieClip();
Symbol 33 MovieClip [mglo] Frame 4
if (_root.mousedown) {
if (_root.powerup != "Reverse Polarity") {
_root.attachMS(1, _root.mscnt);
} else {
_root.attachMS(-1, _root.mscnt);
}
_root.mscnt++;
}
Symbol 33 MovieClip [mglo] Frame 11
this.removeMovieClip();
Symbol 36 MovieClip [nukefade] Frame 10
this.removeMovieClip();
stop();
Symbol 39 MovieClip [flsh] Frame 30
this.removeMovieClip();
Symbol 48 Button
on (release) {
getURL ("http://www.thegamehomepage.com/", "_blank");
}
Symbol 56 Button
on (release) {
gotoAndPlay ("intro");
}
Symbol 61 MovieClip Frame 1
var CPMStarPoolID = 1577;
var CPMStarSubPoolID = 2;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
_root.stop();
Symbol 61 MovieClip Frame 2
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
tghbar._xscale = PercentLoaded;
} else {
gotoAndPlay ("loaded");
}
Symbol 61 MovieClip Frame 3
gotoAndPlay (2);
Symbol 61 MovieClip Frame 73
stop();
Symbol 61 MovieClip Frame 117
Symbol 61 MovieClip Frame 172
Symbol 61 MovieClip Frame 198
_root.play();
Symbol 67 MovieClip Frame 95
_root.gotoAndPlay(2);
stop();
Symbol 75 MovieClip Frame 55
stop();
Symbol 87 Button
on (release) {
getURL ("http://www.thegamehomepage.com", "_blank");
}
Symbol 89 Button
on (release) {
tgh_startgame(_root.score, "score", 0);
_root.gotoAndPlay("game");
}
Symbol 92 Button
on (release) {
_root.gotoAndStop("instr");
}
Symbol 95 Button
on (release) {
getURL ("http://myspace.com/z3n0n", "_blank");
}
Symbol 98 Button
on (release) {
getURL ("http://www.beastgames.org", "_blank");
}
Symbol 99 MovieClip Frame 109
stop();
Symbol 100 MovieClip Frame 1
onEnterFrame = function () {
this._alpha = this._alpha - 6;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 11
stop();
Symbol 112 MovieClip Frame 19
stop();
Symbol 115 MovieClip Frame 1
goalx = txt._x;
goaly = txt._y;
cnt = 0;
onEnterFrame = function () {
if (cnt > 10) {
txt._x = txt._x + ((goalx - txt._x) / 10);
txt._y = txt._y + ((goaly - txt._y) / 10);
} else {
cnt++;
}
};
Symbol 119 Button
on (release) {
getURL ("http://www.thegamehomepage.com", "_blank");
}
Symbol 127 Button
on (release) {
_root.gotoAndPlay("restart");
}
Symbol 130 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 25
stop();
Mouse.show();
_root.mstarg.removeMovieClip();
tgh_submitscore(_root.score);
scr = _root.score;
if (_root.score > _root.highscore) {
_root.highscore = _root.score;
_root.savefile.data.highsc = _root.score;
highscr.gotoAndStop(2);
}
hscr = _root.highscore;
grd = "F-";
if (_root.lvl > 1) {
grd = "F";
}
if (_root.lvl > 2) {
grd = "F+";
}
if (_root.lvl > 4) {
grd = "D-";
}
if (_root.lvl > 5) {
grd = "D";
}
if (_root.lvl > 6) {
grd = "D+";
}
if (_root.lvl > 8) {
grd = "C-";
}
if (_root.lvl > 9) {
grd = "C";
}
if (_root.lvl > 11) {
grd = "C+";
}
if (_root.lvl > 15) {
grd = "B-";
}
if (_root.lvl > 16) {
grd = "B";
}
if (_root.lvl > 17) {
grd = "B+";
}
if (_root.lvl > 19) {
grd = "A-";
}
if (_root.lvl > 21) {
grd = "A";
}
if (_root.lvl > 25) {
grd = "A+";
}
Symbol 142 Button
on (release) {
if (_root.gpause == true) {
_root.gameSong.setVolume(0);
this.gotoAndStop(2);
}
}
Symbol 144 Button
on (release) {
if (_root.gpause == true) {
_root.gameSong.setVolume(100);
this.gotoAndStop(1);
}
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 147 Button
on (release) {
if (_root.gpause == true) {
for (var i in _root) {
removeMovieClip(_root[i]);
}
_root.gameSong.stop();
_root.gpause = false;
_root.gotoAndStop("title");
}
}
Symbol 149 Button
on (release) {
if (_root.gpause == true) {
_root.gpause = false;
_root.gotoAndPlay("restart");
}
}
Symbol 153 MovieClip Frame 61
_parent.gotoAndStop(1);
Symbol 154 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 38
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 38
stop();
Symbol 161 MovieClip Frame 1
onEnterFrame = function () {
if (_root.mousedown) {
gotoAndPlay (2);
}
};
Symbol 161 MovieClip Frame 7
if (_root.mousedown) {
gotoAndPlay (2);
}
Symbol 167 Button
on (release) {
_root.gotoAndStop(_root._currentframe + 1);
}
Symbol 174 Button
on (release) {
tgh_startgame(_root.score, "score", 0);
gotoAndStop ("game");
}