Combined Code
frame 1 {
function initialize() {
walkRightKey = 39;
walkLeftKey = 37;
smashKey = 32;
jumpKey = 17;
climbUpKey = 38;
climbDownKey = 40;
walkingMode = true;
direction = 'Right';
stageWidth = 630;
walkSpeed = 6;
smashing = false;
jumping = false;
walkingLeft = false;
walkingRight = false;
punchDamgePoints = 9153;
climbSpeed = 5;
initialClimbSpeed = climbSpeed;
climbingUp = false;
climbingDown = false;
roundNum = 1;
scoreDisplay = '$0';
score = 0;
gotoNextRound = false;
helpMode = false;
crackCount = 0;
gameOver = false;
buildingsDestoyed = 0;
buildingFalling = false;
buildingFallSpeed = 15;
tolerance = 25;
building1MCLoffset = 6;
building1MCRoffset = -17;
building1MCtop = 145;
building1MCWidth = 178;
building1MCDamageNeeded = 15;
building2MCLoffset = 4;
building2MCRoffset = -17;
building2MCtop = 260;
building2MCWidth = 191;
building2MCDamageNeeded = 9;
building3MCLoffset = 0;
building3MCRoffset = -22;
building3MCtop = 125;
building3MCWidth = 184;
building3MCDamageNeeded = 15;
building4MCLoffset = -2;
building4MCRoffset = -14;
building4MCtop = 172;
building4MCWidth = 162;
building4MCDamageNeeded = 13;
building5MCLoffset = -5;
building5MCRoffset = -18;
building5MCtop = 117;
building5MCWidth = 169;
building5MCDamageNeeded = 18;
building6MCLoffset = 2;
building6MCRoffset = -14;
building6MCtop = 198;
building6MCWidth = 184;
building6MCDamageNeeded = 13;
building7MCLoffset = -4;
building7MCRoffset = -14;
building7MCtop = 180;
building7MCWidth = 190;
building7MCDamageNeeded = 13;
trolleySpeed = 2;
trolleySmashBonus = 5;
hummerFireDamage = 6;
hummerSmashBonus = 5;
helicopterFlySpeed = 3.7;
helicopterFireDamage = 5;
helicopterSmashBonus = 5;
tankShellSpeed = 14;
tankFireDamage = 15;
tankSmashBonus = 5;
}
function keyDownFunction() {
if (walkingMode) {
if (Key.isDown(walkRightKey) && !smashing && !jumping) {
walkingRight = true;
direction = 'Right';
walkingLeft = false;
}
if (Key.isDown(walkLeftKey) && !smashing && !jumping) {
walkingLeft = true;
direction = 'Left';
walkingRight = false;
}
if (Key.isDown(smashKey) && !jumping) {
smashing = true;
walkingLeft = false;
walkingRight = false;
}
if (Key.isDown(jumpKey) && !jumping && !smashing && 2 < timeMC.time.timeDisplay) {
jumping = true;
smashing = false;
walkingLeft = false;
walkingRight = false;
}
if (Key.isDown(climbUpKey) && !smashing && !jumping) {
buildingSideFound = false;
buildingSideCheck();
}
} else {
if (Key.isDown(climbUpKey)) {
climbingUp = true;
climbingDown = false;
climbSpeed = initialClimbSpeed;
}
if (Key.isDown(climbDownKey)) {
climbingDown = true;
climbingUp = false;
}
if (Key.isDown(smashKey) && !Key.isDown(climbUpKey) && !Key.isDown(climbDownKey) && !smashing && !buildingFalling && !looking) {
smashing = true;
hulk.hulk.arm.gotoAndPlay('punchOut');
hulk.hulk.body.gotoAndPlay('punchOut');
climbSpeed = 1;
}
if (Key.isDown(smashKey) && Key.isDown(climbDownKey) && !smashing && !buildingFalling && !looking) {
smashing = true;
hulk.hulk.arm.gotoAndPlay('punchDown');
hulk.hulk.body.gotoAndPlay('punchDown');
climbSpeed = 1;
}
if (direction == 'Right') {
if (!Key.isDown(smashKey) && Key.isDown(walkLeftKey) && !smashing && !buildingFalling) {
hulk.hulk.arm.gotoAndStop('look');
hulk.hulk.body.gotoAndStop('look');
looking = true;
}
} else {
if (!Key.isDown(smashKey) && Key.isDown(walkRightKey) && !smashing && !buildingFalling) {
hulk.hulk.arm.gotoAndStop('look');
hulk.hulk.body.gotoAndStop('look');
looking = true;
}
}
if (direction == 'Right') {
if (Key.isDown(smashKey) && Key.isDown(walkLeftKey) && !Key.isDown(climbUpKey) && !Key.isDown(climbDownKey) && !smashing && !buildingFalling) {
smashing = true;
hulk.hulk.arm.gotoAndPlay('punchBack');
hulk.hulk.body.gotoAndPlay('punchBack');
}
} else {
if (Key.isDown(smashKey) && Key.isDown(walkRightKey) && !Key.isDown(climbUpKey) && !Key.isDown(climbDownKey) && !smashing && !buildingFalling) {
smashing = true;
hulk.hulk.arm.gotoAndPlay('punchBack');
hulk.hulk.body.gotoAndPlay('punchBack');
}
}
}
}
function keyUpFunction() {
if (walkingMode) {
if (!Key.isDown(walkRightKey)) {
walkingRight = false;
}
if (!Key.isDown(walkLeftKey)) {
walkingLeft = false;
}
if (!Key.isDown(smashKey) && Key.isDown(walkRightKey) && !jumping) {
walkingRight = true;
direction = 'Right';
walkingLeft = false;
}
if (!Key.isDown(smashKey) && Key.isDown(walkLeftKey) && !jumping) {
walkingLeft = true;
direction = 'Left';
walkingRight = false;
}
} else {
if (!Key.isDown(climbUpKey)) {
climbingUp = false;
}
if (!Key.isDown(climbDownKey)) {
climbingDown = false;
}
if (looking && direction == 'Right' && !Key.isDown(walkLeftKey)) {
hulk.hulk.arm.gotoAndStop(1);
hulk.hulk.body.gotoAndStop(1);
looking = false;
}
if (looking && direction == 'Left' && !Key.isDown(walkRightKey)) {
hulk.hulk.arm.gotoAndStop(1);
hulk.hulk.body.gotoAndStop(1);
looking = false;
}
}
}
function enterFrameFunction() {
if (walkingMode) {
if (walkingRight && !smashing && !jumping && !gotoNextRound && !helpMode) {
if (hulk._x < stageWidth - 10) {
hulk._x += walkSpeed;
}
direction = 'Right';
hulk.gotoAndStop('walkRight');
} else {
if (walkingLeft && !smashing && !jumping && !gotoNextRound && !helpMode) {
if (10 < hulk._x) {
hulk._x -= walkSpeed;
}
direction = 'Left';
hulk.gotoAndStop('walkLeft');
} else {
if (smashing && !jumping && !gotoNextRound && !helpMode) {
hulk.gotoAndStop(['smash' + direction]);
} else {
if (jumping && !gotoNextRound && !helpMode) {
hulk.gotoAndStop(['jump' + direction]);
} else {
hulk.gotoAndStop(['rest' + direction]);
}
}
}
}
} else {
if (buildingFalling && !helpMode) {
if (hulk._y >= 350 || 300 < this[currentBuilding]._y) {
hulk._y = 350;
hulk.gotoAndStop('flex');
} else {
hulk._y += buildingFallSpeed;
}
if (this[currentBuilding]._y < 400) {
this[currentBuilding]._y += buildingFallSpeed;
} else {
buildingFalling = false;
dustCloud.cloud1.gotoAndPlay('fade');
dustCloud.cloud2.gotoAndPlay('fade');
dustCloud.cloud3.gotoAndPlay('fade');
dustCloud.cloud4.gotoAndPlay('fade');
var i = 1;
while (i < 30) {
removeMovieClip(this[currentBuilding] + '.damageDetect' + (i + 1));
++i;
}
}
} else {
if (climbingUp && this[currentBuilding + 'top'] < hulk._y && !helpMode) {
hulk._y -= climbSpeed;
hulk.gotoAndStop(['climb' + direction]);
hulk.hulk.play();
hulk.hulk.body.head.gotoAndStop('up');
} else {
if (climbingDown && !helpMode) {
hulk._y += climbSpeed;
hulk.hulk.play();
hulk.hulk.body.head.gotoAndStop('down');
if (355 < hulk._y) {
walkingMode = true;
climbingUp = false;
climbingDown = false;
hulk._y = 350;
}
if (!smashing) {
climbSpeed = initialClimbSpeed;
}
} else {
hulk.hulk.stop();
hulk.hulk.body.head.gotoAndStop('resting');
}
}
}
}
}
function generateBuildings() {
multFactor = 180;
minusFactor = 140;
buildingsArray = ['building1MC', 'building2MC', 'building3MC', 'building4MC', 'building5MC', 'building6MC', 'building7MC'];
if (roundNum == 1) {
buildings = ['building2MC', 'building4MC', 'building6MC'];
} else {
buildings = buildingsArray;
while (3 < buildings.length) {
randBuilding = random(buildings.length);
buildings.splice(randBuilding, 1);
}
}
finalBuildings = new Array();
var i = 0;
while (i < 3) {
randBuilding = random(buildings.length);
finalBuildings.push(buildings[randBuilding]);
buildings.splice(randBuilding, 1);
++i;
}
var i = 1;
while (i < 4) {
this[finalBuildings[i - 1]]._x = multFactor * i - minusFactor;
var n = 1;
while (n < 14) {
duplicateMovieClip(this[finalBuildings[i - 1]] + '.damageDetect1', 'damageDetect' + (n + 1), n);
damageDetectMCL = this[finalBuildings[i - 1]] + '.damageDetect' + (n + 1);
with (this[finalBuildings[i - 1]]) {
eval(damageDetectMCL)._y = (n + 1) * 24 + 0;
}
duplicateMovieClip(this[finalBuildings[i - 1]] + '.damageDetect16', 'damageDetect' + (n + 16), n + 16);
damageDetectMCL = this[finalBuildings[i - 1]] + '.damageDetect' + (n + 16);
with (this[finalBuildings[i - 1]]) {
eval(damageDetectMCL)._y = (n + 1) * 24 + 0;
}
++n;
}
++i;
}
var i = 1;
while (i < 4) {
this[finalBuildings[i - 1] + 'DamageCount'] = 0;
++i;
}
}
function buildingSideCheck() {
if (direction == 'Right') {
var i = 0;
while (i < finalBuildings.length) {
currentBuilding = finalbuildings[i];
distCalc = hulk._x - this[finalbuildings[i]]._x + this[currentBuilding + 'Loffset'];
if (distCalc < 0) {
distCalc *= -1;
}
if (distCalc < tolerance && this[currentBuilding]._y < 350) {
buildingSideFound = true;
hulk._x = (i + 1) * multFactor - minusFactor + this[currentBuilding + 'Loffset'];
break;
}
++i;
}
} else {
var i = 0;
while (i < finalBuildings.length) {
currentBuilding = finalbuildings[i];
distCalc = hulk._x - (this[finalbuildings[i]]._x + this[finalbuildings[i] + 'Width'] + this[currentBuilding + 'Roffset']);
if (distCalc < 0) {
distCalc *= -1;
}
if (distCalc < tolerance && this[currentBuilding]._y < 350) {
buildingSideFound = true;
hulk._x = (i + 1) * multFactor - minusFactor + this[finalbuildings[i] + 'Width'] + this[currentBuilding + 'Roffset'];
break;
}
++i;
}
}
if (buildingSideFound) {
walkingMode = false;
jumping = false;
smashing = false;
walkingLeft = false;
walkingRight = false;
climbingUp = true;
climbingDown = false;
climbSpeed = initialClimbSpeed;
}
}
function punchTest() {
var i = 0;
while (i < 31) {
calc = eval(currentBuilding + '.' + ('damageDetect' + (i + 1)));
if (_root.hulk.hulk.arm.fist.circle.hitTest(calc)) {
if (calc._currentframe == 1) {
calc._x += random(0);
randDamgeScale = random(30) + 75;
calc._xscale = randDamgeScale;
calc._yscale = randDamgeScale;
with (calc) {
gotoAndStop(random(4) + 2);
}
++this[currentBuilding + 'DamageCount'];
score += roundNum * punchDamgePoints;
if (score < 10000) {
scoreDisplay = '$' + substring(score, 0, 1) + ',' + substring(score, 2, -1);
} else {
if (score < 100000) {
scoreDisplay = '$' + substring(score, 0, 2) + ',' + substring(score, 3, -1);
} else {
if (score < 1000000) {
scoreDisplay = '$' + substring(score, 0, 3) + ',' + substring(score, 4, -1);
} else {
if (score < 10000000) {
scoreDisplay = '$' + substring(score, 0, 1) + ',' + substring(score, 2, 3) + ',' + substring(score, 5, -1);
} else {
if (score < 100000000) {
scoreDisplay = '$' + substring(score, 0, 2) + ',' + substring(score, 3, 3) + ',' + substring(score, 6, -1);
}
}
}
}
}
if (this[currentBuilding + 'DamageCount'] == this[currentBuilding + 'DamageNeeded']) {
buildingFalling = true;
dustCloud._x = this[currentBuilding]._x;
++buildingsDestoyed;
if (buildingsDestoyed == 3) {
buildingsDestoyed = 0;
gotoNextRound = true;
}
dustCloud.play();
dustCloud.cloud1.play();
dustCloud.cloud2.play();
dustCloud.cloud3.play();
dustCloud.cloud4.play();
climbingUp = false;
climbingDown = false;
hulk.hulk.stop();
}
}
}
++i;
}
if (_root.hulk.hulk.arm.fist.circle.hitTest(helicopter1.heli.box) || _root.hulk.hulk.arm.fist.circle.hitTest(helicopter2.heli.box)) {
if (helicopter1._currentframe != 1) {
helicopter1.play();
}
if (helicopter2._currentframe != 1) {
helicopter2.play();
}
timeMC.time.timeDisplay += helicopterSmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
}
}
function smashTest() {
if (roundNum == 1) {
if (_root.hulk.hulk.fist.circle.hitTest(_root.trolly)) {
trolly.play();
timeMC.time.timeDisplay += trolleySmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
timeMC.time.timeCalc();
}
if (_root.hulk.hulk.legs.hitTest(_root.trolly)) {
trolly.play();
timeMC.time.timeDisplay += trolleySmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
timeMC.time.timeCalc();
}
} else {
if (_root.hulk.hulk.fist.circle.hitTest(_root.hummer1.hummerMC.box) || _root.hulk.hulk.fist.circle.hitTest(_root.hummer2.hummerMC.box)) {
hummer1.hummerMC.play();
hummer2.hummerMC.play();
timeMC.time.timeDisplay += hummerSmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
timeMC.time.timeCalc();
}
if (_root.hulk.hulk.legs.hitTest(_root.hummer1.hummerMC.box) || _root.hulk.hulk.legs.hitTest(_root.hummer2.hummerMC.box)) {
hummer1.hummerMC.play();
hummer2.hummerMC.play();
timeMC.time.timeDisplay += hummerSmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
timeMC.time.timeCalc();
}
if (_root.hulk.hulk.fist.circle.hitTest(_root.tank1.tankMC.box) || _root.hulk.hulk.fist.circle.hitTest(_root.tank2.tankMC.box)) {
tank1.tankMC.play();
tank2.tankMC.play();
timeMC.time.timeDisplay += tankSmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
timeMC.time.timeCalc();
}
if (_root.hulk.hulk.legs.hitTest(_root.tank1.tankMC.box) || _root.hulk.hulk.legs.hitTest(_root.tank2.tankMC.box)) {
tank1.tankMC.play();
tank2.tankMC.play();
timeMC.time.timeDisplay += tankSmashBonus;
timeMC.meter.gotoAndStop(timeMC.time.timeDisplay + 2);
timeMC.time.timeCalc();
}
}
}
function generateCracks() {
++crackCount;
duplicateMovieClip('cracks.cracks', 'crack' + crackCount, crackCount);
if (direction == 'Right') {
this.cracks['crack' + crackCount].gotoAndStop(random(4) + 1);
this.cracks['crack' + crackCount]._x = hulk._x + 45 + 98;
} else {
this.cracks['crack' + crackCount].gotoAndStop(random(4) + 1);
this.cracks['crack' + crackCount]._x = hulk._x - 45 + 98;
}
}
function removeCracks() {
var i = 1;
while (crackCount >= i) {
removeMovieClip(this.cracks['crack' + i]);
++i;
}
crackCount = 0;
}
}
movieClip 6 {
}
instance of movieClip 6 {
onClipEvent (load) {
restingPoint = 227;
gravity = 4;
drag = 0.99;
bounce = 0.35;
ySpeed = 0;
explosion = new Sound();
explosion.attachSound('explosion');
explosionVolume = 100;
explosionCount = 0;
}
onClipEvent (enterFrame) {
_y = _y + ySpeed;
if (restingPoint < _y) {
_y = restingPoint;
ySpeed = -ySpeed * bounce;
if (explosionCount < 2) {
explosionVolume -= 30;
explosion.setVolume(explosionVolume);
explosion.start();
++explosionCount;
}
}
ySpeed = ySpeed * drag + gravity;
}
}
movieClip 13 {
}
instance of movieClip 13 {
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
}
instance of movieClip 13 {
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
}
movieClip 15 {
}
instance of movieClip 15 {
onClipEvent (load) {
_parent.stop();
if (_parent._framesloaded >= 150) {
_parent.play();
}
}
onClipEvent (enterFrame) {
if (_parent._framesloaded >= 150) {
_parent.play();
}
}
}
movieClip 24 {
}
movieClip 37 {
}
movieClip 38 {
frame 24 {
stop();
}
}
button 51 {
on (release) {
_parent.play();
}
}
button 54 {
on (release) {
_parent._parent.play();
}
}
movieClip 55 {
frame 1 {
stop();
}
frame 130 {
stop();
}
}
movieClip 56 {
}
instance of movieClip 56 {
onClipEvent (load) {
kbToLoad = 380;
kbLoaded = _parent.getBytesLoaded() / 1000;
calc = Math.round((kbLoaded / kbToLoad) * 100);
if (calc >= 100) {
hulk.gotoAndPlay(15);
}
}
onClipEvent (enterFrame) {
kbLoaded = _parent.getBytesLoaded() / 1000;
calc = Math.round((kbLoaded / kbToLoad) * 100);
if (calc < 100) {
hulk.gotoAndStop(calc);
} else {
if (this.hulk._currentframe < 130) {
hulk.play();
}
}
if (100 < calc) {
_parent.loadingText = '';
} else {
_parent.loadingText = 'LOADING...' + calc + '%';
}
'';
}
}
movieClip 64 {
}
movieClip 67 {
}
frame 145 {
stop();
}
movieClip 75 {
frame 1 {
stop();
}
}
movieClip 85 {
frame 1 {
function timeCalc() {
min = int(timeDisplay / 60);
sec = timeDisplay - min * 60;
sec = sec < 10 ? '0' + String(sec) : String(sec);
min = min < 10 ? String(min);
timeDisplay2 = min + ':' + sec;
if (0 >= timeDisplay) {
_root.gameOver = true;
timeDisplay = 0;
timeDisplay2 = '0:00';
_root.hulk.gotoAndStop(['shrink' + _root.direction]);
stop();
}
_parent.meter.gotoAndStop(timeDisplay + 2);
}
}
frame 6 {
timeCalc();
}
frame 14 {
timeCalc();
}
frame 20 {
timeCalc();
}
frame 28 {
timeCalc();
}
frame 35 {
timeDisplay -= 1;
timeCalc();
}
}
movieClip 106 {
frame 1 {
stop();
}
}
button 110 {
on (release, releaseOutside) {
gotoAndStop(15);
}
}
button 117 {
on (release, releaseOutside) {
gotoAndStop(5);
}
}
movieClip 118 {
frame 1 {
_root.musicOn = true;
stop();
}
frame 5 {
_root.musicOn = true;
stop();
}
frame 15 {
_root.musicOn = false;
}
}
button 127 {
on (release, releaseOutside) {
if (!_parent._parent.helpMode && !_root.buildingFalling) {
_parent._parent.helpMC.nextFrame();
stopAllSounds();
_parent._parent.helpMode = true;
_parent._parent.timeMC.time.stop();
_root.vehicleController.stop();
}
}
}
button 130 {
on (release, releaseOutside) {
if (!_parent._parent.helpMode && !_root.buildingFalling) {
_parent._parent.helpMC.nextFrame();
stopAllSounds();
_parent._parent.helpMode = true;
_parent._parent.timeMC.time.stop();
}
}
}
button 133 {
on (release, releaseOutside) {
if (!_parent._parent.helpMode && !_root.buildingFalling) {
_parent._parent.restartMC.nextFrame();
stopAllSounds();
_parent._parent.helpMode = true;
_parent._parent.timeMC.time.stop();
_root.vehicleController.stop();
}
}
}
movieClip 143 {
}
movieClip 144 {
instance meter of movieClip 75 {
onClipEvent (load) {
this.gotoAndStop(this._totalframes);
}
}
instance time of movieClip 85 {
onClipEvent (load) {
this.gotoAndStop(1);
timeDisplay = 150;
}
}
}
instance timeMC of movieClip 144 {
}
frame 185 {
initialize();
}
frame 187 {
generateBuildings();
landingCracks._visible = false;
if (musicOn) {
timeMC.nav.audio.gotoAndPlay(2);
}
helpMode = true;
gotoNextRound = false;
walkingMode = true;
direction = 'Right';
smashing = false;
jumping = false;
walkingLeft = false;
walkingRight = false;
climbingUp = false;
climbingDown = false;
}
button 151 {
on (release, releaseOutside) {
_root.timeMC.time.timeDisplay = 150;
_root.timeMC.time.timeDisplay2 = '2:30';
_root.timeMC.meter.gotoAndStop(_root.timeMC.time.timeDisplay + 2);
_root.initialize();
_root.timeMC.nav.vehicles.gotoAndStop(1);
_root.gotoAndPlay('round1Start');
}
}
movieClip 157 {
}
movieClip 158 {
frame 1 {
stop();
}
frame 2 {
stopAllSounds();
_parent.gotoNextRound = true;
scoreDisplay = '$' + _root.score;
}
frame 12 {
stop();
}
}
button 164 {
on (release, releaseOutside) {
play();
_parent.helpMode = false;
_parent.timeMC.time.play();
_root.vehicleController.play();
if (_root.musicOn) {
_root.timeMC.nav.audio.gotoAndPlay(2);
}
}
}
button 167 {
on (release, releaseOutside) {
_root.initialize();
_root.timeMC.time.timeDisplay = 150;
_root.timeMC.time.timeDisplay2 = '2:30';
_root.timeMC.meter.gotoAndStop(_root.timeMC.time.timeDisplay + 2);
_parent.gotoAndPlay('round1Start');
}
}
movieClip 170 {
frame 1 {
stop();
}
frame 2 {
stop();
_root.vehicleController.stop();
}
}
button 175 {
on (release, releaseOutside) {
play();
_parent.helpMode = false;
_parent.timeMC.time.play();
_root.vehicleController.play();
if (_root.musicOn) {
_root.timeMC.nav.audio.gotoAndPlay(2);
}
}
}
movieClip 176 {
frame 1 {
stop();
}
frame 2 {
stop();
_root.vehicleController.stop();
}
}
movieClip 180 {
}
instance of movieClip 180 {
onClipEvent (load) {
levelDisplay = 'LEVEL ' + _parent.roundNum;
}
}
movieClip 185 {
}
movieClip 186 {
}
movieClip 190 {
}
movieClip 192 {
}
movieClip 194 {
}
movieClip 195 {
frame 9 {
stop();
}
}
movieClip 197 {
}
movieClip 199 {
frame 1 {
stop();
}
frame 2 {
this.gotoAndPlay(random(15) + 3);
}
frame 19 {
gotoAndPlay(3);
}
frame 30 {
_root.dustCloud._x = -200;
if (_root.gotoNextRound) {
_root.play();
}
}
}
movieClip 200 {
frame 1 {
stop();
}
}
movieClip 204 {
}
movieClip 206 {
}
movieClip 208 {
}
movieClip 210 {
}
movieClip 212 {
}
movieClip 214 {
}
movieClip 216 {
}
movieClip 218 {
}
movieClip 219 {
frame 9 {
stop();
}
}
movieClip 220 {
frame 2 {
_rotation = random(60) - 45;
}
frame 8 {
stop();
}
}
movieClip 223 {
frame 1 {
this._rotation = random(60) - 45;
gotoAndStop(random(this._totalframes) + 1);
}
}
movieClip 225 {
}
movieClip 227 {
}
movieClip 229 {
}
movieClip 232 {
}
movieClip 236 {
}
movieClip 239 {
frame 1 {
stop();
}
frame 2 {
if (this._name == 'damageDetect1' || this._name == 'damageDetect16') {
gotoAndStop(9);
}
}
instance of movieClip 225 {
onClipEvent (load) {
_rotation = random(360);
}
}
instance of movieClip 227 {
onClipEvent (load) {
_rotation = random(360);
}
}
frame 3 {
if (this._name == 'damageDetect1' || this._name == 'damageDetect16') {
gotoAndStop(9);
}
}
instance of movieClip 232 {
onClipEvent (load) {
_rotation = random(360);
}
}
frame 4 {
if (this._name == 'damageDetect1' || this._name == 'damageDetect16') {
gotoAndStop(9);
}
}
instance of movieClip 227 {
onClipEvent (load) {
_rotation = random(360);
}
}
frame 5 {
if (this._name == 'damageDetect1' || this._name == 'damageDetect16') {
gotoAndStop(9);
}
}
instance of movieClip 236 {
onClipEvent (load) {
_rotation = random(360);
}
}
instance of movieClip 227 {
onClipEvent (load) {
_rotation = random(360);
}
}
}
movieClip 242 {
}
movieClip 245 {
}
movieClip 248 {
instance damageDetect16 of movieClip 239 {
}
}
movieClip 251 {
}
movieClip 257 {
}
movieClip 258 {
}
movieClip 260 {
}
movieClip 261 {
}
movieClip 263 {
}
movieClip 264 {
}
movieClip 265 {
}
movieClip 269 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 14 {
stop();
}
}
instance trolly of movieClip 269 {
onClipEvent (load) {
if (_root.roundNum == 1) {
this.nextFrame();
}
}
onClipEvent (enterFrame) {
if (_root.roundNum == 1 && !_root.helpMode) {
_x = _x - _root.trolleySpeed;
}
}
}
movieClip 271 {
}
movieClip 273 {
}
movieClip 275 {
}
movieClip 277 {
}
movieClip 279 {
}
movieClip 281 {
}
movieClip 283 {
}
movieClip 285 {
}
movieClip 287 {
}
movieClip 288 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
instance of movieClip 288 {
onClipEvent (load) {
restingPoint = 300;
gravity = 4;
drag = 0.99;
bounce = 0.45;
ySpeed = 0;
explosion = new Sound();
explosion.attachSound('explosion');
explosionVolume = 100;
explosionCount = 0;
}
onClipEvent (enterFrame) {
_y = _y + ySpeed;
if (restingPoint < _y) {
_y = restingPoint;
ySpeed = -ySpeed * bounce;
if (explosionCount < 2) {
this.nextFrame();
_parent.landingCracks._visible = true;
explosionVolume -= 30;
explosion.setVolume(explosionVolume);
explosion.start();
++explosionCount;
}
}
ySpeed = ySpeed * drag + gravity;
}
}
frame 290 {
timeMC.time.play();
helpMode = false;
stop();
}
movieClip 290 {
}
movieClip 291 {
}
movieClip 293 {
}
movieClip 295 {
}
movieClip 297 {
}
movieClip 299 {
}
movieClip 301 {
}
movieClip 303 {
}
movieClip 305 {
}
movieClip 307 {
}
movieClip 309 {
}
movieClip 311 {
}
movieClip 313 {
}
movieClip 315 {
}
movieClip 317 {
}
movieClip 319 {
}
movieClip 320 {
}
movieClip 322 {
}
movieClip 324 {
}
movieClip 326 {
}
movieClip 328 {
}
movieClip 330 {
}
movieClip 332 {
}
movieClip 334 {
}
movieClip 335 {
frame 1 {
_root.jumpReady = false;
}
instance gravity of movieClip 326 {
onClipEvent (load) {
rightedge = 630;
leftedge = 0;
bottomedge = 373;
gravity = 4;
drag = 0.97;
bounce = 0.25;
if (_root.direction == 'Right' && Key.isDown(_root.walkRightKey)) {
xspeed = 6;
} else {
if (_root.direction == 'Right' && !Key.isDown(_root.walkRightKey)) {
xspeed = 0;
} else {
if (_root.direction == 'Left' && Key.isDown(_root.walkLeftKey)) {
xspeed = -6;
} else {
if (_root.direction == 'Left' && !Key.isDown(_root.walkLeftKey)) {
xspeed = 0;
}
}
}
}
yspeed = 280;
}
onClipEvent (enterFrame) {
_root.hulk._x += xspeed;
if (rightedge < _root.hulk._x + _width / 2) {
_root.hulk._x = rightedge - _width / 2;
xspeed = -xspeed * bounce;
}
if (_root.hulk._x - _width / 2 < leftedge) {
_root.hulk._x = leftedge + _width / 2;
xspeed = -xspeed * bounce;
}
_root.hulk._y += yspeed;
if (bottomedge < _root.hulk._y + _height / 2) {
_root.hulk._y = bottomedge - _height / 2;
yspeed = -yspeed * bounce;
}
yspeed = yspeed * drag + gravity;
xspeed *= drag;
if (Key.isDown(_root.walkRightKey) && _root.hulk._y - bottomedge < -120 && xspeed < 10) {
xspeed += 0.5;
} else {
if (Key.isDown(_root.walkLeftKey) && _root.hulk._y - bottomedge < -120 && -10 < xspeed) {
xspeed += -0.5;
}
}
if (_root.hulk.hitTest(_root.helicopter1.heli.heli) || _root.hulk.hitTest(_root.helicopter2.heli.heli)) {
if (_root.helicopter1._currentframe != 1) {
_root.helicopter1.play();
}
if (_root.helicopter2._currentframe != 1) {
_root.helicopter2.play();
}
}
}
}
frame 36 {
_root.smashTest();
}
frame 43 {
_root.jumping = false;
_root.jumpReady = true;
if (Key.isDown(_root.walkRightKey)) {
_root.walkingRight = true;
_root.direction = 'Right';
_root.walkingLeft = false;
} else {
if (Key.isDown(_root.walkLeftKey)) {
_root.walkingLeft = true;
_root.direction = 'Left';
_root.walkingRight = false;
} else {
if (_root.direction == 'Right') {
_parent.gotoAndStop('restRight');
} else {
_parent.gotoAndStop('restLeft');
}
}
}
}
}
movieClip 337 {
}
movieClip 339 {
}
movieClip 341 {
frame 6 {
_root.smashTest();
_root.generateCracks();
}
frame 12 {
_root.smashing = false;
if (Key.isDown(_root.walkRightKey) && !Key.isDown(_root.smashKey)) {
_root.walkingRight = true;
_root.direction = 'Right';
_root.walkingLeft = false;
} else {
if (Key.isDown(_root.walkLeftKey) && !Key.isDown(_root.smashKey)) {
_root.walkingLeft = true;
_root.direction = 'Left';
_root.walkingRight = false;
} else {
if (_parent.direction == 'Right') {
_parent.gotoAndStop('restRight');
} else {
_parent.gotoAndStop('restLeft');
}
}
}
}
}
movieClip 343 {
}
movieClip 345 {
}
movieClip 346 {
frame 1 {
_root.smashing = false;
stop();
}
frame 15 {
_root.punchTest();
}
frame 18 {
_root.smashing = false;
gotoAndStop(1);
}
frame 26 {
_root.punchTest();
}
frame 29 {
_root.smashing = false;
gotoAndStop(1);
}
frame 37 {
_root.punchTest();
}
frame 44 {
_root.smashing = false;
if (_root.looking) {
gotoAndStop(48);
} else {
gotoAndStop(1);
}
}
}
movieClip 348 {
}
movieClip 350 {
}
movieClip 352 {
}
movieClip 353 {
frame 1 {
stop();
}
}
movieClip 355 {
}
movieClip 357 {
}
movieClip 359 {
}
movieClip 361 {
}
movieClip 363 {
}
movieClip 365 {
}
movieClip 366 {
frame 1 {
stop();
}
instance of movieClip 355 {
}
frame 17 {
gotoAndStop(1);
}
instance of movieClip 355 {
}
frame 29 {
gotoAndStop(1);
}
frame 46 {
if (_root.looking) {
gotoAndStop(53);
} else {
gotoAndStop(1);
}
}
}
movieClip 368 {
}
movieClip 370 {
}
movieClip 372 {
}
movieClip 373 {
}
movieClip 375 {
}
movieClip 377 {
}
movieClip 379 {
}
movieClip 381 {
}
movieClip 383 {
}
movieClip 384 {
frame 1 {
_root.flexing = true;
}
frame 35 {
_parent.gotoAndStop('rest' + _root.direction);
stop();
}
}
movieClip 389 {
}
movieClip 391 {
}
movieClip 392 {
}
movieClip 394 {
}
movieClip 395 {
frame 5 {
stopAllSounds();
}
frame 111 {
_root.gameOverMC.play();
_root.gameOver = true;
stop();
}
}
movieClip 396 {
frame 1 {
stop();
}
instance hulk of movieClip 335 {
onClipEvent (load) {
}
}
instance of movieClip 384 {
onClipEvent (unload) {
_root.flexing = false;
_root.walkingMode = true;
}
}
instance of movieClip 395 {
onClipEvent (load) {
shrinking = false;
if (_root.hulk._y >= 349 && !shrinking) {
shrinking = true;
this.gotoAndPlay(3);
_root.hulk._y = 350;
} else {
this.gotoAndStop(2);
}
updateAfterEvent();
}
onClipEvent (enterFrame) {
if (_root.hulk._y < 349) {
_root.hulk._y += 4;
}
if (_root.hulk._y >= 349 && !shrinking) {
shrinking = true;
this.gotoAndPlay(3);
_root.hulk._y = 350;
}
}
}
}
instance hulk of movieClip 396 {
onClipEvent (keyDown) {
if (!_parent.gameOver && !_parent.flexing) {
_parent.keyDownFunction();
}
updateAfterEvent();
}
onClipEvent (keyUp) {
if (!_parent.gameOver && !_parent.flexing) {
_parent.keyUpFunction();
}
updateAfterEvent();
}
onClipEvent (enterFrame) {
if (!_parent.gameOver) {
_parent.enterFrameFunction();
}
}
}
frame 291 {
helpMode = true;
timeMC.time.stop();
}
movieClip 407 {
frame 1 {
stop();
}
frame 7 {
gotoAndStop(1);
}
}
frame 323 {
++roundNum;
generateBuildings();
landingCracks._visible = false;
removeCracks();
timeMC.nav.vehicles.nextFrame();
helpMode = true;
gotoNextRound = false;
walkingMode = true;
direction = 'Right';
smashing = false;
jumping = false;
walkingLeft = false;
walkingRight = false;
climbingUp = false;
climbingDown = false;
}
instance of movieClip 180 {
onClipEvent (load) {
levelDisplay = 'LEVEL ' + _parent.roundNum;
}
}
movieClip 410 {
}
movieClip 411 {
instance damageDetect16 of movieClip 239 {
}
}
movieClip 414 {
}
movieClip 417 {
}
movieClip 420 {
}
movieClip 425 {
}
movieClip 426 {
frame 19 {
stop();
}
}
movieClip 428 {
}
movieClip 430 {
}
movieClip 431 {
frame 10 {
stop();
}
}
movieClip 433 {
frame 1 {
stop();
}
}
movieClip 436 {
frame 1 {
stop();
}
instance of movieClip 433 {
onClipEvent (load) {
hit = false;
}
onClipEvent (enterFrame) {
if (!_root.helpMode) {
if (!hit) {
_x = _x - 12;
}
if (this.hitTest(_root.hulk.rectangle) && !hit && !_root.buildingFalling && !_root.gotoNextRound) {
hit = true;
_parent.nextFrame();
this.nextFrame();
}
}
}
}
frame 3 {
_root.timeMC.time.timeDisplay -= _root.hummerFireDamage;
_root.timeMC.meter.gotoAndStop(_root.timeMC.time.timeDisplay + 2);
_root.timeMC.time.timeCalc();
}
}
movieClip 438 {
}
movieClip 440 {
}
movieClip 441 {
}
movieClip 442 {
frame 1 {
function fireTracer() {
duplicateMovieClip('tracer', 'tracer' + tracerCount, tracerCount);
this['tracer' + tracerCount]._alpha = 100;
this['tracer' + tracerCount]._rotation = gun._rotation - 3;
this['tracer' + tracerCount].nextFrame();
++tracerCount;
}
tracerCount = 0;
stop();
}
frame 2 {
_parent.stop();
}
frame 13 {
_parent.gotoAndStop(1);
stop();
}
}
movieClip 443 {
frame 1 {
extra = 4;
tracerCount = 0;
stop();
}
instance hummerMC of movieClip 442 {
onClipEvent (load) {
angle = (_root.hulk._y - 150 - 200) * -0.1 + _parent.extra;
}
onClipEvent (enterFrame) {
if (gun._rotation < angle) {
gun._rotation += 1.2;
}
}
}
frame 78 {
hummerMC.fireTracer();
}
frame 85 {
hummerMC.fireTracer();
}
frame 92 {
hummerMC.fireTracer();
}
}
instance hummer1 of movieClip 443 {
}
instance hummer2 of movieClip 443 {
}
movieClip 444 {
}
movieClip 446 {
}
movieClip 447 {
frame 1 {
function fireTracer() {
duplicateMovieClip('tracer', 'tracer' + tracerCount, tracerCount);
this['tracer' + tracerCount]._alpha = 100;
this['tracer' + tracerCount].nextFrame();
++tracerCount;
}
tracerCount = 0;
}
}
movieClip 449 {
frame 1 {
stop();
_x = initialX;
}
instance heli of movieClip 447 {
onClipEvent (enterFrame) {
if (_parent._name == 'helicopter2') {
_root.helicopter2._x -= _root.helicopterFlySpeed;
} else {
_root.helicopter1._x += _root.helicopterFlySpeed;
}
randFire = random(30);
if (randFire == 5) {
fireTracer();
}
}
}
frame 3 {
stop();
}
frame 4 {
_root.timeMC.time.timeDisplay += _root.helicopterSmashBonus;
_root.timeMC.meter.gotoAndStop(_root.timeMC.time.timeDisplay + 2);
}
instance of movieClip 431 {
onClipEvent (enterFrame) {
if (_parent._name == 'helicopter2') {
_root.helicopter2._x -= _root.helicopterFlySpeed;
} else {
_root.helicopter1._x += _root.helicopterFlySpeed;
}
}
}
}
instance helicopter1 of movieClip 449 {
onClipEvent (load) {
initialX = _x;
}
}
instance helicopter2 of movieClip 449 {
onClipEvent (load) {
initialX = _x;
}
}
movieClip 450 {
frame 1 {
if (!_root.gameOver) {
if (_root.roundNum == 2 && !_root.gameover) {
if (_root.hulk._x >= 315) {
activeVehicle = 'hummer1';
} else {
activeVehicle = 'hummer2';
}
'hummer1';
} else {
if (_root.roundNum == 3 && !_root.gameover) {
if (_root.hulk._x >= 315) {
activeVehicle = 'tank1';
} else {
activeVehicle = 'tank2';
}
'tank1';
} else {
if (_root.roundNum >= 4 && !_root.gameover) {
if (_root.hulk._x < 315) {
activeVehicle = round4VehicleArray[currentIndex] + '2';
} else {
activeVehicle = round4VehicleArray[currentIndex] + '1';
}
currentIndex < 2 ? currentIndex++ : 0;
}
}
}
} else {
stop();
}
}
frame 40 {
_root[activeVehicle].gotoAndPlay(2);
}
frame 278 {
_root.helicopter1.gotoAndStop(1);
_root.helicopter2.gotoAndStop(1);
}
}
instance vehicleController of movieClip 450 {
onClipEvent (load) {
currentIndex = 0;
round4VehicleArray = ['helicopter', 'tank', 'hummer'];
}
}
movieClip 456 {
}
movieClip 457 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 3 {
stop();
}
}
movieClip 460 {
frame 14 {
stop();
}
}
movieClip 462 {
frame 1 {
stop();
}
frame 2 {
_parent._parent.play();
}
instance of movieClip 457 {
onClipEvent (load) {
hit = false;
}
onClipEvent (enterFrame) {
if (!_root.helpMode) {
if (!hit) {
_x = _x - _root.tankShellSpeed;
_y = _y + 1;
_rotation = _rotation + -0.15;
}
if (this.hitTest(_root.hulk.rectangle) && !hit && !_root.buildingFalling && !_root.gotoNextRound) {
hit = true;
this.nextFrame();
_root.timeMC.time.timeDisplay -= _root.tankFireDamage;
_root.timeMC.meter.gotoAndStop(_root.timeMC.time.timeDisplay + 2);
_root.timeMC.time.timeCalc();
}
}
}
}
}
movieClip 464 {
}
movieClip 466 {
frame 1 {
stop();
}
frame 2 {
_parent.stop();
}
frame 13 {
_parent.gotoAndStop(1);
stop();
}
}
movieClip 467 {
frame 1 {
stop();
extra = 8;
}
frame 72 {
stop();
}
instance tankMC of movieClip 466 {
onClipEvent (load) {
angle = (_root.hulk._y - 150 - 200) * -0.1 + _parent.extra;
}
onClipEvent (enterFrame) {
if (gun._rotation < angle) {
gun._rotation += 0.5;
} else {
gun.nextFrame();
}
}
}
instance tankMC of movieClip 466 {
onClipEvent (load) {
angle = (_root.hulk._y - 150 - 200) * -0.1 + 8;
}
onClipEvent (enterFrame) {
if (gun._rotation < angle) {
gun._rotation += 0.3;
} else {
gun.nextFrame();
}
}
}
}
instance tank2 of movieClip 467 {
}
instance of movieClip 288 {
onClipEvent (load) {
restingPoint = 300;
gravity = 4;
drag = 0.99;
bounce = 0.45;
ySpeed = 0;
explosion = new Sound();
explosion.attachSound('explosion');
explosionVolume = 100;
explosionCount = 0;
}
onClipEvent (enterFrame) {
_y = _y + ySpeed;
if (restingPoint < _y) {
_y = restingPoint;
ySpeed = -ySpeed * bounce;
if (explosionCount < 2) {
this.nextFrame();
_parent.landingCracks._visible = true;
explosionVolume -= 30;
explosion.setVolume(explosionVolume);
explosion.start();
++explosionCount;
}
}
ySpeed = ySpeed * drag + gravity;
}
}
frame 426 {
timeMC.time.play();
helpMode = false;
stop();
}
instance hulk of movieClip 396 {
onClipEvent (keyDown) {
if (!_parent.gameOver && !_parent.flexing) {
_parent.keyDownFunction();
}
updateAfterEvent();
}
onClipEvent (keyUp) {
if (!_parent.gameOver && !_parent.flexing) {
_parent.keyUpFunction();
}
updateAfterEvent();
}
onClipEvent (enterFrame) {
if (!_parent.gameOver) {
_parent.enterFrameFunction();
}
}
}
frame 427 {
helpMode = true;
timeMC.time.stop();
}
frame 458 {
bg.nextFrame();
gotoAndPlay(322);
}