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__("f36d81bd", this, 10301, true);
theURL = "http://www.newgrounds.com/refer/raidgaza";
mochi.MochiServices.connect("7c7ea8b06c0c5031");
Frame 2
function submitScore(ratio) {
var _local1 = int((ratio * casualties) / 10) * 10;
trace(_local1);
mochi.MochiScores.showLeaderboard({boardID:"fd87157045bf45e2", score:_local1});
}
function bonus() {
bonusSound.start();
bonusHappening = 1;
casualties = casualties + (10 + random(15));
attachMovie("hospitalHit", "hospitalHit", _root.getNextHighestDepth() + 1);
}
function bonus2() {
bonusSound.start();
bonusHappening = 1;
casualties = casualties + (5 + random(15));
attachMovie("policeHit", "policeHit", _root.getNextHighestDepth() + 1);
}
function bonus3() {
bonusSound.start();
bonusHappening = 1;
casualties = casualties + (5 + random(15));
attachMovie("schoolHit", "schoolHit", _root.getNextHighestDepth() + 1);
}
function aidFunction() {
aidLimit = aidLimitValue;
attachMovie("aidClip", "aidClip", _root.getNextHighestDepth() + 1);
}
function stopSound(sound, loops) {
eval (sound).stop(sound);
}
function playSound(sound, loops) {
eval (sound).stop(sound);
eval (sound).start(0, loops);
}
function fadeIn(sound, time) {
eval (sound).setVolume(0);
_root.createEmptyMovieClip("fader", 1);
fader.onEnterFrame = function () {
if (this.h == undefined) {
this.h = 0;
}
this.h = this.h + (32 / time);
if (this.h > 100) {
this.h = 100;
}
eval (sound).setVolume(this.h);
if (this.h == 100) {
delete this.onEnterFrame;
removeMovieClip(this);
}
};
}
function productivityFunction() {
_root.playSound("increaseSound");
attachMovie("productivityIncreased", "productivityIncreased", _root.getNextHighestDepth() + 1, {_x:630, _y:245});
productionSpeed = productionSpeed * 2;
if (aidLimitValue > 400) {
aidLimitValue = aidLimitValue - 50;
}
productivityCost = productivityCost + 500;
}
function qassamAttack() {
missileSound.start();
game.attachMovie("qassam", "qassam" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_root.game.explodeMarker._x + random(20), _y:_root.game.explodeMarker._y + random(100)});
}
stopAllSounds();
soundArray = ["cheers1", "cheers2", "cheers3", "fanfare", "buildCity", "buildingCollapse", "telephoneSound", "bonusSound", "menuSong", "increaseSound", "missileSound", "barLoop", "smallExplosionSound", "mediumExplosionSound", "missilePruttSound", "barrackSound", "tankShotSound", "infantryShootingSound"];
for (var i in soundArray) {
this.createEmptyMovieClip(String(soundArray[i] + "Container"), this.getNextHighestDepth() + 10);
var poppa = (soundArray[i] + "Container");
this[soundArray[i]] = new Sound(poppa);
this[soundArray[i]].attachSound(soundArray[i]);
}
stop();
Instance of Symbol 266 MovieClip in Frame 2
onClipEvent (load) {
t = 0;
}
onClipEvent (enterFrame) {
if (Key.isDown(32) && (p != 1)) {
_parent.nextFrame();
p = 1;
}
t++;
if (t == 180) {
play();
}
}
Frame 3
stop();
menuSong.start(0, 99);
Instance of Symbol 336 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.soundIs == "off") {
_root.setVolume(0);
}
}
Frame 4
stop();
pcpuStart = 0;
productionSpeed = 0.3;
sheqel = 10000;
sheqelT = sheqel;
end = 0;
timer = 0;
timeOver = 5;
timeOver = (timeOver * 32) * 60;
aidLimit = 0;
aidLimitValue = 1000;
casualties = 0;
icasualties = 1;
t = 0;
attack = 100;
bonusHappened = 0;
bonusHappened2 = 0;
bonusHappened3 = 0;
bonusHappening = 0;
casualtiesT = 0;
icasualtiesT = 0;
infantryDeath = 0;
infantryHealth = 100;
tankHealth = 150;
infantryMorale = 100;
tankMorale = 100;
infantryCost = 100;
tankCost = 500;
missileCost = 400;
airplaneCost = 400;
helicopterCost = 400;
electricityCost = 500;
productivityCost = 1000;
aidValue = 5000;
aidCost = 0;
hqCost = 1200;
insufficientFunds = "Insufficient funds!";
barracksCost = 1000;
airportCost = 1100;
missileCost = 800;
airportTime = 120;
missilTime = 60;
hqTime = 150;
barracksTime = 100;
missileTime = 70;
tankTime = 100;
infantryTime = 50;
airplaneTime = 140;
helicopterTime = 180;
tempP = 0;
t = 0;
this.onEnterFrame = function () {
if (tempP != 1) {
t++;
if (t == 40) {
_root.qassamAttack();
} else if (t == 220) {
_root.gubbe.nextFrame();
tempP = 1;
t = 0;
}
}
if (_root.pcpuStart == 1) {
if (timer >= timeOver) {
pcpuStart = 2;
}
if (casualtiesT < casualties) {
casualtiesT++;
}
if (icasualtiesT < icasualties) {
icasualtiesT++;
}
if (sheqelT < sheqel) {
if (sheqelT < (sheqel - 100)) {
sheqelT = sheqelT + 50;
} else {
sheqelT = sheqelT + 10;
}
} else if (sheqelT > sheqel) {
if (sheqelT > (sheqel + 100)) {
sheqelT = sheqelT - 50;
} else {
sheqelT = sheqelT - 10;
}
}
timer++;
timeLine.bar._xscale = 100 - ((timer / timeOver) * 100);
secondsLeft = Math.floor((timeOver - timer) / 32);
minutesLeft = Math.floor(secondsLeft / 60);
secondsLeft = secondsLeft - (minutesLeft * 60);
if (minutesLeft < 10) {
minutesLeft = "0" + String(minutesLeft);
}
if (secondsLeft < 10) {
secondsLeft = "0" + String(secondsLeft);
}
timeLine.minute.text = minutesLeft;
timeLine.second.text = secondsLeft;
if (aidLimit > 0) {
aidLimit--;
}
t++;
if (t == attack) {
_root.qassamAttack();
t = 0;
attack = 100 + (5 * random(120));
}
} else if ((_root.pcpuStart == 2) && (end != 1)) {
infantryShootingSound.stop("infantryShootingSound");
aidClip.removeMovieClip();
game.troops.swapDepths(game.getNextHighestDepth() + 1);
game.troops.removeMovieClip();
game.removeMovieClip(game.getInstanceAtDepth(9999));
gubbe.nextFrame();
end = 1;
}
};
Frame 5
stopAllSounds();
gotoAndStop (2);
Symbol 4 Button
on (release) {
play();
}
Symbol 11 MovieClip Frame 1
gotoAndStop(random(this._totalframes) + 1);
Symbol 12 MovieClip [aidClip] Frame 33
tellTarget (_root) {
telephoneSound.start();
};
Symbol 12 MovieClip [aidClip] Frame 150
stop();
Symbol 12 MovieClip [aidClip] Frame 158
_root.sheqel = _root.sheqel + _root.aidValue;
_root.aidValue = _root.aidValue + 1000;
Symbol 12 MovieClip [aidClip] Frame 165
removeMovieClip(this);
Symbol 20 MovieClip [schoolHit] Frame 87
_root.bonusHappening = 0;
removeMovieClip(this);
stop();
Symbol 28 Button
on (rollOver) {
text = "Raze building";
cost = "";
}
on (release) {
_root.playSound("buildingCollapse");
_root.game[kocchi].gotoAndStop(4);
this.removeMovieClip();
this.removeMovieClip();
}
Symbol 32 Button
on (rollOver) {
text = "Build AH-64 Apache helicopter";
cost = "cost: " + _root.helicopterCost;
}
on (release) {
if (_root.sheqel >= _root.helicopterCost) {
_root.sheqel = _root.sheqel - _root.helicopterCost;
_root.game[kocchi].building.motive = "helicopter";
_root.game[kocchi].building.build = 0;
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 35 Button
on (rollOver) {
text = "Build F15I airplane";
cost = "cost: " + _root.airplaneCost;
}
on (release) {
if (_root.sheqel >= _root.airplaneCost) {
_root.sheqel = _root.sheqel - _root.airplaneCost;
_root.game[kocchi].building.motive = "airplane";
_root.game[kocchi].building.build = 0;
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 39 Button
on (rollOver) {
text = "Cancel";
cost = "";
}
on (release) {
this.removeMovieClip();
}
Symbol 43 Button
on (rollOver) {
text = "Build barracks";
cost = "Cost: " + _root.barracksCost;
}
on (release) {
if (_root.sheqel >= _root.barracksCost) {
_root.sheqel = _root.sheqel - _root.barracksCost;
_root.game[kocchi].nextFrame();
_root.game[kocchi].what = "barracks";
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 45 Button
on (rollOver) {
text = "Build headquarters";
cost = "Cost: " + _root.hqCost;
}
on (release) {
if (_root.sheqel >= _root.hqCost) {
_root.sheqel = _root.sheqel - _root.hqCost;
_root.game[kocchi].nextFrame();
_root.game[kocchi].what = "hq";
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 48 Button
on (rollOver) {
text = "Build airport";
cost = "Cost: " + _root.airportCost;
}
on (release) {
if (_root.sheqel >= _root.airportCost) {
_root.sheqel = _root.sheqel - _root.airportCost;
_root.game[kocchi].nextFrame();
_root.game[kocchi].what = "airport";
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 51 Button
on (rollOver) {
text = "Build missile pad";
cost = "Cost: " + _root.missileCost;
}
on (release) {
if (_root.sheqel >= _root.missileCost) {
_root.sheqel = _root.sheqel - _root.missileCost;
_root.game[kocchi].nextFrame();
_root.game[kocchi].what = "missile";
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 55 Button
on (rollOver) {
text = "Raze building";
cost = "";
}
on (release) {
_root.playSound("buildingCollapse");
_root.game[kocchi].gotoAndStop(4);
this.removeMovieClip();
this.removeMovieClip();
}
Symbol 56 Button
on (rollOver) {
text = "Build missile";
cost = "cost: " + _root.missileCost;
}
on (release) {
if (_root.sheqel >= _root.missileCost) {
_root.sheqel = _root.sheqel - _root.missileCost;
_root.game[kocchi].building.motive = "missil";
_root.game[kocchi].building.build = 0;
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 63 MovieClip [productivityIncreased] Frame 30
this.removeMovieClip();
Symbol 67 MovieClip Frame 1
stop();
Symbol 69 Button
on (rollOver) {
text = "Build infantry";
cost = "cost: " + _root.infantryCost;
}
on (release) {
if (_root.sheqel >= _root.infantryCost) {
_root.sheqel = _root.sheqel - _root.infantryCost;
_root.game[kocchi].building.motive = "infantry";
_root.game[kocchi].building.build = 0;
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 71 Button
on (rollOver) {
text = "Build Merkava tank";
cost = "cost: " + _root.tankCost;
}
on (release) {
if (_root.sheqel >= _root.tankCost) {
_root.sheqel = _root.sheqel - _root.tankCost;
_root.game[kocchi].building.motive = "tank";
_root.game[kocchi].building.build = 0;
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Symbol 72 Button
on (rollOver) {
text = "Raze building";
cost = "";
}
on (release) {
_root.playSound("buildingCollapse");
_root.game[kocchi].gotoAndStop(4);
this.removeMovieClip();
}
Symbol 81 MovieClip [hospitalHit] Frame 87
_root.bonusHappening = 0;
removeMovieClip(this);
Symbol 87 MovieClip [policeHit] Frame 87
_root.bonusHappening = 0;
removeMovieClip(this);
stop();
Instance of Symbol 89 MovieClip in Symbol 90 MovieClip [airplaneMissile] Frame 1
onClipEvent (load) {
spd = 1;
h = random(70);
}
onClipEvent (enterFrame) {
_parent._y = _parent._y - (spd * Math.cos((Math.PI/180) * _parent._rotation));
_parent._x = _parent._x + (spd * Math.sin((Math.PI/180) * _parent._rotation));
spd = spd + 0.5;
if (_parent._y > ((_root.game.explodeMarker._y + random(70)) - h)) {
_root.playSound("smallExplosionSound");
_root.game.attachMovie("burnt", ("burnt" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_x:_parent._x, _y:(_parent._y + 20) + random(15)});
if ((_root.bonusHappening == 0) && (random(4) == 1)) {
if ((_root.bonusHappened != 1) && (random(5) == 1)) {
_root.bonusHappened = 1;
_root.bonus();
} else if ((_root.bonusHappened2 != 1) && (random(10) == 1)) {
_root.bonusHappened2 = 1;
_root.bonus2();
}
}
_root.game.attachMovie("explosion", ("explosion" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_x:_parent._x, _y:(_parent._y + 20) + random(15)});
_root.casualties = _root.casualties + Number(random(3));
_parent.removeMovieClip();
}
}
Symbol 94 Button
on (rollOver) {
text = "Call for aid";
cost = "cost: " + _root.aidCost;
}
on (release) {
if (_root.aidLimit == 0) {
_root.sheqel = _root.sheqel - _root.aidCost;
_root.aidFunction();
this.removeMovieClip();
} else {
text = "Too soon since last transaction";
}
}
Symbol 98 Button
on (rollOver) {
text = "Increase productivity";
cost = "cost: " + _root.productivityCost;
}
on (release) {
if (_root.sheqel >= _root.productivityCost) {
_root.sheqel = _root.sheqel - _root.productivityCost;
_root.productivityFunction();
this.removeMovieClip();
} else {
cost = _root.insufficientFunds;
}
}
Instance of Symbol 100 MovieClip in Symbol 101 MovieClip [explosionHit] Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 101 MovieClip [explosionHit] Frame 2
removeMovieClip(this);
Symbol 107 MovieClip [burnt] Frame 1
gotoAndStop(random(this._totalframes) + 1);
this.cacheAsBitmap = true;
Symbol 110 MovieClip [darksmoke] Frame 15
this.removeMovieClip();
Instance of Symbol 112 MovieClip in Symbol 113 MovieClip [qassam] Frame 1
onClipEvent (load) {
spd = 9;
c = 0;
ps = 10;
psLimit = 15;
extra = random(28);
}
onClipEvent (enterFrame) {
if ((c > 20) && (_parent._y > ((_root.game.explodeMarker._y + 50) - extra))) {
_root.playSound("smallExplosionSound");
_root.game.attachMovie("explosion", "explosion" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_parent._x, _y:_parent._y + 15});
_root.game.attachMovie("explosionHit", "explosionHit", _root.game.getNextHighestDepth() + 1, {_x:_parent._x, _y:_parent._y + 15});
if (random(7) == 2) {
_root.icasualties = _root.icasualties + random(2);
}
_parent.removeMovieClip();
}
c++;
ps++;
if (c > 20) {
if (ps > psLimit) {
_root.playSound("missilePruttSound");
ps = 0;
psLimit = 18 + random(10);
}
}
if (spd > 4) {
spd = spd + (random(4) - 2);
} else {
spd = spd + 1;
}
if (c < 10) {
_parent._rotation = _parent._rotation - 3;
} else if (c < 40) {
_parent._rotation = _parent._rotation + 5;
} else if (c < 130) {
_parent._rotation = _parent._rotation - 4;
} else {
_parent._rotation = _parent._rotation + 1;
}
if (random(3) == 0) {
_root.game.attachMovie("darksmoke", "darksmoke" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_rotation:_parent._rotation, _x:_parent._x, _y:_parent._y});
}
_parent._y = _parent._y - (spd * Math.cos((Math.PI/180) * _parent._rotation));
_parent._x = _parent._x + (spd * Math.sin((Math.PI/180) * _parent._rotation));
}
Symbol 114 MovieClip [smoke] Frame 19
this.removeMovieClip();
Symbol 119 MovieClip Frame 12
gotoAndPlay (1);
Instance of Symbol 120 MovieClip in Symbol 121 MovieClip [helicopter] Frame 1
onClipEvent (load) {
_parent._y = _parent._y - random(10);
speed = 2 - (random(10) / 10);
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x < -40) {
removeMovieClip(_parent);
} else if ((_parent._x < _root.game.dropMarker._x) && (p != 1)) {
p = 1;
var i = 0;
while (i < 5) {
_root.game.attachMovie("airplaneMissile", ("airplaneMissile" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_y:_parent._y, _x:_parent._x + random(20), _rotation:180 + random(25)});
i++;
}
}
}
Instance of Symbol 123 MovieClip in Symbol 124 MovieClip [airplane] Frame 1
onClipEvent (load) {
_parent._y = _parent._y - random(10);
speed = 6 - random(4);
}
onClipEvent (enterFrame) {
_parent._x = _parent._x - speed;
if (_parent._x < -40) {
removeMovieClip(_parent);
} else if ((_parent._x < _root.game.dropMarker._x) && (p != 1)) {
p = 1;
var i = 0;
while (i < 5) {
_root.game.attachMovie("airplaneMissile", ("airplaneMissile" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_y:_parent._y, _x:_parent._x + random(20), _rotation:180 + random(25)});
i++;
}
}
}
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 3
if (random(9) == 2) {
_root.casualties = _root.casualties + 1;
}
if (random(5) == 2) {
_parent._parent._parent.bar.health = _parent._parent._parent.bar.health - 1;
}
Symbol 140 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 13
if (_parent.death == 1) {
gotoAndPlay (20);
} else {
gotoAndPlay (1);
}
Symbol 140 MovieClip Frame 20
_root.icasualties = _root.icasualties + random(2);
Symbol 140 MovieClip Frame 23
stop();
Instance of Symbol 140 MovieClip in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
_x = (_x + random(20));
}
onClipEvent (enterFrame) {
if ((_parent._parent.death == 1) && (p != 1)) {
gotoAndPlay (20);
p = 1;
}
if (_parent.p == 1) {
gun.play();
} else {
play();
}
}
Instance of Symbol 140 MovieClip in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
_x = (_x + random(20));
gotoAndPlay (7);
}
onClipEvent (enterFrame) {
if ((_parent._parent.death == 1) && (p != 1)) {
gotoAndPlay (20);
p = 1;
}
if (_parent.p == 1) {
gun.play();
} else {
play();
}
}
Instance of Symbol 140 MovieClip in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
_x = (_x + random(20));
gotoAndPlay (4);
}
onClipEvent (enterFrame) {
if ((_parent._parent.death == 1) && (p != 1)) {
gotoAndPlay (20);
p = 1;
}
if (_parent.p == 1) {
gun.play();
} else {
play();
}
}
Instance of Symbol 141 MovieClip in Symbol 147 MovieClip [infantry] Frame 1
onClipEvent (load) {
_parent.swapDepths(_parent._y);
s = random(20) - 10;
}
onClipEvent (enterFrame) {
if (_parent.getInstanceAtDepth(_parent._y + 100) == undefined) {
_parent.swapDepths(_parent._y + 100);
} else {
_parent._y++;
_parent.swapDepths(_parent._y + 100);
}
if ((_parent._x + s) >= _parent._parent.endMarker._x) {
_parent._x = _parent._x - 0.6;
} else if (p != 1) {
_root.playSound("infantryShootingSound", 99);
p = 1;
} else if ((_root.infantryDeath == 1) && (_parent.death != 1)) {
_root.playSound("infantryShootingSound", 99);
_root.infantryDeath = 0;
}
}
Instance of Symbol 146 MovieClip "bar" in Symbol 147 MovieClip [infantry] Frame 1
onClipEvent (load) {
health = _root.infantryHealth;
}
onClipEvent (enterFrame) {
if (_parent.death == 1) {
if (_parent.fu != 1) {
_parent.fu = 1;
_root.stopSound("infantryShootingSound");
_root.infantryDeath = 1;
}
if (_parent._alpha > 4) {
_parent._alpha = _parent._alpha - 2;
} else {
removeMovieClip(_parent);
}
}
if (_root.game.explosionHit.hitTest(_parent)) {
health = health - 60;
}
if (health < 0) {
health = 0;
_parent.death = 1;
}
bar._xscale = (health / _root.infantryHealth) * 100;
}
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 14
_root.playSound("tankShotSound");
if (random(2) == 1) {
_root.casualties = _root.casualties + random(4);
if (_root.bonusHappening == 0) {
if ((_root.bonusHappened != 1) && (random(5) == 1)) {
_root.bonusHappened = 1;
_root.bonus();
} else if ((_root.bonusHappened2 != 1) && (random(16) == 1)) {
_root.bonusHappened2 = 1;
_root.bonus2();
}
}
}
if (random(4) == 2) {
_parent.bar.health = _parent.bar.health - 1;
}
Symbol 155 MovieClip Frame 31
gotoAndPlay (1);
Symbol 155 MovieClip Frame 40
_root.icasualties = _root.icasualties + (3 + random(3));
Symbol 155 MovieClip Frame 42
stop();
Instance of Symbol 155 MovieClip "tank" in Symbol 156 MovieClip [tank] Frame 1
onClipEvent (load) {
_parent.swapDepths(_parent._y);
s = random(50) - 70;
f = random(3);
p = random(2) + 1;
}
onClipEvent (enterFrame) {
if (_parent.getInstanceAtDepth(_parent._y + 100) == undefined) {
_parent.swapDepths(_parent._y + 100);
} else if (_parent.getInstanceAtDepth(_parent._y + 100) != _parent) {
_parent._y++;
_parent.swapDepths(_parent._y + 100);
}
if (_parent.death != 1) {
if ((_parent._x + s) >= _parent._parent.endMarker._x) {
if (f == 2) {
_parent._y = _parent._y - (0.1 * p);
} else if (f == 1) {
_parent._y = _parent._y + (0.03 * p);
}
_parent._x--;
} else {
play();
}
}
}
Instance of Symbol 146 MovieClip "bar" in Symbol 156 MovieClip [tank] Frame 1
onClipEvent (load) {
health = _root.tankHealth;
}
onClipEvent (enterFrame) {
if (_parent.death == 1) {
if (p != 1) {
_parent.tank.gotoAndPlay(40);
p = 1;
}
if (_parent._alpha > 4) {
_parent._alpha = _parent._alpha - 1;
} else {
removeMovieClip(_parent);
}
}
if (_root.game.explosionHit.hitTest(_parent)) {
health = health - 70;
}
if (health < 0) {
health = 0;
_parent.death = 1;
}
bar._xscale = (health / _root.tankHealth) * 100;
}
Symbol 161 MovieClip [explosion] Frame 15
this.removeMovieClip();
Instance of Symbol 89 MovieClip in Symbol 162 MovieClip [missil] Frame 1
onClipEvent (load) {
_root.playSound("missileSound");
spd = 23;
p = 0;
h = random(140) - 50;
}
onClipEvent (enterFrame) {
_root.game.attachMovie("smoke", "smoke" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_rotation:_parent._rotation, _x:_parent._x, _y:_parent._y});
if (dir == "down") {
if (_parent._y > (_root.game.explodeMarker._y + h)) {
_root.game.attachMovie("burnt", ("burnt" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_x:_parent._x, _y:(_parent._y + 20) + random(15)});
_root.playSound("mediumExplosionSound");
_root.game.attachMovie("explosion", ("explosion" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_x:_parent._x, _y:(_parent._y + 20) + random(15)});
_root.casualties = _root.casualties + (1 + Number(random(12)));
if (_root.bonusHappening == 0) {
if ((_root.bonusHappened != 1) && (random(8) == 1)) {
_root.bonusHappened = 1;
_root.bonus();
} else if ((_root.bonusHappened2 != 1) && (random(10) == 1)) {
_root.bonusHappened2 = 1;
_root.bonus2();
} else if ((_root.bonusHappened3 != 1) && (random(2) == 1)) {
_root.bonusHappened3 = 1;
_root.bonus3();
}
}
_parent.removeMovieClip();
} else {
_parent._y = _parent._y - (spd * Math.cos((Math.PI/180) * _parent._rotation));
_parent._x = _parent._x + (spd * Math.sin((Math.PI/180) * _parent._rotation));
}
} else if (_parent._y < -50) {
if (p > 10) {
_parent._x = (_root.game.missilMarker._x - 10) - random(70);
_parent._y = _root.game.missilMarker._y;
_parent._rotation = -170;
spd = 20;
dir = "down";
} else {
p++;
}
} else {
if (_parent._rotation == -90) {
} else {
if (spd > 5) {
spd = spd - 0.4;
}
_parent._rotation = _parent._rotation - (0.1 * spd);
}
if (_parent._rotation > 180) {
_parent._y = _parent._y + (spd * Math.cos((Math.PI/180) * _parent._rotation));
_parent._x = _parent._x - (spd * Math.sin((Math.PI/180) * _parent._rotation));
} else {
_parent._y = _parent._y - (spd * Math.cos((Math.PI/180) * _parent._rotation));
_parent._x = _parent._x + (spd * Math.sin((Math.PI/180) * _parent._rotation));
}
}
}
Symbol 178 Button
on (release) {
if (bar._alpha == 100) {
_root.game.attachMovie("cancel", "cancel", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
} else {
_root.game.attachMovie("hqButton", "hqButton", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
}
}
Instance of Symbol 175 MovieClip "bar" in Symbol 179 MovieClip [hq] Frame 1
onClipEvent (load) {
_alpha = 0;
bar._xscale = 0;
build = 0;
}
onClipEvent (enterFrame) {
}
Symbol 186 Button
on (release) {
if (bar._alpha == 100) {
_root.game.attachMovie("cancel", "cancel", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
} else {
_root.game.attachMovie("missileButton", "missileButton", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
}
}
Instance of Symbol 175 MovieClip "bar" in Symbol 187 MovieClip [missile] Frame 1
onClipEvent (load) {
bar._xscale = 0;
build = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_parent.motive == "missil") {
_alpha = 100;
bar._xscale = (build / _root.missilTime) * 100;
if (build <= _root.missilTime) {
build = build + _root.productionSpeed;
} else {
_root.game.attachMovie("missil", "missil" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_parent._parent._x, _y:_parent._parent._y});
_alpha = 0;
build = 0;
_parent.motive = undefined;
}
} else if (_parent.motive == "airplane") {
_alpha = 100;
bar._xscale = (build / _root.airplaneTime) * 100;
if (build <= _root.airplaneTime) {
build = build + _root.productionSpeed;
} else {
_root.game.attachMovie("airplane", ("airplane" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_x:_root.game.airMarker._x, _y:_root.game.airMarker._y});
_alpha = 0;
build = 0;
_parent.motive = undefined;
}
}
}
Symbol 189 Button
on (release) {
if (bar._alpha == 100) {
_root.game.attachMovie("cancel", "cancel", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
} else {
_root.game.attachMovie("barracksButton", "barracksButton", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
}
}
Instance of Symbol 175 MovieClip "bar" in Symbol 190 MovieClip [barracks] Frame 1
onClipEvent (load) {
bar._xscale = 0;
build = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_parent.motive == "tank") {
_alpha = 100;
bar._xscale = (build / _root.tankTime) * 100;
if (build <= _root.tankTime) {
build = build + _root.productionSpeed;
} else {
_root.game.troops.attachMovie("tank", "tank" + _root.game.troops.getNextHighestDepth(), _root.game.troops.getNextHighestDepth(), {_x:_root.game.troops.troopMarker._x, _y:(_root.game.troops.troopMarker._y - 15) + random(30)});
_alpha = 0;
build = 0;
_parent.motive = undefined;
}
} else if (_parent.motive == "infantry") {
_alpha = 100;
bar._xscale = (build / _root.infantryTime) * 100;
if (build <= _root.infantryTime) {
build = build + _root.productionSpeed;
} else {
_root.game.troops.attachMovie("infantry", "infantry" + _root.game.troops.getNextHighestDepth(), _root.game.troops.getNextHighestDepth(), {_x:_root.game.troops.troopMarker._x, _y:(_root.game.troops.troopMarker._y - 15) + random(30)});
_alpha = 0;
build = 0;
_parent.motive = undefined;
}
}
}
Symbol 197 Button
on (release) {
if (bar._alpha == 100) {
_root.game.attachMovie("cancel", "cancel", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
} else {
_root.game.attachMovie("airportButton", "airportButton", 9999, {_x:_parent._x, _y:_parent._y, kocchi:_parent.kocchi});
}
}
Instance of Symbol 175 MovieClip "bar" in Symbol 198 MovieClip [airport] Frame 1
onClipEvent (load) {
bar._xscale = 0;
build = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_parent.motive == "helicopter") {
_alpha = 100;
bar._xscale = (build / _root.helicopterTime) * 100;
if (build <= _root.helicopterTime) {
build = build + _root.productionSpeed;
} else {
_root.game.attachMovie("helicopter", "helicopter" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_root.game.airMarker._x, _y:_root.game.airMarker._y});
_alpha = 0;
build = 0;
_parent.motive = undefined;
}
} else if (_parent.motive == "airplane") {
_alpha = 100;
bar._xscale = (build / _root.airplaneTime) * 100;
if (build <= _root.airplaneTime) {
build = build + _root.productionSpeed;
} else {
_root.game.attachMovie("airplane", ("airplane" + _root.game.getNextHighestDepth()) + 1, _root.game.getNextHighestDepth() + 1, {_x:_root.game.airMarker._x, _y:_root.game.airMarker._y});
_alpha = 0;
build = 0;
_parent.motive = undefined;
}
}
}
Symbol 237 Button
on (release) {
getURL (_root.theURL, "_blank");
}
Symbol 246 Button
on (release) {
startMovie();
}
Symbol 248 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * _local4;
if (_local4 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
} else {
gotoAndStop ("loaded");
}
return(undefined);
}
}
dt = getTimer() - time;
time = time + dt;
frameAccum = frameAccum + dt;
var _local3 = 0;
while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) {
advanceFrame(tankLogo, true, true);
advanceFrame(loadingText, false, true);
advanceFrame(barGfx, false, true);
if (loadingComplete) {
advanceFrame(this, false, false);
}
(frameAccum = frameAccum - FRAME_TIME);
_local3++;
}
updateAfterEvent();
}
function advanceFrame(clip, recurse, loop) {
if (!clip) {
return(undefined);
}
clip.stop();
if (clip._currentframe == clip._totalframes) {
if (loop) {
clip.gotoAndStop(1);
}
} else {
clip.nextFrame();
}
if (recurse) {
for (childName in clip) {
if (typeof(clip[childName]) == "movieclip") {
advanceFrame(clip[childName], recurse, loop);
}
}
}
}
function startMovie() {
clearInterval(intervalId);
_root.play();
}
_root.stop();
stop();
var FRAME_TIME = 33.3333333333333;
var AUTO_PLAY = false;
var MAX_FRAME_SKIP = 5;
var loadingComplete;
var intervalId;
var time;
var frameAccum;
loadingComplete = false;
intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2);
frameAccum = 0;
time = getTimer();
timerHandler();
Symbol 248 MovieClip Frame 2
stop();
Symbol 428 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.43");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
if (_root.mochiad_options) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 429 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.MochiServices.clip;
}
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 430 MovieClip [__Packages.mochi.MochiDigits] Frame 0
class mochi.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 259 Button
on (release) {
getURL ("http://www.haaretz.com/hasen/pages/ShArt.jhtml?itemNo=360533&contrassID=2&subContrassID=1&sbSubContrassID=0&listSrc=Y", "_blank");
}
Symbol 266 MovieClip Frame 2
Symbol 266 MovieClip Frame 30
stop();
Symbol 266 MovieClip Frame 72
_root.play();
Symbol 287 MovieClip Frame 1
stop();
Instance of Symbol 315 MovieClip "moln" in Symbol 316 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
}
Instance of Symbol 315 MovieClip "moln" in Symbol 316 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
}
Symbol 322 Button
on (release) {
menuSong.stop("menuSong");
play();
}
Symbol 326 Button
on (release) {
getURL (_root.theURL, "_blank");
}
Symbol 328 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/173518", "_blank");
}
Symbol 329 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/49078", "_blank");
}
Symbol 333 Button
on (release) {
_root.soundIs = "off";
_root.setVolume(0);
nextFrame();
}
Symbol 334 Button
on (release) {
_root.soundIs = "on";
_root.setVolume(100);
prevFrame();
}
Symbol 336 MovieClip Frame 1
if (_root.soundIs == "off") {
nextFrame();
} else {
stop();
}
Symbol 340 Button
on (press) {
removeMovieClip(_root.game.getInstanceAtDepth(9999));
}
Symbol 343 Button
on (release) {
_root.game.attachMovie("build", "build", 9999, {_x:_x, _y:_y, kocchi:kocchi});
}
Symbol 352 MovieClip Frame 20
stop();
Symbol 353 MovieClip Frame 9
stop();
Symbol 358 MovieClip Frame 4
if (_parent.what == "hq") {
_parent.attachMovie("hq", "building", 1, {_x:0, _y:0});
} else if (_parent.what == "airport") {
_parent.attachMovie("airport", "building", 1, {_x:0, _y:0});
} else if (_parent.what == "barracks") {
_parent.attachMovie("barracks", "building", 1, {_x:0, _y:0});
} else if (_parent.what == "missile") {
_parent.attachMovie("missile", "building", 1, {_x:0, _y:0});
}
Symbol 358 MovieClip Frame 8
stop();
p = 1;
Symbol 359 MovieClip Frame 1
stop();
Symbol 359 MovieClip Frame 2
_root.playSound("buildCity");
Instance of Symbol 175 MovieClip in Symbol 359 MovieClip Frame 2
onClipEvent (load) {
bar._xscale = 0;
build = 0;
}
onClipEvent (enterFrame) {
if (_parent.what == "hq") {
bar._xscale = (build / _root.hqTime) * 100;
if (build <= _root.hqTime) {
build = build + _root.productionSpeed;
} else {
_parent.nextFrame();
}
} else if (_parent.what == "airport") {
bar._xscale = (build / _root.airportTime) * 100;
if (build <= _root.airportTime) {
build = build + _root.productionSpeed;
} else {
_parent.nextFrame();
}
} else if (_parent.what == "barracks") {
bar._xscale = (build / _root.barracksTime) * 100;
if (build <= _root.barracksTime) {
build = build + _root.productionSpeed;
} else {
_parent.nextFrame();
}
} else if (_parent.what == "missile") {
bar._xscale = (build / _root.missileTime) * 100;
if (build <= _root.missileTime) {
build = build + _root.productionSpeed;
} else {
_parent.nextFrame();
}
}
}
Symbol 359 MovieClip Frame 4
removeMovieClip("building");
gotoAndStop (1);
Instance of Symbol 361 MovieClip "troopMarker" in Symbol 362 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 361 MovieClip "endMarker" in Symbol 362 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 315 MovieClip "moln" in Symbol 363 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x > 840) {
_x = -100;
}
}
Instance of Symbol 315 MovieClip "moln" in Symbol 363 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x > 840) {
_x = -100;
}
}
Instance of Symbol 315 MovieClip "moln" in Symbol 363 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x > 840) {
_x = -100;
}
}
Instance of Symbol 315 MovieClip "moln" in Symbol 363 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x + 0.5);
if (_x > 840) {
_x = -100;
}
}
Instance of Symbol 359 MovieClip "north" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
kocchi = "north";
}
Instance of Symbol 359 MovieClip "west" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
kocchi = "west";
}
Instance of Symbol 359 MovieClip "east" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
kocchi = "east";
}
Instance of Symbol 359 MovieClip "south" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
kocchi = "south";
}
Instance of Symbol 361 MovieClip "airMarker" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 361 MovieClip "dropMarker" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 361 MovieClip "missilMarker" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 361 MovieClip "explodeMarker" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 384 Button
on (press) {
gotoAndStop (2);
}
Symbol 390 Button
on (release) {
nextFrame();
}
Symbol 392 MovieClip Frame 20
_parent.nextFrame();
stop();
Symbol 397 MovieClip Frame 16
stop();
Symbol 399 Button
on (release) {
_root.pcpuStart = 1;
nextFrame();
}
Symbol 404 MovieClip Frame 48
stop();
Symbol 420 Button
on (press) {
_root.submitScore(ratio);
nextFrame();
}
Symbol 423 Button
on (press) {
_root.stopAllSounds();
_root.gotoAndStop(2);
}
Symbol 424 MovieClip Frame 1
stop();
Symbol 424 MovieClip Frame 6
_root.playSound("barLoop", 99);
_root.fadeIn("barLoop", 32);
Instance of Symbol 389 MovieClip in Symbol 424 MovieClip Frame 7
onClipEvent (enterFrame) {
if (h == undefined) {
h = 0;
}
h++;
if (h > 80) {
_parent.nextFrame();
}
}
Symbol 424 MovieClip Frame 12
realRatio = _root.casualties / _root.icasualties;
ratio = int(realRatio * 10) / 10;
_root.ratio = ratio;
if (ratio < 1) {
ab = "You... you are a disgrace to the nation of Israel.";
} else if (ratio < 15) {
ab = "Commander, this is an abysmal result!";
} else if (ratio < 24) {
ab = "Commander, I expected more from you.";
} else if ((ratio >= 24) && (ratio <= 26)) {
_root.playSound("cheers1");
ab = "Well done commander, and quite realistic too!";
} else if (ratio < 35) {
_root.playSound("cheers1");
ab = "Good job commander! That's even better than our 2007 record!";
} else if (ratio < 50) {
_root.playSound("cheers2");
ab = "Commander, you've outdone yourself! This is a wonderful result!";
} else if (ratio < 65) {
_root.playSound("cheers3");
ab = "Incredible, commander! All Israelis are forever indebted to you!";
} else if (ratio < 80) {
_root.playSound("cheers3");
ab = "Commander, nobody had even imagined a result like this could be accomplished! Excellent!";
} else if (ratio >= 80) {
_root.playSound("cheers2");
_root.playSound("fanfare");
ab = "This... this is beyond incredible... Are you the messiah?";
} else if (ratio >= 400) {
_root.playSound("cheers2");
_root.playSound("fanfare");
ab = "J... Jahve?!";
}
message.text = String((("That's " + ratio) + " Palestinians killed for every Israeli casualty! ") + ab);