Frame 1
MochiAd.showPreloaderAd({id:"2a00edbe25f062c3", res:"600x400"});
_root._quality = "MEDIUM";
Stage.showMenu = false;
Frame 2
_root.transitionExplode = function () {
var _local2 = _root.attachMovie("explosion2", "EXPLOSIONTRANSITION", _root.getNextHighestDepth());
_local2.removeThis = true;
_local2._x = 100;
_local2._y = 200;
_local2._xscale = (_local2._yscale = 1200);
_root.playSound("buildingdeath2", 50, 0, 0);
};
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__("8c541457", this, 10301, true);
var PATH = "http://www.blitzgamer.com/blitz_HighScores/";
var GAMENAME = "citysmasher";
var SCORESPATH = (("http://www.blitzgamer.com/" + GAMENAME) + "_highscores.php");
if (!_root.soundSetup) {
_root.createEmptyMovieClip("Music", 9998);
_root.soundCount = 0;
_root.createSound = function (id) {
_root.Music.createEmptyMovieClip(id, _root.soundCount);
_root.Music[id + "Sound"] = new Sound(_root.Music[id]);
_root.Music[id + "Sound"].attachSound(id);
_root.soundCount++;
};
_root.stopSound = function (nam) {
_root.Music[nam + "Sound"].stop();
};
_root.playSound = function (nam, vol, loop, pan) {
if (loop == 0) {
loop = 0;
} else {
loop = 9999999 /* 0x98967F */;
}
if (pan != undefined) {
_root.Music[nam + "Sound"].setPan(pan);
}
_root.Music[nam + "Sound"].setVolume(vol);
_root.Music[nam + "Sound"].start(0, loop);
};
_root.createGroupSounds = function (commonPrefix, endings) {
var _local2 = 0;
while (_local2 < endings.length) {
_root.createSound(commonPrefix + endings[_local2]);
_local2++;
}
};
_root.switchSound = function (second, speed, loops) {
var firstSong = _root.currentSong;
if (firstSong == second) {
_root.Music.switched = true;
} else {
_root.Music.switched = false;
}
_root.Music.onEnterFrame = function () {
if (!_root.Music.switched) {
if (_root.Music[firstSong + "Sound"].getVolume() > 0) {
_root.Music[firstSong + "Sound"].setVolume(_root.Music[firstSong + "Sound"].getVolume() - speed);
} else {
_root.Music.switched = true;
_root.Music[firstSong + "Sound"].stop(firstSong);
if (loops == undefined) {
_root.playSound(second, 0, 999);
} else {
_root.playSound(second, 0, loops);
}
_root.currentSong = second;
}
} else if (_root.Music[second + "Sound"].getVolume() < 50) {
_root.Music[second + "Sound"].setVolume(_root.Music[second + "Sound"].getVolume() + (speed / 2));
} else {
delete _root.Music.onEnterFrame;
}
};
};
_root.createGroupSounds("persondeath", [1, 2, 3, 4, 5, 6, 7, 8]);
_root.createGroupSounds("cardeath", [1, 2, 3]);
_root.createGroupSounds("buildingdeath", [1, 2]);
_root.createGroupSounds("fly", [1, 2, 3, 4, 5, 6, 7, 8, 9]);
_root.createGroupSounds("firedeath", [1, 2, 3, 4, 5, 6, 7, 8, 9]);
_root.createGroupSounds("swish", [1, 2, 3, 4]);
_root.createSound("addtime");
_root.createSound("lowtime");
_root.createSound("Song1");
_root.createSound("Song2");
_root.createSound("Song3");
_root.soundSetup = true;
}
stop();
_root.pub.clearScreen();
Frame 3
_root.switchSound("Song2", 5);
_root.objectiveMode = false;
stop();
_root.pub.clearScreen();
Frame 6
_root.pub.clearScreen();
_root.stop();
_root.screenCapOrig.removeMovieClip();
_root.screenCapDisp.removeMovieClip();
var STAGE_WIDTH = 600;
var STAGE_HEIGHT = 400;
var pub = new publicfunctions();
var sky = new sky(0);
var ground = new groundClass(1, 2);
var BG_rubble = new rubble(2);
var groundPeople = new person("MC_Ground", [1, 1, 1, 1, 2, 2, 2, 2, 3], 100, 4);
var airPeople = new person("MC_Air", [0, 0, 0, 0, 0, 4], 5, 5);
var hero = new heroClass(310, 99);
var FG_rubble = new rubble(100);
onEnterFrame = function () {
_root.pub.update(hero);
groundPeople.generatePerson(310, 25, 100, 25, 1, 2);
airPeople.generatePerson(100, 25, 100, 25, 1, 2);
if ((!hero.attacking) and (!hero.clip.jumping)) {
hero.pos = 1;
}
};
_root.attachMovie("IntroMC", "introMC", _root.getNextHighestDepth());
introMC._x = 300;
introMC._y = -25;
Frame 7
ground.destroyAll();
_root.introMC.removeMovieClip();
_root.stop();
_root.screenCapOrig.removeMovieClip();
_root.screenCapDisp.removeMovieClip();
var STAGE_WIDTH = 600;
var STAGE_HEIGHT = 400;
var scoreBoard = new scoreboard(999);
var objectives = new objective(998);
if (!_root.objectiveMode) {
var pub = new publicfunctions();
var sky = new sky(0);
var ground = new groundClass(1, 2);
var BG_rubble = new rubble(2);
var groundPeople = new person("MC_Ground", [1, 1, 1, 1, 2, 2, 2, 2, 3], 100, 4);
var airPeople = new person("MC_Air", [0, 0, 0, 0, 0, 4], 5, 5);
var hero = new heroClass(310, 99);
var FG_rubble = new rubble(100);
_root.attachMovie("backMenuMC", "backMenu", _root.getNextHighestDepth());
_root.backMenu._x = 368;
_root.backMenu._y = 353;
_root.backMenu.button.onRelease = function () {
_root.gotoAndStop("titleScreen");
_root.transitionExplode();
this._parent.removeMovieClip();
};
}
onEnterFrame = function () {
if ((!hero.attacking) and (!hero.clip.jumping)) {
hero.pos = 1;
}
if (Key.isDown(39)) {
pub.movement(hero, 1);
}
if (Key.isDown(37)) {
pub.movement(hero, -1);
}
if (Key.isDown(65)) {
if (Key.isDown(38)) {
pub.attack(_root.hero, 5);
} else {
pub.attack(_root.hero, 4);
}
}
if (Key.isDown(83)) {
if (Key.isDown(40)) {
pub.attack(_root.hero, 6);
} else {
pub.attack(_root.hero, 3);
}
}
if (Key.isDown(32)) {
hero.jump();
}
_root.pub.update(hero);
groundPeople.generatePerson(310, 25, 100, 25, 1, 2);
airPeople.generatePerson(100, 25, 100, 25, 1, 2);
};
Frame 8
this.createEmptyMovieClip("highSender", this.getNextHighestDepth());
yourScore.submit.onRelease = function () {
highSender.playerName = yourScore.nameText;
highSender.score = _root.scoreBoard.score;
highSender.gamename = GAMENAME;
highSender.loadVariables(PATH + "new_score.php", "POST");
getURL (SCORESPATH, "_blank");
this._visible = false;
};
highScores.onRelease = function () {
getURL (SCORESPATH, "_blank");
};
_root.switchSound("Song3", 10, 0);
Symbol 39 MovieClip [Load_Loading] Frame 1
_xscale = 120;
_yscale = _xscale;
x = _x;
y = _y;
onEnterFrame = function () {
_x = x;
_y = y;
_x = (_x + (random(2) - 0.5));
_y = (_y + (random(2) - 0.5));
if (this.top) {
this._alpha = this._alpha - 2;
}
if (!this.top) {
this._alpha = this._alpha + 2;
}
if (this._alpha >= 100) {
this.top = true;
}
if (this._alpha <= 0) {
this.top = false;
}
};
Symbol 60 MovieClip [objective_popup] Frame 32
stop();
obMC.gotoAndStop(obj);
Symbol 79 MovieClip [building5] Frame 6
lastframe = true;
Symbol 84 MovieClip [building3] Frame 3
lastframe = true;
Symbol 89 MovieClip [building1] Frame 3
lastframe = true;
Symbol 94 MovieClip [building2] Frame 3
lastframe = true;
Symbol 98 MovieClip [building4] Frame 2
lastframe = true;
Symbol 107 MovieClip [sky] Frame 1
stop();
Symbol 137 MovieClip Frame 16
_root.pub.shake(15);
Symbol 137 MovieClip Frame 33
_root.pub.shake(15);
Symbol 147 MovieClip Frame 7
_root.playSound("swish" + (random(4) + 1), random(15) + 25, 0, 0);
Symbol 147 MovieClip Frame 10
_root.pub.attackTest(_root.hero);
_root.pub.shake(50);
Symbol 147 MovieClip Frame 17
_root.hero.stopAttack();
Symbol 157 MovieClip Frame 5
_root.playSound("swish" + (random(4) + 1), random(15) + 25, 0, 0);
Symbol 157 MovieClip Frame 8
_root.pub.attackTest(_root.hero);
Symbol 157 MovieClip Frame 16
_root.hero.stopAttack();
Symbol 168 MovieClip Frame 10
_root.playSound("swish" + (random(4) + 1), random(15) + 25, 0, 0);
Symbol 168 MovieClip Frame 11
_root.pub.attackTest(_root.hero);
Symbol 168 MovieClip Frame 19
_root.hero.stopAttack();
Symbol 182 MovieClip Frame 14
_root.playSound("swish" + (random(4) + 1), random(15) + 25, 0, 0);
Symbol 182 MovieClip Frame 18
_root.pub.attackTest(_root.hero);
Symbol 182 MovieClip Frame 31
_root.hero.stopAttack();
Symbol 217 MovieClip [explosion2] Frame 1
Symbol 217 MovieClip [explosion2] Frame 56
if (this.end) {
_parent.removeMovieClip();
}
if (this.removeThis) {
this.removeMovieClip();
}
Symbol 250 MovieClip [explosion1] Frame 56
this.removeMovieClip();
Symbol 287 Button
on (release) {
_root.gotoAndStop("gameFrame");
}
Symbol 301 MovieClip [IntroMC] Frame 1
introMC = this;
watcher = new Object();
Mouse.removeListener(watcher);
Mouse.addListener(watcher);
watcher.onMouseDown = function () {
play();
};
Symbol 301 MovieClip [IntroMC] Frame 80
onEnterFrame = function () {
_root.pub.movement(_root.hero, 1);
};
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 80
//component parameters
onClipEvent (construct) {
keyText = ">";
}
Symbol 301 MovieClip [IntroMC] Frame 120
delete onEnterFrame;
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 120
//component parameters
onClipEvent (construct) {
keyText = "";
}
Symbol 301 MovieClip [IntroMC] Frame 160
onEnterFrame = function () {
_root.pub.movement(_root.hero, -1);
};
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 160
//component parameters
onClipEvent (construct) {
keyText = "<";
}
Symbol 301 MovieClip [IntroMC] Frame 200
stop();
delete onEnterFrame;
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 200
//component parameters
onClipEvent (construct) {
keyText = "";
}
Symbol 301 MovieClip [IntroMC] Frame 210
_root.pub.attack(_root.hero, 4);
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 210
//component parameters
onClipEvent (construct) {
keyText = "A";
}
Symbol 301 MovieClip [IntroMC] Frame 230
_root.pub.attack(_root.hero, 4);
Symbol 301 MovieClip [IntroMC] Frame 250
_root.pub.attack(_root.hero, 4);
Symbol 301 MovieClip [IntroMC] Frame 270
stop();
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 271
//component parameters
onClipEvent (construct) {
keyText = "";
}
Symbol 301 MovieClip [IntroMC] Frame 320
onEnterFrame = function () {
_root.pub.movement(_root.hero, 1);
};
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 320
//component parameters
onClipEvent (construct) {
keyText = ">";
}
Symbol 301 MovieClip [IntroMC] Frame 335
delete onEnterFrame;
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 335
//component parameters
onClipEvent (construct) {
keyText = "";
}
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 370
//component parameters
onClipEvent (construct) {
keyText = "A";
}
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 370
//component parameters
onClipEvent (construct) {
keyText = "^";
}
Symbol 301 MovieClip [IntroMC] Frame 380
_root.pub.attack(_root.hero, 5);
Symbol 301 MovieClip [IntroMC] Frame 400
_root.pub.attack(_root.hero, 5);
Symbol 301 MovieClip [IntroMC] Frame 420
_root.pub.attack(_root.hero, 5);
Symbol 301 MovieClip [IntroMC] Frame 450
stop();
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 451
//component parameters
onClipEvent (construct) {
keyText = "";
}
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 451
//component parameters
onClipEvent (construct) {
keyText = "";
}
Symbol 301 MovieClip [IntroMC] Frame 470
_root.pub.attack(_root.hero, 3);
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 470
//component parameters
onClipEvent (construct) {
keyText = "S";
}
Symbol 301 MovieClip [IntroMC] Frame 510
stop();
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 511
//component parameters
onClipEvent (construct) {
keyText = "";
}
Symbol 301 MovieClip [IntroMC] Frame 570
onEnterFrame = function () {
_root.pub.movement(_root.hero, -1);
};
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 570
//component parameters
onClipEvent (construct) {
keyText = "<";
}
Symbol 301 MovieClip [IntroMC] Frame 580
delete onEnterFrame;
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 580
//component parameters
onClipEvent (construct) {
keyText = "";
}
Symbol 301 MovieClip [IntroMC] Frame 610
_root.pub.attack(_root.hero, 6);
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 610
//component parameters
onClipEvent (construct) {
keyText = "S";
}
Instance of Symbol 293 MovieClip in Symbol 301 MovieClip [IntroMC] Frame 610
//component parameters
onClipEvent (construct) {
keyText = "V";
}
Symbol 301 MovieClip [IntroMC] Frame 650
stop();
Symbol 301 MovieClip [IntroMC] Frame 720
_root.gotoAndStop("gameFrame");
Symbol 403 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 404 MovieClip [__Packages.rubble] Frame 0
class rubble
{
var target;
function rubble (depth) {
target = _root.createEmptyMovieClip("Rubble_MC", depth);
target.ct = 0;
}
function rocks(x, y) {
var _local3 = target.attachMovie("rubble", "mc" + target.ct, target.ct);
_local3._yscale = (_local3._xscale = random(25) + 25);
_local3.ylimit = 300 - random(20);
_local3.gotoAndStop(random(6) + 1);
_local3._x = x;
_local3._y = y;
_local3.xspeed = 0;
_local3.timer = 0;
while (_local3.xspeed == 0) {
_local3.xspeed = random(10) - 5;
}
_local3.yspeed = (random(100) + 10) / 5;
_local3.onEnterFrame = function () {
_root.pub.testPlanes(this);
this._x = this._x + this.xspeed;
this._y = this._y - this.yspeed;
this.yspeed--;
this._rotation = this._rotation + (this.xspeed * 5);
if (this._y >= this.ylimit) {
this.timestart = true;
this._y = this.ylimit;
this.xspeed = this.xspeed * 0.9;
if (this.xspeed < 0.25) {
this.xspeed = 0;
}
this.yspeed = 0;
}
if (this.timestart) {
this.timer++;
if (this.timer > 200) {
this._alpha = this._alpha - 2;
if (this._alpha < 0) {
this.removeMovieClip();
}
}
}
if ((this._x < -25) or (this._x > 575)) {
this.removeMovieClip();
}
};
target.ct++;
if (target.ct >= 100) {
target.ct = 0;
}
}
function explosion(type, x, y, scale) {
var _local2 = target.attachMovie("Explosion" + type, "mc" + ct, ct);
_local2._x = x;
_local2._y = y;
_local2._xscale = (_local2._yscale = scale);
ct++;
if (ct >= 100) {
ct = 0;
}
}
var ct = 0;
}
Symbol 405 MovieClip [__Packages.publicfunctions] Frame 0
class publicfunctions
{
var shaker, clip, minD, maxD;
function publicfunctions () {
shaker = _root.createEmptyMovieClip("MC_shaker", 997);
shaker.shakeD = 0;
}
function update(ob, p) {
clip = ob.clip;
if ((p != undefined) and (!ob.attacking)) {
ob.pos = p;
}
clip.gotoAndStop(ob.pos);
}
function drawScreen() {
_root.createEmptyMovieClip("screenCapOrig", 1000);
var screenCap = _root.screenCapOrig.createEmptyMovieClip("mc", 0);
screenCap.myBitmap = new flash.display.BitmapData(600, 400, true, 16711680);
screenCap.myBitmap.draw(_root);
screenCap.attachBitmap(screenCap.myBitmap, 0);
screenCap.ct = -0.5;
screenCap.angle = 0;
screenCap.onEnterFrame = function () {
this.angle = this.angle + ((random(10) + 1) / 10);
this._x = Math.cos(this.angle / Math.PI) * 3;
this._y = this._y + this.ct;
this.ct = this.ct + 0.05;
};
var screenCap = _root.createEmptyMovieClip("screenCapDisp", 1001);
screenCap.myBitmap = new flash.display.BitmapData(600, 400, true, 16711680);
screenCap.ct = 0.5;
screenCap.onEnterFrame = function () {
screenCap.myBitmap.draw(_root.screenCapOrig);
this.filter = new flash.filters.BlurFilter(this.ct, this.ct, 1);
if (this.ct < 4) {
this.ct = this.ct * 1.025;
}
this.myBitmap.applyFilter(screenCap.myBitmap, screenCap.myBitmap.rectangle, [0, 0], this.filter);
this.attachBitmap(screenCap.myBitmap, 0);
};
}
function clearScreen() {
_root.objectiveText.removeMovieClip();
_root.introMC.removeMovieClip();
_root.MC_Sky.removeMovieClip();
_root.MC_objective.removeMovieClip();
_root.MC_Scoreboard.removeMovieClip();
_root.Rubble_MC.removeMovieClip();
_root.MC_Air.removeMovieClip();
_root.MC_Ground.removeMovieClip();
_root.MC_Hero.removeMovieClip();
_root.MC_grass.removeMovieClip();
_root.MC_Shaker.removeMovieClip();
delete _root.onEnterFrame;
delete _root.sky;
delete _root.ground;
delete _root.BG_rubble;
delete _root.groundPeople;
delete _root.airPeople;
delete _root.hero;
delete _root.FG_rubble;
}
function gameOver() {
_root.MC_Sky._visible = false;
_root.MC_objective.removeMovieClip();
_root.MC_Scoreboard.removeMovieClip();
drawScreen();
_root.MC_Sky._visible = true;
_root.MC_Sky.ct = 0.01;
_root.MC_Sky.onEnterFrame = function () {
this._alpha = this._alpha - this.ct;
this.ct = this.ct + 0.01;
if (this._alpha < 0) {
this.removeMovieClip();
}
};
_root.gotoAndStop("gameOver");
_root.Rubble_MC.removeMovieClip();
_root.MC_Air.removeMovieClip();
_root.MC_Ground.removeMovieClip();
_root.MC_Hero.removeMovieClip();
_root.MC_grass.removeMovieClip();
_root.MC_Shaker.removeMovieClip();
delete _root.onEnterFrame;
delete _root.sky;
delete _root.ground;
delete _root.BG_rubble;
delete _root.groundPeople;
delete _root.airPeople;
delete _root.hero;
delete _root.FG_rubble;
}
function shake(dist) {
shaker.shakeD = shaker.shakeD + dist;
if (shaker.shakeD > 150) {
shaker.shakeD = 150;
}
shaker.onEnterFrame = function () {
_root._x = random(this.shakeD) - (this.shakeD / 2);
_root._y = random(this.shakeD) - (this.shakeD / 2);
this.shakeD = this.shakeD * 0.8;
if (this.shakeD < 1) {
_root._x = 0;
_root._y = 0;
delete this.onEnterFrame;
}
};
}
function sound(soundclip, sourceX, hearingX, soundMax) {
var _local4 = dist(hearingX, sourceX);
var _local3 = soundMax - (Math.round(_local4) / 4);
if (_local3 < 2) {
_local3 = 2;
} else if (_local3 > soundMax) {
_local3 = soundMax;
}
_root.playSound(soundclip, _local3, 0, (-_local4) / 2);
}
function fire(ob) {
sound("firedeath" + (random(15) + 1), ob._x, _root.MC_Hero._x, 100);
if ((!ob.dead) and (!ob.onFire)) {
ob.onFire = true;
var _local4 = ob.attachMovie("fire", "fire", 0);
_local4._yscale = (_local4._xscale = 25);
_local4._y = -5;
_local4.onEnterFrame = function () {
this._rotation = -this._parent._rotation;
};
var dir = random(2);
if (dir == 1) {
ob.dir = 1;
} else {
ob.dir = -1;
}
ob.timer = 0;
ob.ct = 0;
ob.xspeed = (random(100) + 10) / 25;
ob.onEnterFrame = function () {
this._xscale = this.myscale * this.dir;
this._x = this._x + (this.xspeed * this.dir);
this.timer = this.timer + random(3);
if (this.timer > 15) {
this.timer = 0;
this.dir = this.dir * -1;
this.ct++;
if (this.ct > (random(5) + 3)) {
_root.pub.fling(this, 0, 1);
}
}
};
}
}
function fling(ob, xspeed, yspeed) {
if (!ob.dead) {
if ((ob.myType == "person1") or (ob.myType == "person2")) {
sound("fly" + (random(15) + 1), ob._x, _root.MC_Hero._x, 100);
}
delete ob.onEnterFrame;
ob.dead = true;
ob.xspeed = xspeed;
ob.yspeed = yspeed;
ob.grav = (random(100) / 200) + 0.1;
ob.rotSpeed = xspeed * yspeed;
ob.scoreFrame = random(8) + 1;
ob.anim.stop();
ob.deathcounter = 0;
ob.onEnterFrame = function () {
this._rotation = this._rotation + this.rotSpeed;
this._x = this._x + this.xspeed;
this._y = this._y - this.yspeed;
this.yspeed = this.yspeed - this.grav;
_root.pub.testPlanes(this);
if (this.myType == "plane") {
_root.pub.testBuilding(this);
}
if (this._y > ob.y) {
this._y = ob.y;
this.deathcounter++;
if (this.deathcounter > (random(25) + 25)) {
_root.pub.die(this, true);
}
}
};
}
}
function testBuilding(ob) {
var _local4 = 0;
while (_local4 < 20) {
var _local3 = _root.ground.target["g" + _local4].building;
if ((_local3.hitTest(ob._x, ob._y, true) or _local3.hitTest(ob._x - 10, ob._y, true)) or _local3.hitTest(ob._x + 10, ob._y, true)) {
_root.pub.damage(_local3);
_root.pub.die(ob, true);
}
_local4++;
}
}
function testPlanes(ob) {
var _local3 = 0;
while (_local3 < 5) {
var _local2 = _root.airPeople.target["mc" + _local3];
if (_local2.hitTest(ob._x, ob._y, true) and (ob.myType != "plane")) {
_root.pub.fling(_local2, _local2.xspeed, random(3) + 1);
}
_local3++;
}
}
function die(ob) {
_root.scoreBoard.update(random(15) + 1);
_root.objectives.update(ob.myObNum);
if ((ob.myType == "person1") or (ob.myType == "person2")) {
sound("persondeath" + (random(12) + 1), ob._x, _root.MC_Hero._x, 50);
} else if ((ob.myType == "car") or (ob.myType == "plane")) {
sound("cardeath" + (random(3) + 1), ob._x, _root.MC_Hero._x, 75);
}
ob._rotation = Math.round(ob._rotation / 180) * 180;
if ((ob.myType == "car") or (ob.myType == "plane")) {
ob._rotation = 0;
ob.attachMovie("explosion2", "explo", 100);
ob.anim._visible = false;
ob.explo._xscale = 20 + random(10);
if (ob.myType == "plane") {
ob.explo._xscale = 50 + random(50);
}
ob.explo._yscale = ob.explo._xscale;
}
ob.onEnterFrame = function () {
this._x = this._x + this.xspeed;
this.xspeed = this.xspeed * 0.8;
if (Math.abs(this.xspeed) < 0.2) {
if ((this.myType == "car") or (this.myType == "plane")) {
if (this.explo._currentframe > 50) {
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
}
};
}
function damage(ob) {
if (!ob.dead) {
sound("cardeath" + (random(3) + 1), ob._x, _root.MC_Hero._x, 75);
ob.nextFrame();
if (ob.lastframe) {
destroy(ob);
}
var _local3 = 0;
while (_local3 < (10 + random(10))) {
_root.BG_rubble.rocks(((ob._x + ob._parent._x) + random(24)) - 12, 300 - random(ob._height));
_local3++;
}
}
}
function destroy(ob, noPoints) {
_root.objectives.update(ob.myObNum);
if (!noPoints) {
_root.scoreBoard.update(ob._currentframe * (random(100) + 200));
}
sound("buildingdeath" + (random(2) + 1), ob._x, _root.MC_Hero._x, 75);
var _local3 = 0;
while (_local3 < (25 + random(25))) {
_root.BG_rubble.rocks(((ob._x + ob._parent._x) + random(24)) - 12, 300 - random(20));
_local3++;
}
_root.FG_rubble.explosion(1, ob._x + ob._parent._x, 320, random(100) + 100);
_root.pub.shake(random(50) + 50);
ob.dead = true;
}
function movement(ob, dir) {
if (!ob.attacking) {
ob.dir = dir;
if (!ob.clip.jumping) {
ob.pos = 2;
_root.pub.update(_root.hero);
}
_root.hero.clip._xscale = 100 * dir;
var _local3 = (ob.speed * dir) * -1;
var _local2 = 0;
while (_local2 < 100) {
var _local4 = _root.groundPeople.target["mc" + _local2];
_local4._x = _local4._x + _local3;
_local4 = _root.airPeople.target["mc" + _local2];
_local4._x = _local4._x + _local3;
_local4 = _root.BG_rubble.target["mc" + _local2];
_local4._x = _local4._x + _local3;
_local4 = _root.FG_rubble.target["mc" + _local2];
_local4._x = _local4._x + _local3;
_local2++;
}
_local2 = 0;
while (_local2 < 20) {
var _local4 = _root.ground.target["g" + _local2];
_local4._x = _local4._x + _local3;
if (_local4._x < -1000) {
_root.ground.setsegment(_local2, 1);
} else if (_local4._x > 1000) {
_root.ground.setsegment(_local2, -1);
}
_local2++;
}
}
}
function attack(ob, attackNum) {
if ((!ob.attacking) and (!ob.clip.jumping)) {
ob.attacking = true;
ob.pos = attackNum;
}
_root.pub.update(ob);
}
function attackTest(ob, inputs) {
if (inputs == undefined) {
minD = ob.attackDistMin[clip._currentframe - 3];
maxD = ob.attackDistMax[clip._currentframe - 3];
var _local6 = ob.attackTypes[clip._currentframe - 3];
var _local5 = ob.dir;
} else {
minD = inputs[0];
maxD = inputs[1];
var _local6 = inputs[2];
var _local5 = inputs[3];
}
if ((((_local6 == "low") or (_local6 == "grab")) or (_local6 == "people")) or (_local6 == "fire")) {
var _local3 = 0;
while (_local3 < 100) {
var _local4 = _root.groundPeople.target["mc" + _local3];
if (distTest(clip._x, _local4._x, _local5)) {
if (_local6 == "grab") {
fling(_local4, (1 * _local5) + (random(3) * _local5), random(5) + 10);
} else if (_local6 == "fire") {
fire(_local4);
} else if (dist(clip._x, _local4._x) > 0) {
fling(_local4, random(100) / 10, random(10) + 1);
} else {
fling(_local4, (-random(100)) / 10, random(10) + 1);
}
}
_local3++;
}
}
if ((_local6 == "low") or (_local6 == "high")) {
var _local3 = 0;
while (_local3 < 20) {
var _local4 = _root.ground.target["g" + _local3].building;
if (distTest(clip._x, _local4._x + _local4._parent._x, _local5)) {
_root.pub.damage(_local4);
}
_local3++;
}
}
}
function distTest(target1x, target2x, dir) {
var _local2 = dist(target1x, target2x);
if (((dir == -1) and (_local2 < (-minD))) and (_local2 > (-maxD))) {
return(true);
}
if (((dir == 1) and (_local2 > minD)) and (_local2 < maxD)) {
return(true);
}
return(false);
}
function dist(target1x, target2x) {
return(target2x - target1x);
}
}
Symbol 406 MovieClip [__Packages.heroClass] Frame 0
class heroClass
{
var target, clip;
function heroClass (y, depth) {
target = _root.createEmptyMovieClip("MC_Hero", 3);
clip = target.attachMovie("hero", "hero", depth);
clip.jumping = false;
clip.yspeed = 0;
clip.y = y;
clip._y = y;
clip._x = _root.STAGE_WIDTH / 2;
_root.pub.update(this);
}
function jump() {
if ((!clip.jumping) and (!attacking)) {
pos = 8;
clip.jumping = true;
clip.yspeed = -20;
clip.onEnterFrame = function () {
this.yspeed++;
this._y = this._y + this.yspeed;
if (this._y > this.y) {
this._y = this.y;
this.jumping = false;
_root.pub.attackTest(_root.hero, [-50, 50, "people", 1]);
_root.pub.shake(50);
delete this.onEnterFrame;
}
};
}
}
function stopAttack() {
attacking = false;
clip.gotoAndStop(1);
}
var attackDistMin = new Array(25, 10, -5, -5, -50);
var attackDistMax = new Array(125, 75, 25, 75, 50);
var attackTypes = new Array("low", "low", "grab", "fire", "low");
var attacking = false;
var dir = 1;
var pos = 1;
var speed = 7.5;
var y = 0;
}
Symbol 407 MovieClip [__Packages.person] Frame 0
class person
{
var target, maxCounter, myClips;
function person (holderID, clipIDs, maxNum, depth) {
target = _root.createEmptyMovieClip(holderID, depth);
maxCounter = maxNum;
myClips = clipIDs;
var _local3 = 0;
while (_local3 < myClips.length) {
var _local4 = types[myClips[_local3]];
_local3++;
}
}
function generatePerson(y, yVariation, minScale, maxScale, minSpeed, maxSpeed) {
var _local7 = types[myClips[random(myClips.length)]];
if (target["mc" + counter] == undefined) {
var _local3 = target.attachMovie("person_" + _local7, "mc" + counter, counter);
var _local8 = random(2);
var _local6 = minScale + random(maxScale);
var xspeed = (minSpeed + (random(100 * maxSpeed) / 100));
_local3.myType = _local7;
if ((_local3.myType == "person1") or (_local3.myType == "person2")) {
_local3.myObNum = 6;
} else if (_local3.myType == "car") {
_local3.myObNum = 7;
} else {
_local3.myObNum = 8;
}
_local3._yscale = _local6;
_local3._xscale = -_local6;
_local3.myscale = -_local6;
if (_local8 == 1) {
_local3._x = -25;
} else {
_local3._xscale = _local3._xscale * -1;
xspeed = xspeed * -1;
_local3._x = _root.STAGE_WIDTH + 25;
}
_local3._y = y;
while (_local3._y == y) {
_local3._y = (y + random(yVariation)) - (yVariation / 2);
}
if (_local3.myType != "plane") {
_local3.y = _local3._y;
} else {
_local3.y = 300;
}
_local3.xspeed = xspeed;
_local3.onEnterFrame = function () {
this._x = this._x + xspeed;
if ((this._x < -50) or (this._x > (_root.STAGE_WIDTH + 50))) {
this.removeMovieClip();
}
};
}
counter++;
if (counter >= maxCounter) {
counter = 0;
}
delete xspeed;
}
static var types = ["", "person1", "person2", "car", "plane"];
var counter = 0;
}
Symbol 408 MovieClip [__Packages.groundClass] Frame 0
class groundClass
{
var target, clip, num;
function groundClass (depth, type) {
target = _root.createEmptyMovieClip("MC_grass", depth);
target._y = _root.STAGE_HEIGHT;
var _local3 = 0;
while (_local3 < 20) {
segment(_local3);
generatebuilding(_local3, type);
_local3++;
}
}
function segment(num) {
clip = target.attachMovie("ground_segment", "g" + num, num);
clip._x = (num - 10) * 100;
clip.gotoAndStop(1 + random(4));
delete clip;
}
function setsegment(segment, dir) {
generatebuilding(segment);
clip = target["g" + segment];
clip.gotoAndStop(1 + random(4));
clip._x = clip._x + (2000 * dir);
delete clip;
}
function generatebuilding(segment, type) {
if (type == undefined) {
num = random(5) + 1;
} else {
num = type;
}
clip = target["g" + segment];
clip = clip.attachMovie("building" + num, "building", 0);
clip.myObNum = num;
clip.stop();
clip._y = -110;
clip._x = (50 + random(15)) - 7;
clip.xscaleMax = (clip._xscale = random(35) + 35);
clip._yscale = clip._xscale;
delete clip;
}
function destroyAll() {
var _local6 = target.createEmptyMovieClip("destroyTimer", target.getNextHighestDepth());
var _local3 = 0;
while (_local3 < 20) {
var _local4 = _local6.createEmptyMovieClip("timer" + _local3, _local3);
_local4.tim = 0;
_local4.myTar = _local3;
_local4.onEnterFrame = function () {
this.tim++;
if (this.tim > (random(20) + 2)) {
var _local3 = _root.ground.target["g" + this.myTar];
_root.pub.destroy(_local3.building, true);
_root.ground.generatebuilding(this.myTar);
this.removeMovieClip();
}
};
_local3++;
}
}
}
Symbol 409 MovieClip [__Packages.sky] Frame 0
class sky
{
var clip;
function sky (depth) {
clip = _root.attachMovie("sky", "MC_Sky", depth);
clip._width = STAGE_WIDTH + 100;
clip._height = STAGE_HEIGHT + 100;
clip._x = STAGE_WIDTH / 2;
clip._y = STAGE_HEIGHT / 2;
}
function screenflash() {
clip.gotoAndPlay(2);
}
static var STAGE_WIDTH = 600;
static var STAGE_HEIGHT = 400;
}
Symbol 410 MovieClip [__Packages.scoreboard] Frame 0
class scoreboard
{
var clip;
function scoreboard (depth) {
clip = _root.attachMovie("scoreBoard", "MC_Scoreboard", depth);
score = 0;
update(0);
}
function update(increase) {
score = score + increase;
clip.scoreText = score;
if (increase <= 300) {
clip._xscale = clip._xscale + increase;
} else {
clip._xscale = clip._xscale + 300;
}
clip._yscale = clip._xscale;
clip.onEnterFrame = function () {
this._xscale = this._xscale - ((this._xscale - 100) / 12);
this._yscale = this._xscale;
};
}
var score = 0;
}
Symbol 411 MovieClip [__Packages.objective] Frame 0
class objective
{
var clip, popupHolder, popup0, popup1;
function objective (depth) {
if (_root.objectiveMode) {
clip = _root.attachMovie("objective", "MC_objective", depth);
popupHolder = clip.createEmptyMovieClip("popupHolder", 1);
clip.maxTime = 0;
clip.seconds = 60;
clip.mseconds = 0;
clip.dispSec = clip.seconds;
clip.dispMsec = clip.mseconds;
clip.needUpdate = false;
popup0 = clip.createEmptyMovieClip("popupBehind", 0);
popup0.myBitmap = new flash.display.BitmapData(600, 400, true, 0);
clip.onEnterFrame = function () {
_root.objectives.popup1.obCurrent = _root.objectives.obCurrent;
if (this.needUpdate) {
this.timerTextBox.textColor = 65280;
this.mseconds = this.mseconds + (random(30) + 1);
if (this.mseconds >= 60) {
this.mseconds = 0;
this.seconds++;
if (this.seconds >= this.maxTime) {
this.seconds = this.maxTime;
_root.stopSound("addtime");
_root.objectives.newObjective();
this.needUpdate = false;
}
}
} else {
this.mseconds = this.mseconds - 2;
if (this.mseconds <= 0) {
this.mseconds = this.mseconds + 60;
this.seconds--;
if (this.seconds < 0) {
_root.pub.gameOver();
} else if (this.seconds <= 10) {
this.timerTextBox.textColor = 16711680 /* 0xFF0000 */;
_root.playSound("lowtime", 200, 0);
} else {
this.timerTextBox.textColor = 13421772 /* 0xCCCCCC */;
}
}
}
if (this.mseconds < 10) {
this.dispMsec = "0" + Math.round(this.mseconds);
} else {
this.dispMsec = Math.round(this.mseconds);
}
if (this.seconds < 10) {
this.dispSec = "0" + this.seconds;
} else {
this.dispSec = this.seconds;
}
this.timerDisp = (this.dispSec + " : ") + this.dispMsec;
};
newObjective();
}
}
function update(num) {
if ((num == curobjective) and (!clip.needUpdate)) {
obCurrent++;
popup1.obCurrent = obCurrent;
popup1.obMax = obMax;
if (obCurrent >= obMax) {
_root.playSound("addtime", 100, 999);
_root.scoreBoard.update(1000 + random(3000));
clip.needUpdate = true;
clip.maxTime = (clip.seconds + random(15)) + 15;
}
}
}
function newObjective() {
var _local3 = _root.attachMovie("objectiveText", "objectiveText", _root.getNextHighestDepth());
_local3.timer = 0;
_local3._x = 300;
_local3._y = 80;
_local3.onEnterFrame = function () {
this.timer++;
if (this.timer > 180) {
this._alpha = this._alpha - 5;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
objectiveOffset = objectiveOffset + (random(2) + 1);
popup0.myBitmap.draw(popupHolder);
popup0.attachBitmap(popup0.myBitmap, 0);
popup1.removeMovieClip();
popup1 = popupHolder.attachMovie("objective_popup", "mc", 1);
popup1._y = 25;
popup1._x = 600;
popup1._rotation = 90;
popup1.speed = 0;
popup1._xscale = (popup1._yscale = 150);
popup1.onEnterFrame = function () {
this._rotation = this._rotation - this.speed;
this.speed = this.speed + 0.5;
if (this._rotation < 10) {
this._rotation = this._rotation - random(10);
delete this.onEnterFrame;
}
};
var _local4 = curobjective;
while (curobjective == _local4) {
curobjective = random(8) + 1;
}
if ((curobjective >= 1) and (curobjective <= 5)) {
obMax = (random(3) + 5) + Math.round(objectiveOffset / 2);
_local3.myText = ("- Destroy " + obMax) + " of these buildings -";
} else if (curobjective == 6) {
obMax = (random(20) + 40) + Math.round(objectiveOffset * 3);
_local3.myText = ("- Kill " + obMax) + " people -";
} else if (curobjective == 7) {
obMax = (random(15) + 15) + Math.round(objectiveOffset * 3);
_local3.myText = ("- Destroy " + obMax) + " cars -";
} else {
obMax = (random(5) + 6) + Math.round(objectiveOffset / 2);
_local3.myText = ("- Destroy " + obMax) + " planes -";
}
popup1.obj = curobjective;
obCurrent = 0;
popup1.obCurrent = obCurrent;
popup1.obMax = obMax;
}
var objectiveOffset = 0;
var obMax = 0;
var curobjective = 0;
var obCurrent = 0;
}
Symbol 325 MovieClip Frame 2
time = 0;
stop();
onEnterFrame = function () {
time++;
if (time == 2) {
time = 0;
this.nextFrame();
}
};
Symbol 325 MovieClip Frame 150
delete onEnterFrame;
this.play();
Symbol 325 MovieClip Frame 160
_root.gotoAndStop("titleScreen");
_root.transitionExplode();
Symbol 329 Button
on (release) {
getURL ("http://www.blitzgamer.com", "_blank");
}
Symbol 331 MovieClip Frame 1
function makeGround(pos) {
var _local2 = a.attachMovie("ground_segment", "s" + a.ct, a.ct);
_local2._x = 600 - (100 * pos);
_local2._y = 380;
_local2.gotoAndStop(random(4) + 1);
_local2.onEnterFrame = function () {
this._x = this._x - speed;
if (this._x < -100) {
this.removeMovieClip();
}
};
a.ct++;
}
function makeBuilding(pos) {
var _local3 = random(5) + 1;
var _local2 = b.attachMovie("building" + _local3, "b" + b.ct, b.ct);
_local2._x = 700 - (100 * pos);
_local2._y = 270;
_local2.gotoAndStop(random(4) + 1);
_local2._xscale = (_local2._yscale = random(25) + 60);
_local2.onEnterFrame = function () {
this._x = this._x - speed;
if (this._x < -100) {
this.removeMovieClip();
}
};
b.ct++;
}
var speed = 2;
var a = this.createEmptyMovieClip("groundHold", 0);
a.ct = 0;
var b = this.createEmptyMovieClip("buildingHold", 1);
b.ct = 0;
var i = 0;
while (i < 10) {
makeGround(i);
if (random(2) == 1) {
makeBuilding(i);
}
i++;
}
timer = 0;
timer2 = 0;
onEnterFrame = function () {
timer2++;
if (timer2 > (random(80) + 80)) {
makeBuilding(0);
timer2 = 0;
}
timer++;
if (timer >= (100 / speed)) {
makeGround(0);
timer = 0;
}
};
Symbol 336 Button
on (release) {
getURL ("http://www.fluidanims.com", "_blank");
}
Symbol 340 Button
on (release) {
getURL ("http://www.blitzgamer.com", "_blank");
}
Symbol 350 Button
on (release) {
_root.objectiveMode = true;
_root.gotoAndStop("instructionsFrame");
_root.switchSound("Song1", 2);
_root.transitionExplode();
}
Symbol 353 Button
on (release) {
_root.objectiveMode = false;
_root.gotoAndStop("gameFrame");
_root.switchSound("Song1", 2);
_root.transitionExplode();
}
Symbol 356 Button
on (release) {
_root.objectiveMode = false;
_root.gotoAndStop("instructionsPage");
_root.transitionExplode();
}
Symbol 359 Button
on (release) {
_root.objectiveMode = false;
_root.gotoAndStop("optionsFrame");
_root.transitionExplode();
}
Symbol 365 Button
on (release) {
getURL ("http://www.syruplord.com", "_blank");
}
Symbol 368 Button
on (release) {
getURL (SCORESPATH, "_blank");
}
Symbol 378 Button
on (release) {
_root.gotoAndStop("titleScreen");
_root.transitionExplode();
}
Symbol 384 Button
on (release) {
_root._quality = "LOW";
}
Symbol 385 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 386 Button
on (release) {
_root._quality = "HIGH";
}