Frame 1
_fglv = new LoadVars();
_fglv.gid = 241;
_fglv.url = _root._url;
_fglv.sendAndLoad("http://www.freegamesforyourwebsite.com/stats.php", _fglv, "POST");
delete _fglv;
var debug = true;
var gameID = 231;
var gameName = "steel_tower";
stop();
fscommand ("showmenu", "false");
prel.onEnterFrame = function () {
prel.procent.text = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
prel.gotoAndStop(prel.procent.text);
if (Number(prel.procent.text) > 99) {
play();
delete this.onEnterFrame;
}
};
Frame 2
stop();
Frame 3
if (!okToPlay) {
gotoAndStop (2);
}
Frame 4
stop();
MENU = new ContextMenu();
MENU.builtInItems.zoom = false;
MENU.builtInItems.quality = true;
MENU.builtInItems.play = false;
MENU.builtInItems.loop = false;
MENU.builtInItems.rewind = false;
MENU.builtInItems.forward_back = false;
MENU.builtInItems.print = false;
_root.menu = MENU;
var hosta = "www.freeonlinegames.com";
var hostb = "freeonlinegames.com";
var hostc = "http://freeonlinegames.com";
var hostd = "http://www.freeonlinegames.com";
var validated = false;
validated = true;
play();
Frame 13
if (validated) {
gotoAndPlay (15);
} else {
gotoAndStop (14);
}
Frame 14
stop();
Frame 16
stop();
play_btn.onRelease = function () {
gotoAndPlay ("initialize");
};
viewhigh_btn.onRelease = function () {
gotoAndPlay ("scoreboard");
};
fgfyw_btn.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=241&area=menu", "_blank");
};
Instance of Symbol 204 MovieClip in Frame 16
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=241&area=minilogo", "_blank");
}
Frame 21
onEnterFrame = function () {
if (instructionvid._currentframe == 1030) {
instructionvid.stop();
gotoAndPlay ("playnow");
}
};
skipinstructions.onRelease = function () {
gotoAndPlay ("playnow");
};
Frame 25
stop();
Frame 31
function dist(a, b, c, d) {
xd = a - c;
yd = b - d;
return(Math.sqrt((xd * xd) + (yd * yd)));
}
function createNode(x, y, xv, yv, r, b, f, s) {
nodes.push(new Node(x, y, xv, yv, attachMovie("node", "Node:" + nodeid, _root.getNextHighestDepth(), {_width:r * 2, _height:r * 2}), b, f, r, s));
nodeid++;
trace((("creating new node at " + x) + ", ") + y);
return(nodes[nodes.length - 1]);
}
function constrainNodes(a, b, len, tolerance) {
trace("new constraint created, length " + len);
return(constraints.push(new Constraint(a, b, len, tolerance)));
}
function updatesparkdoll() {
cline.clear();
i = 0;
while (i < nodes.length) {
nodes[i].update(worldspeed);
n = nodes[i];
if ((n.y + n.r) > 585) {
n.y = 585 - n.r;
n.yv = -Math.abs(n.yv * n.bounce);
n.xv = n.xv * n.friction;
}
i++;
}
i = 0;
while (i < constraints.length) {
constraints[i].update();
i++;
}
}
function dist(a, b, c, d) {
xd = a - c;
yd = b - d;
return(Math.sqrt((xd * xd) + (yd * yd)));
}
function makeparticle(x, y, col, speed, dir, strength, uniformity, decay) {
vx = Math.cos(dir) * speed;
vy = Math.sin(dir) * speed;
particles.push(new Particle(x, y, vx, vy, col, decay, strength, uniformity));
}
function createParticleSpray(x, y, col, density, speed, dir, spread, strength, uniformity, decay, diru) {
trace((("creating particle spray at " + x) + ", ") + y);
standardspread = spread / density;
if (spread == 360) {
rotaterand = random(50);
}
i = 0;
while (i < density) {
tempdir = (((((standardspread * i) + dir) + random(diru)) - random(diru)) + rotaterand) / 57.2957795130823;
makeparticle(x, y, col, speed, tempdir, strength, uniformity, decay);
i++;
}
}
function updateparticles() {
particlemc.clear();
j = 0;
while (j < particles.length) {
if (particles[j].update() == "dead") {
delete particles[j];
particles.splice(j, 1);
j--;
}
j++;
}
}
function rhittest(r, ax, ay, bx, by) {
dx = ax - bx;
dy = ay - by;
dista = (dx * dx) + (dy * dy);
len = r * r;
if (dista > len) {
return(false);
}
return(true);
}
function addjoint(x, y) {
createParticleSpray(x, y, 255, 8, 10, 0, 360, 10, 0, 0.9, 0);
var _local3 = 450 - y;
if (_local3 > scoreheight) {
pheight = Math.abs(Math.round(_local3 - scoreheight));
score = score + (pheight * scoremultiplier);
ptext = ("+" + pheight.toString()) + "!";
trace("creating scoreup icon with value " + ptext);
plusmc = attachMovie("scoreup", "scoreup" + (scoreups++), _root.getNextHighestDepth(), {_x:x, _y:y, plus:ptext});
plusmc.onEnterFrame = function () {
this.swapDepths(_root.getNextHighestDepth());
if (this._currentframe == 35) {
this.stop();
delete this.onEnterFrame;
this.swapDepths(_root.getNextHighestDepth());
this.removeMovieClip();
}
};
if ((!freezemode) && (!speciallock)) {
if ((special + pheight) <= specialmax) {
special = special + pheight;
trace((((pheight + " added to specialbar. Specialbar contents: ") + special) + "/") + specialmax);
} else {
trace("specialbar full, locking special meter");
special = specialmax;
speciallock = true;
createParticleSpray(hud._x + 790, hud._y + 10, 4474111, 7, 5, 0, 360, 15, 0, 0.95, 0);
}
}
}
return(createNode(x, y, 0, 0, jointsize, jointbounce, jointfriction, false));
}
function addfoundation(x, y) {
return(createNode(x, y, 0, 0, jointsize, 0, 0, true));
}
function finddrawoffer() {
api.clear();
api.lineStyle(3, 255, 30);
drawfroms.splice(0);
i = 0;
while (i < nodes.length) {
if (rhittest(offerdrawl, _xmouse, _ymouse, nodes[i].x, nodes[i].y)) {
drawfroms.push(nodes[i]);
}
if ((nodes[i].y > 540) && (!gameending)) {
trace("a node has fallen below the killpoint, game timeout begun");
gameending = true;
}
i++;
}
if (drawfroms.length > 0) {
place = true;
a = drawfroms;
found = new Object();
found.obj = undefined;
found.len = offerdrawl + 1;
i = 0;
while (i < a.length) {
chckdist = dist(_xmouse, _ymouse, a[i].x, a[i].y);
if (chckdist < found.len) {
found.obj = a[i];
found.len = chckdist;
}
i++;
}
if (!connectmode) {
if (found.len > snapl) {
api.moveTo(found.obj.x, found.obj.y);
api.lineTo(_xmouse, _ymouse);
} else {
found.obj.self.gotoAndStop(2);
}
} else {
if (dist(connectpoint.x, connectpoint.y, found.obj.x, found.obj.y) <= joindist) {
api.lineStyle(3, 65280, 30);
} else {
api.lineStyle(3, 16711680, 30);
}
api.moveTo(connectpoint.x, connectpoint.y);
api.lineTo(found.obj.x, found.obj.y);
}
} else {
place = false;
}
}
function mousethrow() {
if (connectmode) {
if ((dist(connectpoint.x, connectpoint.y, found.obj.x, found.obj.y) <= joindist) && (dist(found.obj.x, found.obj.y, _xmouse, _ymouse) <= csnapl)) {
if (connectpoint != found.obj) {
double = false;
i = 0;
while (i < constraints.length) {
if ((constraints[i].a == connectpoint) && (constraints[i].b == found.obj)) {
double = true;
break;
}
if ((constraints[i].b == connectpoint) && (constraints[i].a == found.obj)) {
double = true;
break;
}
i++;
}
if (!double) {
cooldown = cooldownmax;
createParticleSpray(found.obj.x, found.obj.y, 65280, 8, 10, 0, 360, 10, 0, 0.9, 0);
createParticleSpray(connectpoint.x, connectpoint.y, 65280, 8, 10, 0, 360, 10, 0, 0.9, 0);
constrainNodes(found.obj, connectpoint, dist(found.obj.x, found.obj.y, connectpoint.x, connectpoint.y), breakpoint);
}
}
}
connectmode = false;
connectpoint = undefined;
} else if (place) {
if (found.len < snapl) {
connectmode = true;
connectpoint = found.obj;
} else {
constrainNodes(found.obj, addjoint(_xmouse, _ymouse), found.len, breakpoint);
cooldown = cooldownmax;
connectmode = true;
connectpoint = nodes[nodes.length - 1];
}
} else {
connectmode = false;
connectpoint = undefined;
}
}
function countbolts() {
tempbolts = 0;
i = 0;
while (i < nodes.length) {
if (nodes[i].r > 0) {
tempbolts++;
}
i++;
}
return(tempbolts);
}
function specialactivate() {
if (Key.isDown(32) && (speciallock)) {
trace("timefreeze mode enabled");
freezemode = true;
worldspeed = 0;
hud.freezemarker._xscale = 150;
hud.freezemarker._yscale = 150;
}
}
function wallhittest(ax, ay, bx, by, cx, cy, r) {
var _local1 = bx - ax;
var _local2 = by - ay;
var _local5 = (_local1 * _local1) + (_local2 * _local2);
u = (((cx - ax) * _local1) + ((cy - ay) * _local2)) / _local5;
if ((u < 1E-5) || (u > 1)) {
return(false);
}
ix = ax + (u * _local1);
iy = ay + (u * _local2);
ixd = ix - cx;
iyd = iy - cy;
rawdist = (ixd * ixd) + (iyd * iyd);
if (rawdist <= (r * r)) {
return(true);
}
return(false);
}
function finddelete() {
api.clear();
i = 0;
while (i < nodes.length) {
var _local3 = false;
if (rhittest(joindist, _xmouse, _ymouse, nodes[i].x, nodes[i].y)) {
j = 0;
while (j < constraints.length) {
if ((constraints[j].a == nodes[i]) || (constraints[j].b == nodes[i])) {
var _local2 = constraints[j].a;
var _local1 = constraints[j].b;
if (wallhittest(_local2.x, _local2.y, _local1.x, _local1.y, _xmouse, _ymouse, 8)) {
targetpylon = j;
api.lineStyle(16, 16777215, 50);
api.moveTo(_local2.x, _local2.y);
api.lineTo(_local1.x, _local1.y);
_local3 = true;
break;
}
targetpylon = undefined;
}
j++;
}
}
if (_local3) {
break;
}
i++;
}
}
function deletepylon() {
trace("deletepylon command called");
if (targetpylon != undefined) {
trace(targetpylon + " is selected for deletion");
var _local2 = constraints[targetpylon].a;
var _local1 = constraints[targetpylon].b;
delete constraints[targetpylon];
constraints.splice(targetpylon, 1);
trace("delete complete, beginning orphan check");
killorphans(_local2, _local1);
cooldown = cooldownmax;
}
}
function multipliers() {
if (special > (specialmax * 0.75)) {
hud.four._xscale = 150;
hud.four._yscale = 150;
hud.three._xscale = 100;
hud.three._xscale = 100;
hud.two._xscale = 100;
hud.two._yscale = 100;
scoremultiplier = 4;
} else if (special > (specialmax * 0.5)) {
hud.four._xscale = 100;
hud.four._yscale = 100;
hud.three._xscale = 150;
hud.three._xscale = 150;
hud.two._xscale = 100;
hud.two._yscale = 100;
scoremultiplier = 3;
} else if (special > (specialmax * 0.25)) {
hud.four._xscale = 100;
hud.four._yscale = 100;
hud.three._xscale = 100;
hud.three._xscale = 100;
hud.two._xscale = 150;
hud.two._yscale = 150;
scoremultiplier = 2;
} else {
hud.four._xscale = 100;
hud.four._yscale = 100;
hud.three._xscale = 100;
hud.three._xscale = 100;
hud.two._xscale = 100;
hud.two._yscale = 100;
scoremultiplier = 1;
}
}
function killorphans(a, b) {
trace("beginning orphan cleanup subroutine for suspect nodes");
af = false;
bf = false;
if (a.solid) {
trace("node a is a foundation point, ignoring.");
af = true;
}
if (b.solid) {
trace("node b is a foundation point, ignoring.");
bf = true;
}
i = 0;
while (i < constraints.length) {
if (af && (bf)) {
trace("both nodes are accounted for, exiting.");
return(undefined);
}
if (!af) {
if ((constraints[i].a == a) || (constraints[i].b == a)) {
af = true;
trace(("node a attached to constraint " + i) + ".");
}
}
if (!bf) {
if ((constraints[i].a == b) || (constraints[i].b == b)) {
bf = true;
trace(("node b attached to constraint " + i) + ".");
}
}
i++;
}
trace("one or more nodes is orphaned, initiating cleanup.");
if ((!af) || (!bf)) {
i = 0;
while (i < nodes.length) {
if ((nodes[i] == a) && (!af)) {
if (found.obj == a) {
trace(("node " + i) + " was the current selected node, safe deselecting.");
found.obj = undefined;
connectmode = false;
place = false;
}
trace(("removing node " + i) + "...");
a.self.removeMovieClip();
nodes.splice(i, 1);
af = true;
trace("...done.");
}
if ((nodes[i] == b) && (!bf)) {
if (found.obj == b) {
trace(("node " + i) + " was the current selected node, safe deselecting.");
found.obj = undefined;
connectmode = false;
place = false;
}
trace(("removing node " + i) + "...");
b.self.removeMovieClip();
nodes.splice(i, 1);
bf = true;
trace("...done.");
}
if (af && (bf)) {
trace("cleanup completed");
break;
}
i++;
}
}
}
function updatetower() {
if ((!gamepaused) && (!gameend)) {
if (Key.isDown(80) && ((getTimer() - pausetime) > 200)) {
pausetime = getTimer();
gamepaused = true;
}
multipliers();
if (cooldown < cooldownmax) {
hud.cooldownbar._xscale = 100 - ((cooldown / cooldownmax) * 100);
}
if (cooldown > 0) {
cooldown--;
}
if (freezemode) {
special = special - 1.5;
if (special < 1.5) {
trace("timefreeze mode disabled by timemout");
special = 0;
freezemode = false;
worldspeed = worldspeedset;
speciallock = false;
hud.freezemarker._xscale = 100;
hud.freezemarker._yscale = 100;
}
} else {
specialactivate();
}
hud.specialbar._xscale = (special / specialmax) * 100;
if (!speciallock) {
special = special * specialdecay;
hud.specialbar._alpha = 30;
hud.freezemarker._alpha = 10;
} else {
hud.specialbar._alpha = 80;
hud.freezemarker._alpha = 30;
}
updatesparkdoll();
if (!Key.isDown(16)) {
finddrawoffer();
} else {
found.obj = undefined;
connectmode = false;
place = false;
finddelete();
}
updateparticles();
crane.swapDepths(getNextHighestDepth());
clouds.swapDepths(getNextHighestDepth());
api.swapDepths(getNextHighestDepth());
hud.swapDepths(getNextHighestDepth());
if (gameending && (gametimeout > 0)) {
gametimeout--;
} else if (gameending && (gametimeout <= 0)) {
gameend = true;
trace("game ended, cleaning up world and displaying highscore dialog");
}
} else if (gamepaused) {
if (Key.isDown(80) && ((getTimer() - pausetime) > 200)) {
pausetime = getTimer();
gamepaused = false;
}
} else if (gameend) {
connectpoint = undefined;
api.removeMovieClip();
animatepoints();
updatesparkdoll();
updateparticles();
endscreen.swapDepths(getNextHighestDepth());
if (!endscreen._visible) {
endscreen._visible = true;
endscreen.submitScore.Score = _root.score;
}
if (endscreen._alpha < 100) {
endscreen._alpha = endscreen._alpha + 5;
}
if (hud._alpha > 50) {
hud._alpha = hud._alpha - 5;
} else {
hud.unloadMovie();
}
}
}
function cleanupworld() {
trace("garbage collector initiated");
gameend = true;
cline.removeMovieClip();
api.removeMovieClip();
i = 0;
while (i < nodes.length) {
nodes[i].self.removeMovieClip();
delete nodes[i];
i++;
}
nodes.splice(0);
i = 0;
while (i < constraints.length) {
delete constraints[i];
i++;
}
constraints.splice(0);
endscreen.removeMovieClip();
particlemc.removeMovieClip();
i = 0;
while (i < particles.length) {
delete particles[i];
i++;
}
particles.splice(0);
drawfroms.splice(0);
clouds.removeMovieClip();
crane.removeMovieClip();
hud.removeMovieClip();
trace("...done");
}
function camupdate() {
hud._y = cam._y - 273;
hud._x = cam._x - 425;
crane._y = (cam._y * -0.15) + 100;
fence._y = (cam._y * 0.15) + 350;
factories._y = (cam._y * 0.25) - 80;
city._y = (cam._y * 0.35) + 100;
higher = false;
i = 0;
while (i < nodes.length) {
if (nodes[i].y < maxheight) {
maxheight = nodes[i].y;
higher = true;
}
i++;
}
if (!higher) {
maxheight = 450;
i = 0;
while (i < nodes.length) {
if (nodes[i].y < maxheight) {
maxheight = nodes[i].y;
higher = true;
}
i++;
}
}
background._y = (cam._y * 0.5) - 37.3;
endscreen._y = cam._y;
if ((_ymouse > (cam._y + 150)) || (_ymouse < (cam._y - 150))) {
cam._y = cam._y + ((_ymouse - cam._y) * 0.03);
}
findheight();
if ((cam._y + halfheight) > 600) {
cam._y = 300;
}
if (maxheight < 0) {
if ((cam._y - halfheight) < (maxheight - 350)) {
cam._y = maxheight - 50;
}
} else if ((cam._y - halfheight) < -350) {
cam._y = -50;
}
}
function scoreupdate() {
amax = 450 - maxheight;
if (amax > scoreheight) {
scoreheight = Math.round(amax);
}
}
var constraints = new Array();
var nodes = new Array();
var nodeid = 0;
var worldspeedset = 0.2;
var worldspeed = 0.2;
var gravity = 0.7;
var cline = createEmptyMovieClip("constraintline", _root.getNextHighestDepth());
var particles = new Array();
var particlemc = createEmptyMovieClip("particle", _root.getNextHighestDepth());
var drawfroms = new Array();
trace("New game begun");
var offerdrawl = 115;
var joindist = 250;
var snapl = 30;
var jointbounce = 0.6;
var jointfriction = 0.8;
var breakpoint = 25;
var cooldownmax = 10;
var specialdecay = 0.9993;
var specialmax = 800;
var api = createEmptyMovieClip("api", _root.getNextHighestDepth());
var place = false;
var jointsize = 8;
var connectmode = false;
var connectpoint;
var cooldown = cooldownmax;
var gamepaused = false;
var gameend = false;
var gameending = false;
var gametimeout = 100;
var scoreups = 0;
var special = 0;
var speciallock = false;
var freezemode = false;
var targetpylon = undefined;
var pausetime = 0;
var scoremultiplier = 0;
var score = 0;
onMouseDown = function () {
if ((((!gameend) && (!gameending)) && (cooldown == 0)) && (!gamepaused)) {
if (!Key.isDown(16)) {
mousethrow();
} else {
deletepylon();
}
}
};
endscreen.restartbutton.onRelease = function () {
if (gameend) {
cleanupworld();
_root.gotoAndPlay("pregame");
}
};
endscreen.playmore_btn.onRelease = function () {
if (gameend) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=241&area=gameover", "_blank");
}
};
endscreen.backtomain_btn.onRelease = function () {
if (gameend) {
cleanupworld();
_root.gotoAndPlay("menu");
}
};
stop();
maxheight = 600;
higher = false;
scoreheight = 0;
endscreen._visible = false;
endscreen._alpha = 0;
addfoundation(400, 450);
addfoundation(600, 450);
halfheight = 300;
onEnterFrame = function () {
camupdate();
updatetower();
scoreupdate();
};
Frame 32
stop();
Instance of Symbol 436 MovieClip [TMP6ojzjuzm8i] in Frame 32
//component parameters
onClipEvent (construct) {
gameID = 0;
}
Instance of Symbol 441 MovieClip [TMP6pbk6uzm9i] in Frame 32
//component parameters
onClipEvent (construct) {
gameID = 0;
}
Symbol 16 MovieClip Frame 1
_root.earl223 = function (val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
};
Symbol 19 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 1
stop();
var tagctr = (random(55) + 1);
gotoAndStop(tagctr);
Symbol 82 MovieClip Frame 105
stop();
Symbol 85 Button
on (release) {
getURL ("http://www.freegamesforyourwebsite.com/click.php?gid=241&area=loader", "_blank");
}
Symbol 94 MovieClip Frame 35
stop();
Symbol 442 MovieClip [__Packages.Node] Frame 0
class Node
{
var x, y, xv, yv, self, bounce, friction, r, solid;
function Node (x, y, xv, yv, self, b, f, r, s) {
this.x = x;
this.y = y;
this.xv = xv;
this.yv = yv;
this.self = self;
this.self._rotation = random(45);
this.self.cacheAsBitmap = true;
bounce = b;
friction = f;
this.r = r;
solid = s;
self._x = x;
self._y = y;
}
function update(multiplier) {
if (!solid) {
if (_root.worldspeed > 0) {
yv = yv + _root.gravity;
}
x = x + (xv * multiplier);
y = y + (yv * multiplier);
self._x = x;
self._y = y;
self.stop();
} else {
xv = 0;
yv = 0;
}
if (this != _root.connectpoint) {
self.gotoAndStop(1);
} else {
self.gotoAndStop(3);
}
}
}
Symbol 443 MovieClip [__Packages.Constraint] Frame 0
class Constraint
{
var a, b, dlen, tolerance, rednum, alen, tempx, tempy, tempxv, tempyv, olda, xd, yd, dx, dy, force, dxf, dyf;
function Constraint (a, b, len, tolerance) {
this.a = a;
this.b = b;
dlen = len;
this.tolerance = tolerance;
if (a.solid || (b.solid)) {
this.tolerance = this.tolerance * 6;
}
}
function render() {
_root.cline.lineStyle(16, 8947848, 100);
_root.cline.moveTo(a.x, a.y);
_root.cline.lineTo(b.x, b.y);
_root.cline.lineStyle(8, 10066329, 100);
_root.cline.moveTo(a.x, a.y);
_root.cline.lineTo(b.x, b.y);
rednum = (Math.abs(dlen - alen) / tolerance) * 100;
_root.cline.lineStyle(16, 16711680, (rednum - 50) * 2);
_root.cline.moveTo(a.x, a.y);
_root.cline.lineTo(b.x, b.y);
}
function breakself(alen) {
if ((alen > (dlen + tolerance)) || (alen < (dlen - tolerance))) {
tempx = a.x;
tempy = a.y;
tempxv = a.xv;
tempyv = a.yv;
olda = a;
a = _root.createNode(tempx, tempy, tempxv, tempyv, 0, 0.5, 0.5);
tolerance = 10000;
_root.createParticleSpray(a.x, a.y, 13434879, random(6) + 3, 10, 0, 360, 12, 5, 0.9, 0);
trace(("constraint broken with overshoot of " + rednum) + "%");
_root.killorphans(olda, b);
}
}
function update() {
xd = (a.x + a.xv) - (b.x + b.xv);
yd = (a.y + a.yv) - (b.y + b.yv);
alen = Math.sqrt((xd * xd) + (yd * yd));
breakself(alen);
if ((a.y > (_root.cam._y - 300)) && (a.y < (_root.cam._y + 300))) {
render();
} else if ((b.y > (_root.cam._y - 300)) && (b.y < (_root.cam._y + 300))) {
render();
}
if (_root.worldspeed > 0) {
dx = xd / alen;
dy = yd / alen;
force = (dlen - alen) * 0.5;
dxf = dx * force;
dyf = dy * force;
if ((!a.solid) && (!b.solid)) {
a.xv = a.xv + dxf;
a.yv = a.yv + dyf;
b.xv = b.xv - dxf;
b.yv = b.yv - dyf;
} else if ((!a.solid) && (b.solid)) {
a.xv = a.xv + dxf;
a.yv = a.yv + dyf;
} else if (a.solid && (!b.solid)) {
b.xv = b.xv - dxf;
b.yv = b.yv - dyf;
}
}
}
}
Symbol 444 MovieClip [__Packages.Particle] Frame 0
class Particle
{
var x, ox, y, oy, col, decay, str, xv, yv;
function Particle (x, y, xv, yv, c, d, s, u) {
this.x = (ox = x);
this.y = (oy = y);
col = c;
decay = d - (random(u) * 0.1);
str = s;
this.xv = xv;
this.yv = yv;
}
function update() {
str = str * decay;
alp = alp * decay;
xv = xv * decay;
yv = yv * decay;
if ((alp <= 5) || (str < 2)) {
return("dead");
}
x = x + xv;
y = y + yv;
_root.particlemc.lineStyle(str, col, alp);
_root.particlemc.moveTo(ox, oy);
_root.particlemc.lineTo(x, y);
ox = x;
oy = y;
}
var alp = 100;
}
Symbol 102 MovieClip Frame 1
stop();
Instance of Symbol 114 MovieClip "mcNotice" in Symbol 153 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 153 MovieClip Frame 120
stop();
if ((_url.indexOf("freeonlinegames.com") >= 0) && (_url.indexOf("file:") == -1)) {
_root.okToPlay = true;
_root.play();
} else if (_root.debug) {
_root.okToPlay = true;
_root.play();
} else {
_root.mcTaglines._visible = false;
mcNotice._visible = true;
}
Symbol 154 MovieClip Frame 71
stop();
var fogsound = new Sound();
fogsound.onSoundComplete = function () {
_root.okToPlay = true;
_root.play();
};
fogsound.attachSound("fogaudio");
fogsound.start(0, 1);
Symbol 218 Button
on (release) {
getURL ("http://voidsoft.nytka.org", "_blank");
}
Symbol 329 MovieClip Frame 1000
_root.play();
Symbol 340 MovieClip [TMPd4lzhusf84] Frame 1
function earl223(val) {
var _local3 = new Array("_", "Z", "y", "x", "W", "v", "u", "T", "s", "r", "Q", "P", "O", "n", "m", "L", "K", "j", "i", "H", "g", "F", "e", "d", "C", "B", "a");
var _local2 = "";
val1 = 0;
while (val1 < val.length) {
if (val.substr(val1, 1) == ":") {
_local2 = _local2 + ":";
} else if (Number(val.substr(val1, 2)) > 26) {
_local2 = _local2 + _local3[Number(val.substr(val1, 1))];
} else if (Number(val.substr(val1, 1)) == 0) {
_local2 = _local2 + "_";
} else {
_local2 = _local2 + _local3[Number(val.substr(val1, 2))];
val1++;
}
val1++;
}
return(_local2);
}
mcButtonMain.mcButton.FOG.swapDepths(0);
mcButtonMain.mcButton.attachMovie(btnMC, "btnMC", 0);
mcButtonMain.mcButton.btnMC.onRelease = function () {
var _local2 = new LoadVars();
_local2.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
_local2.score = Score;
_local2.score2 = earl223(String(Score));
_local2.gamer = gameID;
_local2.id = random(9999999);
_local2.toString();
_local2.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", _local2, "POST");
delete this.onRelease;
};
Instance of Symbol 340 MovieClip [TMPd4lzhusf84] "submitScore" in Symbol 352 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
btnMC = "submitMe";
gameID = 231;
}
Symbol 354 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local4 = sX / this._width;
var _local3 = sY / this._height;
_parent._x = cX - (this._x * _local4);
_parent._y = cY - (this._y * _local3);
_parent._xscale = 100 * _local4;
_parent._yscale = 100 * _local3;
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 406 Button
on (release) {
_root.gotoAndPlay("menu");
}
Symbol 418 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 419 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 426 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 2
stop();
Symbol 436 MovieClip [TMP6ojzjuzm8i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + _root.gameID) + "&rand=") + random(999999));
Symbol 441 MovieClip [TMP6pbk6uzm9i] Frame 1
var arrScore = new Array();
mcScoreboard.sboard.dir = "stop";
mcScoreboard.sboard.mcScoreHolder.mcScore._visible = false;
mcLabel._visible = false;
var main = this;
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = main.mcScoreboard.sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
main.mcScoreboard.mcLoading._visible = false;
main.mcScoreboard.sboard.mcScoreHolder.item = myPlayer.length;
main.mcScoreboard.sboard.mcScoreHolder.speedy = 0;
main.mcScoreboard.sboard.mcScoreHolder.desty = 0;
main.mcScoreboard.sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
};
xmlPlayer.load(((("http://www.freeonlinegames.com/scoreboard/getTopPlayer.php?id=" + gameID) + "&rand=") + random(999999)) + "&filt=1");