Frame 1
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
copyrightNotice.separatorBefore = true;
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
_root.loadBar._width = getPercent * 100;
_root.loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.gotoAndStop("xdlogo");
}
Instance of Symbol 61 MovieClip in Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Instance of Symbol 49 MovieClip in Frame 3
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Frame 5
stop();
cam._x = 320;
cam._y = 240;
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 6
stop();
cam._x = 320;
cam._y = 240;
player.removeMovieClip();
Frame 7
stop();
cam._x = 320;
cam._y = 240;
Frame 8
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
level = 1;
mainlvlmusic = new Sound();
mainlvlmusic.attachSound("mainmusic");
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 3;
_global.allFires = 3;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox1.removeMovieClip();
phoneBox2.removeMovieClip();
phoneBox3.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.mainlvlmusic.stop();
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox1.removeMovieClip();
phoneBox2.removeMovieClip();
phoneBox3.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox1.swapDepths(_root.getNextHighestDepth());
phoneBox2.swapDepths(_root.getNextHighestDepth());
phoneBox3.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 9
stop();
if (toc < 120) {
medal.gotoAndStop("gold");
}
if ((toc > 120) && (toc < 150)) {
medal.gotoAndStop("silver");
}
if (toc > 150) {
medal.gotoAndStop("bronze");
}
level = 2;
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
mute = true;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Instance of Symbol 757 MovieClip in Frame 9
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 785 MovieClip "medal" in Frame 9
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 10
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (expB5.hitTest(endX, endY, true)) {
break;
}
if (expB6.hitTest(endX, endY, true)) {
break;
}
if (expB7.hitTest(endX, endY, true)) {
break;
}
if (expB8.hitTest(endX, endY, true)) {
break;
}
if (expB9.hitTest(endX, endY, true)) {
break;
}
if (expB10.hitTest(endX, endY, true)) {
break;
}
if (expB11.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
if (breezeB6.hitTest(endX, endY, true)) {
break;
}
if (breezeB7.hitTest(endX, endY, true)) {
break;
}
if (breezeB8.hitTest(endX, endY, true)) {
break;
}
if (breezeB9.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
player._x = 324;
player._y = 372;
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 6;
_global.allFires = 4;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, expB5, expB6, expB7, expB8, expB9, expB10, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5, breezeB6, breezeB7, breezeB8, breezeB9, breezeB10, breezeB11);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox11.removeMovieClip();
phoneBox12.removeMovieClip();
phoneBox13.removeMovieClip();
phoneBox14.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox11.removeMovieClip();
phoneBox12.removeMovieClip();
phoneBox13.removeMovieClip();
phoneBox14.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox11.swapDepths(_root.getNextHighestDepth());
phoneBox12.swapDepths(_root.getNextHighestDepth());
phoneBox13.swapDepths(_root.getNextHighestDepth());
phoneBox14.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 11
stop();
if (toc < 210) {
medal.gotoAndStop("gold");
}
if ((toc > 210) && (toc < 240)) {
medal.gotoAndStop("silver");
}
if (toc > 240) {
medal.gotoAndStop("bronze");
}
level = 3;
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
mute = true;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Instance of Symbol 757 MovieClip in Frame 11
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 785 MovieClip "medal" in Frame 11
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 12
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (expB5.hitTest(endX, endY, true)) {
break;
}
if (expB6.hitTest(endX, endY, true)) {
break;
}
if (expB7.hitTest(endX, endY, true)) {
break;
}
if (expB8.hitTest(endX, endY, true)) {
break;
}
if (expB9.hitTest(endX, endY, true)) {
break;
}
if (expB10.hitTest(endX, endY, true)) {
break;
}
if (expB11.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
if (breezeB6.hitTest(endX, endY, true)) {
break;
}
if (breezeB7.hitTest(endX, endY, true)) {
break;
}
if (breezeB8.hitTest(endX, endY, true)) {
break;
}
if (breezeB9.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
player._x = 163;
player._y = 312;
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 14;
_global.allFires = 15;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, expB5, expB6, expB7, expB8, expB9, expB10, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5, breezeB6, breezeB7, breezeB8, breezeB9, breezeB10, breezeB11);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
trace(rocks[i]);
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox31.removeMovieClip();
phoneBox32.removeMovieClip();
phoneBox33.removeMovieClip();
phoneBox34.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox31.removeMovieClip();
phoneBox32.removeMovieClip();
phoneBox33.removeMovieClip();
phoneBox34.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox31.swapDepths(_root.getNextHighestDepth());
phoneBox32.swapDepths(_root.getNextHighestDepth());
phoneBox33.swapDepths(_root.getNextHighestDepth());
phoneBox34.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 13
stop();
if (toc < 230) {
medal.gotoAndStop("gold");
}
if ((toc > 230) && (toc < 260)) {
medal.gotoAndStop("silver");
}
if (toc > 260) {
medal.gotoAndStop("bronze");
}
level = 4;
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
mute = true;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Instance of Symbol 757 MovieClip in Frame 13
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 785 MovieClip "medal" in Frame 13
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 14
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (expB5.hitTest(endX, endY, true)) {
break;
}
if (expB6.hitTest(endX, endY, true)) {
break;
}
if (expB7.hitTest(endX, endY, true)) {
break;
}
if (expB8.hitTest(endX, endY, true)) {
break;
}
if (expB9.hitTest(endX, endY, true)) {
break;
}
if (expB10.hitTest(endX, endY, true)) {
break;
}
if (expB11.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
if (breezeB6.hitTest(endX, endY, true)) {
break;
}
if (breezeB7.hitTest(endX, endY, true)) {
break;
}
if (breezeB8.hitTest(endX, endY, true)) {
break;
}
if (breezeB9.hitTest(endX, endY, true)) {
break;
}
if (breezeB10.hitTest(endX, endY, true)) {
break;
}
if (breezeB11.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
player._x = -2531.2;
player._y = 347;
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 20;
_global.allFires = 22;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, expB5, expB6, expB7, expB8, expB9, expB10, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5, breezeB6, breezeB7, breezeB8, breezeB9, breezeB10, breezeB11);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox41.removeMovieClip();
phoneBox42.removeMovieClip();
phoneBox43.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox41.removeMovieClip();
phoneBox42.removeMovieClip();
phoneBox43.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox41.swapDepths(_root.getNextHighestDepth());
phoneBox42.swapDepths(_root.getNextHighestDepth());
phoneBox43.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 15
stop();
if (toc < 220) {
medal.gotoAndStop("gold");
}
if ((toc > 220) && (toc < 250)) {
medal.gotoAndStop("silver");
}
if (toc > 250) {
medal.gotoAndStop("bronze");
}
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
level = 5;
mute = true;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Instance of Symbol 757 MovieClip in Frame 15
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 785 MovieClip "medal" in Frame 15
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 16
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (expB5.hitTest(endX, endY, true)) {
break;
}
if (expB6.hitTest(endX, endY, true)) {
break;
}
if (expB7.hitTest(endX, endY, true)) {
break;
}
if (expB8.hitTest(endX, endY, true)) {
break;
}
if (expB9.hitTest(endX, endY, true)) {
break;
}
if (expB10.hitTest(endX, endY, true)) {
break;
}
if (expB11.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
if (breezeB6.hitTest(endX, endY, true)) {
break;
}
if (breezeB7.hitTest(endX, endY, true)) {
break;
}
if (breezeB8.hitTest(endX, endY, true)) {
break;
}
if (breezeB9.hitTest(endX, endY, true)) {
break;
}
if (breezeB10.hitTest(endX, endY, true)) {
break;
}
if (breezeB11.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
player._x = 60;
player._y = 83;
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 13;
_global.allFires = 6;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, expB5, expB6, expB7, expB8, expB9, expB10, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5, breezeB6, breezeB7, breezeB8, breezeB9, breezeB10, breezeB11);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox51.removeMovieClip();
phoneBox52.removeMovieClip();
phoneBox53.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox51.removeMovieClip();
phoneBox52.removeMovieClip();
phoneBox53.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox51.swapDepths(_root.getNextHighestDepth());
phoneBox52.swapDepths(_root.getNextHighestDepth());
phoneBox53.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 17
stop();
if (toc < 135) {
medal.gotoAndStop("gold");
}
if ((toc > 135) && (toc < 165)) {
medal.gotoAndStop("silver");
}
if (toc > 165) {
medal.gotoAndStop("bronze");
}
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
level = 6;
mute = true;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Instance of Symbol 757 MovieClip in Frame 17
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 785 MovieClip "medal" in Frame 17
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 18
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (expB5.hitTest(endX, endY, true)) {
break;
}
if (expB6.hitTest(endX, endY, true)) {
break;
}
if (expB7.hitTest(endX, endY, true)) {
break;
}
if (expB8.hitTest(endX, endY, true)) {
break;
}
if (expB9.hitTest(endX, endY, true)) {
break;
}
if (expB10.hitTest(endX, endY, true)) {
break;
}
if (expB11.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
if (breezeB6.hitTest(endX, endY, true)) {
break;
}
if (breezeB7.hitTest(endX, endY, true)) {
break;
}
if (breezeB8.hitTest(endX, endY, true)) {
break;
}
if (breezeB9.hitTest(endX, endY, true)) {
break;
}
if (breezeB10.hitTest(endX, endY, true)) {
break;
}
if (breezeB11.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
player._x = 25;
player._y = 42;
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 15;
_global.allFires = 16;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, expB5, expB6, expB7, expB8, expB9, expB10, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5, breezeB6, breezeB7, breezeB8, breezeB9, breezeB10, breezeB11);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox61.removeMovieClip();
phoneBox62.removeMovieClip();
phoneBox63.removeMovieClip();
phoneBox64.removeMovieClip();
phoneBox65.removeMovieClip();
phoneBox66.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox61.removeMovieClip();
phoneBox62.removeMovieClip();
phoneBox63.removeMovieClip();
phoneBox64.removeMovieClip();
phoneBox65.removeMovieClip();
phoneBox66.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox61.swapDepths(_root.getNextHighestDepth());
phoneBox62.swapDepths(_root.getNextHighestDepth());
phoneBox63.swapDepths(_root.getNextHighestDepth());
phoneBox64.swapDepths(_root.getNextHighestDepth());
phoneBox65.swapDepths(_root.getNextHighestDepth());
phoneBox66.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 19
stop();
if (toc < 200) {
medal.gotoAndStop("gold");
}
if ((toc > 200) && (toc < 230)) {
medal.gotoAndStop("silver");
}
if (toc > 230) {
medal.gotoAndStop("bronze");
}
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
level = 7;
mute = true;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Instance of Symbol 757 MovieClip in Frame 19
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut) {
this.gotoAndStop(1);
}
Instance of Symbol 785 MovieClip "medal" in Frame 19
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 20
function fireWeapon() {
updateLaser();
}
function stopWeapon() {
laser_mc.clear();
}
function updateLaser() {
realDist = 0;
while (realDist < maxDist) {
if (player._xscale == 100) {
endX = player._x + (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (player._xscale == -100) {
endX = player._x - (Math.cos(player._rotation * rad) * realDist);
endY = player._y - 6;
}
if (ground.hitTest(endX, endY, true)) {
break;
}
if (expB1.hitTest(endX, endY, true)) {
break;
}
if (expB2.hitTest(endX, endY, true)) {
break;
}
if (expB3.hitTest(endX, endY, true)) {
break;
}
if (expB4.hitTest(endX, endY, true)) {
break;
}
if (expB5.hitTest(endX, endY, true)) {
break;
}
if (expB6.hitTest(endX, endY, true)) {
break;
}
if (expB7.hitTest(endX, endY, true)) {
break;
}
if (expB8.hitTest(endX, endY, true)) {
break;
}
if (expB9.hitTest(endX, endY, true)) {
break;
}
if (expB10.hitTest(endX, endY, true)) {
break;
}
if (expB11.hitTest(endX, endY, true)) {
break;
}
if (breezeB1.hitTest(endX, endY, true)) {
break;
}
if (breezeB2.hitTest(endX, endY, true)) {
break;
}
if (breezeB3.hitTest(endX, endY, true)) {
break;
}
if (breezeB4.hitTest(endX, endY, true)) {
break;
}
if (breezeB5.hitTest(endX, endY, true)) {
break;
}
if (breezeB6.hitTest(endX, endY, true)) {
break;
}
if (breezeB7.hitTest(endX, endY, true)) {
break;
}
if (breezeB8.hitTest(endX, endY, true)) {
break;
}
if (breezeB9.hitTest(endX, endY, true)) {
break;
}
if (breezeB10.hitTest(endX, endY, true)) {
break;
}
if (breezeB11.hitTest(endX, endY, true)) {
break;
}
realDist = realDist + accuracy;
}
if (player._xscale == 100) {
startX = player._x + 7;
startY = player._y - 6;
}
if (player._xscale == -100) {
startX = player._x - 7;
startY = player._y - 6;
}
laser_mc.clear();
laser_mc.lineStyle(2, 16711680, 75);
laser_mc.moveTo(startX, startY);
laser_mc.lineTo(endX, endY);
randomNumber++;
spark_mc = _root.attachMovie("spark", "spark", _root.getNextHighestDepth(), {_x:endX, _y:endY});
}
stop();
tic = 0;
toc = 0;
player._x = 49;
player._y = 208;
mainlvlmusic.start(0, 1000);
jumpsnd = new Sound();
jumpsnd.attachSound("jump");
changesnd = new Sound();
changesnd.attachSound("change");
blowsnd = new Sound();
blowsnd.attachSound("blow");
beamsnd = new Sound();
beamsnd.attachSound("beam");
rescuesnd = new Sound();
rescuesnd.attachSound("rescue");
dashsnd = new Sound();
dashsnd.attachSound("dash");
herohitsnd = new Sound();
herohitsnd.attachSound("herohit");
losepowersnd = new Sound();
losepowersnd.attachSound("losepower");
_global.heartsLost = 5;
cam.people = 10;
_global.allFires = 10;
cam.baddies = 0;
exitActive = false;
ranDomNumber++;
_global.rocks = new Array();
_global.rocks.push(expB1, expB2, expB3, expB4, expB5, expB6, expB7, expB8, expB9, expB10, breezeB1, breezeB2, breezeB3, breezeB4, breezeB5, breezeB6, breezeB7, breezeB8, breezeB9, breezeB10, breezeB11);
var maxDist = 400;
var accuracy = 1;
var dx;
var dy;
var startX;
var startY;
var endX;
var endY;
var realDist;
var rad = (Math.PI/180);
var rad2 = 57.2957795130823;
createEmptyMovieClip("laser_mc", _root.getNextHighestDepth());
var glow = (new flash.filters.GlowFilter());
glow.color = 16583435 /* 0xFD0B0B */;
glow.alpha = 1;
glow.blurX = 4;
glow.blurY = 4;
glow.quality = 2;
laser_mc.filters = new Array(glow);
onEnterFrame = function () {
cam.lvltimer.text = toc;
tic++;
if (tic == 32) {
toc++;
tic = 0;
}
cam.ftxt.text = _global.allFires;
cam._x = player._x;
cam._y = player._y;
cam.camControl();
if (_global.allFires < 0) {
_global.allFires = 0;
}
if (_global.fireBeam) {
fireWeapon();
}
if (!_global.fireBeam) {
stopWeapon();
}
if (((cam.people == 0) && (_global.allFires == 0)) && (cam.baddies == 0)) {
_root.exit.gotoAndStop("active");
exitActive = true;
} else {
_root.exit.gotoAndStop("inactive");
}
if (_global.heartsLost == 5) {
cam.health.gotoAndStop("5hearts");
}
if (_global.heartsLost == 4) {
cam.health.gotoAndStop("4hearts");
}
if (_global.heartsLost == 3) {
cam.health.gotoAndStop("3hearts");
}
if (_global.heartsLost == 2) {
cam.health.gotoAndStop("2hearts");
}
if (_global.heartsLost == 1) {
cam.health.gotoAndStop("1heart");
}
if (_global.heartsLost == 0) {
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
cam.health.gotoAndStop("0hearts");
_root.gotoAndStop("gameover");
phoneBox71.removeMovieClip();
phoneBox72.removeMovieClip();
phoneBox73.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
if (player.hitTest(exit) && (exitActive == true)) {
_root.exit.gotoAndStop("entered");
_root.nextFrame();
exitActive = false;
playerHit = false;
invulnerable = false;
_global.xaccel = 0;
gravity = 0;
player._alpha = 0;
phoneBox71.removeMovieClip();
phoneBox72.removeMovieClip();
phoneBox73.removeMovieClip();
i = rocks.length - 1;
while (i >= 0) {
rocks[i].removeMovieClip();
rocks.splice(i, 1);
i--;
}
}
player.swapDepths(_root.getNextHighestDepth());
phoneBox71.swapDepths(_root.getNextHighestDepth());
phoneBox72.swapDepths(_root.getNextHighestDepth());
phoneBox73.swapDepths(_root.getNextHighestDepth());
};
mute = false;
Muted.onEnterFrame = function () {
if (muted == true) {
cam.main_music.gotoAndStop("stop");
} else {
cam.main_music.gotoAndStop("play");
}
};
var volumeOn = true;
var globalVolume = new Sound();
cam.main_music.onRelease = function () {
if (volumeOn && (mute == false)) {
globalVolume.setVolume(0);
cam.main_music.gotoAndStop("stop");
mute = true;
} else {
globalVolume.setVolume(100);
cam.main_music.gotoAndStop("play");
mute = false;
}
};
Muted();
Frame 21
stop();
max_but.onRollOver = function () {
this.gotoAndStop("over");
};
max_but.onRollOut = function () {
this.gotoAndStop("off");
};
max_but.onRelease = function () {
getURL ("http://www.MaxGames.com", "_blank");
};
if (toc < 155) {
medal.gotoAndStop("gold");
}
if ((toc > 155) && (toc < 185)) {
medal.gotoAndStop("silver");
}
if (toc > 185) {
medal.gotoAndStop("bronze");
}
cam._x = 320;
cam._y = 240;
mainlvlmusic.stop();
player.removeMovieClip();
Instance of Symbol 785 MovieClip "medal" in Frame 21
on (release) {
_root.medal.gotoAndStop("blank");
}
Frame 22
stop();
cam._x = 320;
cam._y = 240;
player.removeMovieClip();
_root.mainlvlmusic.stop();
max_but.onRollOver = function () {
this.gotoAndStop("over");
};
max_but.onRollOut = function () {
this.gotoAndStop("off");
};
max_but.onRelease = function () {
getURL ("http://www.MaxGames.com", "_blank");
};
try_again.onRollOver = function () {
this.gotoAndStop("over");
};
try_again.onRollOut = function () {
this.gotoAndStop("off");
};
try_again.onRelease = function () {
if (level == 1) {
gotoAndStop ("tutorial");
}
if (level == 2) {
gotoAndStop ("lvl1");
}
if (level == 3) {
gotoAndStop ("lvl2");
}
if (level == 4) {
gotoAndStop ("lvl3");
}
if (level == 5) {
gotoAndStop ("lvl4");
}
if (level == 6) {
gotoAndStop ("lvl5");
}
if (level == 7) {
gotoAndStop ("lvl6");
}
};
Frame 23
stop();
mainlvlmusic.stop();
Symbol 11 MovieClip [dashShadow] Frame 100
this.removeMovieClip();
Symbol 25 MovieClip [spark] Frame 1
_rotation = (360 / Math.ceil(Math.random() * 4));
Symbol 25 MovieClip [spark] Frame 11
this.removeMovieClip();
Symbol 41 MovieClip Frame 37
stop();
Symbol 69 MovieClip Frame 120
stop();
Symbol 105 MovieClip Frame 1
_root.stop();
Symbol 105 MovieClip Frame 186
_root.play();
Symbol 118 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.heroMode)) {
gotoAndStop ("rescued");
_root.cam.people--;
_root.rescuesnd.start(0, 0);
}
};
Symbol 118 MovieClip Frame 5
gotoAndPlay (1);
Symbol 118 MovieClip Frame 6
this.removeMovieClip;
gotoAndStop.nextFrame();
Symbol 118 MovieClip Frame 7
stop();
Symbol 120 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.heroMode)) {
gotoAndStop ("rescued");
_root.cam.people--;
_root.rescuesnd.start(0, 0);
}
};
Symbol 120 MovieClip Frame 5
gotoAndPlay (1);
Symbol 120 MovieClip Frame 6
this.removeMovieClip;
gotoAndStop.nextFrame();
Symbol 120 MovieClip Frame 7
stop();
Symbol 122 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.heroMode)) {
gotoAndStop ("rescued");
_root.cam.people--;
_root.rescuesnd.start(0, 0);
}
};
Symbol 122 MovieClip Frame 5
gotoAndPlay (1);
Symbol 122 MovieClip Frame 6
this.removeMovieClip;
gotoAndStop.nextFrame();
Symbol 122 MovieClip Frame 7
stop();
Symbol 146 MovieClip Frame 19
stop();
Symbol 147 MovieClip [sonicBoom] Frame 19
this.removeMovieClip();
Symbol 155 MovieClip Frame 1
shrink = false;
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.breath)) {
shrink = true;
}
if (((!_global.invulnerable) && (this.hitTest(_root.player))) && (!_global.breath)) {
_global.playerHit = true;
_root.herohitsnd.start(0, 0);
}
if (shrink) {
this._xscale = this._xscale - 5;
this._yscale = this._yscale - 5;
}
if (this._xscale < 1) {
gotoAndStop ("gone");
}
};
Symbol 155 MovieClip Frame 14
gotoAndPlay (1);
Symbol 155 MovieClip Frame 15
_global.allFires--;
Symbol 163 MovieClip Frame 1
shrink = false;
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.breath)) {
shrink = true;
}
if (((!_global.invulnerable) && (this.hitTest(_root.player))) && (!_global.breath)) {
_global.playerHit = true;
_root.herohitsnd.start(0, 0);
}
if (shrink) {
this._xscale = this._xscale - 5;
this._yscale = this._yscale - 5;
}
if (this._xscale < 1) {
gotoAndStop ("gone");
}
};
Symbol 163 MovieClip Frame 14
gotoAndPlay (1);
Symbol 163 MovieClip Frame 15
_global.allFires--;
Symbol 169 MovieClip Frame 1
shrink = false;
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.breath)) {
shrink = true;
}
if (((!_global.invulnerable) && (this.hitTest(_root.player))) && (!_global.breath)) {
_global.playerHit = true;
_root.herohitsnd.start(0, 0);
}
if (shrink) {
this._xscale = this._xscale - 5;
this._yscale = this._yscale - 5;
}
if (this._xscale < 1) {
gotoAndStop ("gone");
}
};
Symbol 169 MovieClip Frame 10
gotoAndPlay (1);
Symbol 169 MovieClip Frame 11
_global.allFires--;
Symbol 200 MovieClip Frame 10
gotoAndStop (1);
Symbol 201 MovieClip Frame 1
changing = 0;
stop();
onEnterFrame = function () {
if (!_root.player.hitTest(this)) {
changing = 0;
this.lightburst.gotoAndStop(1);
}
if (_root.player.hitTest(this)) {
if (_global.heroMode) {
if (changing == 0) {
changing = 1;
_global.heroMode = false;
_root.cam.health.hudswitch.gotoAndStop("norm");
this.lightburst.gotoAndPlay(1);
_root.changesnd.start(0, 0);
}
}
if (!_global.heroMode) {
if (changing == 0) {
changing = 1;
_global.heroMode = true;
_root.cam.health.hudswitch.gotoAndStop("super");
this.lightburst.gotoAndPlay(1);
_root.changesnd.start(0, 0);
}
}
}
};
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 5
stop();
Symbol 250 MovieClip Frame 10
stop();
Symbol 250 MovieClip Frame 15
stop();
Symbol 250 MovieClip Frame 20
stop();
Symbol 250 MovieClip Frame 25
stop();
Symbol 250 MovieClip Frame 30
stop();
Symbol 250 MovieClip Frame 36
stop();
Symbol 276 MovieClip Frame 1
play();
Symbol 276 MovieClip Frame 16
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 5
stop();
Symbol 284 MovieClip Frame 1
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
if (_global.heroMode) {
_global.heroMode = false;
_root.cam.health.hudswitch.gotoAndStop("norm");
_root.losepowersnd.start(0, 0);
}
}
};
Symbol 290 MovieClip Frame 1
shrink = false;
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.breath)) {
shrink = true;
}
if (((!_global.invulnerable) && (this.hitTest(_root.player))) && (!_global.breath)) {
_global.playerHit = true;
_root.herohitsnd.start(0, 0);
}
if (shrink) {
this._xscale = this._xscale - 5;
this._yscale = this._yscale - 5;
}
if (this._xscale < 1) {
gotoAndStop ("gone");
}
};
Symbol 290 MovieClip Frame 10
gotoAndPlay (1);
Symbol 290 MovieClip Frame 11
_global.allFires--;
Symbol 292 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.heroMode)) {
gotoAndStop ("rescued");
_root.cam.people--;
_root.rescuesnd.start(0, 0);
}
};
Symbol 292 MovieClip Frame 5
gotoAndPlay (1);
Symbol 292 MovieClip Frame 6
this.removeMovieClip;
gotoAndStop.nextFrame();
Symbol 292 MovieClip Frame 7
stop();
Symbol 300 MovieClip Frame 1
onEnterFrame = function () {
if (((!_global.invulnerable) && (this.hitTest(_root.player))) && (!_global.breath)) {
_global.playerHit = true;
_root.herohitsnd.start(0, 0);
}
};
Symbol 300 MovieClip Frame 14
gotoAndPlay (1);
Symbol 300 MovieClip Frame 15
_global.allFires--;
Symbol 308 MovieClip Frame 1
shrink = false;
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.breath)) {
shrink = true;
}
if (((!_global.invulnerable) && (this.hitTest(_root.player))) && (!_global.breath)) {
_global.playerHit = true;
_root.herohitsnd.start(0, 0);
}
if (shrink) {
this._xscale = this._xscale - 5;
this._yscale = this._yscale - 5;
}
if (this._xscale < 1) {
gotoAndStop ("gone");
}
};
Symbol 308 MovieClip Frame 14
gotoAndPlay (1);
Symbol 308 MovieClip Frame 15
_global.allFires--;
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 2
stop();
Symbol 340 MovieClip Frame 1
stop();
Instance of Symbol 61 MovieClip in Symbol 340 MovieClip Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Symbol 345 Button
on (release) {
_root.gotoAndStop("credits");
}
Symbol 347 MovieClip Frame 50
start_but.onRollOver = function () {
this.gotoAndStop("over");
};
start_but.onRollOut = function () {
this.gotoAndStop("off");
};
start_but.onRelease = function () {
_root.gotoAndStop("intro");
};
Symbol 347 MovieClip Frame 90
start_but.onRollOver = function () {
this.gotoAndStop("over");
};
start_but.onRollOut = function () {
this.gotoAndStop("off");
};
start_but.onRelease = function () {
_root.gotoAndStop("intro");
};
max_but.onRollOver = function () {
this.gotoAndStop("over");
};
max_but.onRollOut = function () {
this.gotoAndStop("off");
};
max_but.onRelease = function () {
getURL ("http://www.MaxGames.com", "_blank");
};
Symbol 347 MovieClip Frame 120
stop();
Symbol 370 MovieClip Frame 10
stop();
Symbol 371 MovieClip Frame 1
stop();
mute = false;
Symbol 371 MovieClip Frame 6
mute = true;
Symbol 372 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
stop();
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
camControl();
Instance of Symbol 385 MovieClip in Symbol 435 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Instance of Symbol 61 MovieClip in Symbol 435 MovieClip Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Symbol 435 MovieClip Frame 1550
_root.gotoAndStop("map1");
stop();
Symbol 475 MovieClip Frame 40
stop();
Symbol 477 MovieClip Frame 189
stop();
_root.gotoAndStop("tutorial");
Symbol 488 MovieClip Frame 4
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 1
beamOnce = 0;
blowOnce = 0;
HitOnce = 0;
_global.playerHit = false;
playerHitTimer = 0;
_global.invulnerable = false;
invulnerableTimer = 0;
randomNumber = 0;
running = false;
_global.heroMode = false;
flying = false;
gravity = 0;
gravityaccel = 0.7;
_global.xaccel = 0;
yaccel = 0;
runaccelamt = 0.3;
friction = 1.1;
airrisist = 0.1;
maxaccel = 5;
maxjump = 7;
releaseBeam = 0;
rotateHero = 0;
pressedD = 0;
jump = true;
_global.punch = false;
_global.breath = false;
readyToFly = false;
pressOnce = 0;
hit2 = false;
hit3 = false;
hit4 = false;
hit5 = false;
canSlide = true;
sliding = false;
slidingTimer = 0;
slidingRight = false;
slidingLeft = false;
slidingUp = false;
slidingDown = false;
blinking = false;
goUp = false;
goDown = true;
_global.fireBeam = false;
onEnterFrame = function () {
if (blinking) {
if (goDown) {
this._alpha = this._alpha - 5;
}
if (goUp) {
this._alpha = this._alpha + 5;
}
if (this._alpha < 11) {
goDown = false;
goUp = true;
}
if (this._alpha > 99) {
goDown = true;
goUp = false;
}
}
if (_global.playerHit && (_global.heroMode)) {
blinking = true;
this.gotoAndStop("heroHit");
playerHitTimer++;
_global.invulnerable = true;
if (playerHitTimer == 15) {
playerHitTimer = 0;
_global.heartsLost--;
_global.playerHit = false;
}
}
if (_global.playerHit && (!_global.heroMode)) {
blinking = true;
this.gotoAndStop("hit");
playerHitTimer++;
_global.invulnerable = true;
if (playerHitTimer == 15) {
playerHitTimer = 0;
HitOnce++;
_global.heartsLost--;
_global.playerHit = false;
}
}
if (_global.invulnerable) {
invulnerableTimer++;
if (invulnerableTimer == 75) {
blinking = false;
goUp = false;
goDown = true;
_global.invulnerable = false;
invulnerableTimer = 0;
this._alpha = 100;
}
}
if (HitOnce == 1) {
HitOnce = 0;
}
if (this.punchMovieClip._currentframe > 15) {
_global.punch = false;
}
if ((!_global.heroMode) && (!_global.playerHit)) {
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("run");
} else {
this.gotoAndStop("idle");
}
} else {
this.gotoAndStop("jump");
}
}
if (_global.heroMode) {
if (sliding) {
if (!_global.playerHit) {
this.gotoAndStop("slide");
}
randomNumber++;
_root.dashShadow_mc = _root.attachMovie("dashShadow", "dashShadow" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
_root.dashShadow_mc._xscale = this._xscale;
if (this._xscale == -100) {
if (slidingUp) {
_root.dashShadow_mc._rotation = 90;
}
if (slidingDown) {
_root.dashShadow_mc._rotation = -90;
}
}
if (this._xscale == 100) {
if (slidingUp) {
_root.dashShadow_mc._rotation = -90;
}
if (slidingDown) {
_root.dashShadow_mc._rotation = 90;
}
}
if (slidingTimer == 0) {
randomNumber++;
_root.sonicBoom_mc = _root.attachMovie("sonicBoom", "sonicBoom" + randomNumber, _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
if (slidingLeft) {
_root.sonicBoom_mc._xscale = -100;
_root.dashsnd.start(0, 0);
}
if (slidingRight) {
_root.sonicBoom_mc._xscale = 100;
_root.dashsnd.start(0, 0);
}
if (this._xscale == -100) {
if (slidingUp) {
_root.sonicBoom_mc._rotation = 90;
_root.dashsnd.start(0, 0);
}
if (slidingDown) {
_root.sonicBoom_mc._rotation = -90;
_root.dashsnd.start(0, 0);
}
}
if (this._xscale == 100) {
if (slidingUp) {
_root.sonicBoom_mc._rotation = -90;
_root.dashsnd.start(0, 0);
}
if (slidingDown) {
_root.sonicBoom_mc._rotation = 90;
_root.dashsnd.start(0, 0);
}
}
}
slidingTimer++;
if (slidingRight) {
_global.xaccel = 7;
}
if (slidingLeft) {
_global.xaccel = -7;
}
if (slidingUp) {
yaccel = -7;
}
if (slidingDown) {
yaccel = 7;
}
if (slidingTimer == 12) {
canSlide = true;
sliding = false;
slidingTimer = 0;
}
}
if (((canSlide && (!_global.breath)) && (!_global.fireBeam)) && (!_global.punch)) {
if (Key.isDown(39) && (!hit2)) {
hit2 = true;
if (lastPressA && ((getTimer() - lastPressA) < 250)) {
sliding = true;
slidingUp = false;
slidingDown = false;
slidingRight = true;
slidingLeft = false;
canSlide = false;
}
lastPressA = getTimer();
} else if (!Key.isDown(39)) {
hit2 = false;
}
if (Key.isDown(37) && (!hit3)) {
hit3 = true;
if (lastPressB && ((getTimer() - lastPressB) < 250)) {
sliding = true;
slidingUp = false;
slidingDown = false;
slidingRight = false;
slidingLeft = true;
canSlide = false;
}
lastPressB = getTimer();
} else if (!Key.isDown(37)) {
hit3 = false;
}
if (Key.isDown(38) && (!hit4)) {
hit4 = true;
if (lastPressC && ((getTimer() - lastPressC) < 250)) {
sliding = true;
slidingUp = true;
slidingDown = false;
slidingRight = false;
slidingLeft = false;
canSlide = false;
}
lastPressC = getTimer();
} else if (!Key.isDown(38)) {
hit4 = false;
}
if (Key.isDown(40) && (!hit5)) {
hit5 = true;
if (lastPressD && ((getTimer() - lastPressD) < 250)) {
sliding = true;
slidingUp = false;
slidingDown = true;
slidingRight = false;
slidingLeft = false;
canSlide = false;
}
lastPressD = getTimer();
} else if (!Key.isDown(40)) {
hit5 = false;
}
}
if (!sliding) {
if ((Key.isDown(68) && (!_global.breath)) && (!_global.fireBeam)) {
_global.punch = true;
}
if ((Key.isDown(83) && (!_global.breath)) && (!_global.punch)) {
_global.fireBeam = true;
}
if (!Key.isDown(83)) {
_global.fireBeam = false;
}
if ((Key.isDown(65) && (!_global.fireBeam)) && (!_global.punch)) {
_global.breath = true;
}
if (!Key.isDown(65)) {
_global.breath = false;
}
if (((_global.punch && (!_global.fireBeam)) && (!_global.breath)) && (!_global.playerHit)) {
this.gotoAndStop("punch");
}
if (((_global.breath && (!_global.fireBeam)) && (!_global.punch)) && (!_global.playerHit)) {
this.gotoAndStop("breath");
blowOnce++;
}
if (blowOnce == 6) {
_root.blowsnd.start(0, 0);
blowOnce = 0;
}
if (((_global.fireBeam && (!_global.breath)) && (!_global.punch)) && (!_global.playerHit)) {
this.gotoAndStop("heatVision");
beamOnce++;
}
if (beamOnce == 6) {
_root.beamsnd.start(0, 0);
beamOnce = 0;
}
if ((((flying && (!_global.fireBeam)) && (!_global.breath)) && (!_global.punch)) && (!_global.playerHit)) {
this.gotoAndStop("fly");
}
if (((((!flying) && (!_global.fireBeam)) && (!_global.breath)) && (!_global.punch)) && (!_global.playerHit)) {
if (jump && (!doubleJumping)) {
if (running) {
this.gotoAndStop("heroRun");
} else {
this.gotoAndStop("heroIdle");
}
} else {
this.gotoAndStop("heroJump");
}
}
}
}
if (Key.isDown(39) or Key.isDown(37)) {
running = true;
} else {
running = false;
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
flying = false;
jump = true;
yaccel = 0;
readyToFly = false;
grounded = true;
falling = false;
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (!flying) {
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
}
if (flying) {
if (yaccel > maxaccel) {
yaccel = maxaccel;
}
if (yaccel < (-maxaccel)) {
yaccel = -maxaccel;
}
if (Key.isDown(38)) {
yaccel = yaccel - ((runaccelamt - airrisist) * 2);
}
if (Key.isDown(40)) {
yaccel = yaccel + ((runaccelamt - airrisist) * 2);
}
}
if ((Key.isDown(39) && (_global.xaccel < maxaccel)) && (falling == true)) {
_global.xaccel = _global.xaccel + (runaccelamt - airrisist);
} else if ((Key.isDown(37) && (_global.xaccel > (-maxaccel))) && (falling == true)) {
_global.xaccel = _global.xaccel - (runaccelamt - airrisist);
} else if ((Key.isDown(37) && (_global.xaccel > (-maxaccel))) && (falling == false)) {
_global.xaccel = _global.xaccel - runaccelamt;
} else if ((Key.isDown(39) && (_global.xaccel < maxaccel)) && (falling == false)) {
_global.xaccel = _global.xaccel + runaccelamt;
} else if (grounded == true) {
if (_global.xaccel > 0) {
_global.xaccel = _global.xaccel - friction;
}
if (_global.xaccel < 0) {
_global.xaccel = _global.xaccel + friction;
}
if ((_global.xaccel < 0) && (_global.xaccel > friction)) {
_global.xaccel = 0;
}
if ((_global.xaccel > 0) && (_global.xaccel < friction)) {
_global.xaccel = 0;
}
} else {
if (_global.xaccel > 0) {
_global.xaccel = _global.xaccel - airrisist;
}
if (_global.xaccel < 0) {
_global.xaccel = _global.xaccel + airrisist;
}
if ((_global.xaccel < 0) && (_global.xaccel > airrisist)) {
_global.xaccel = 0;
}
if ((_global.xaccel > 0) && (_global.xaccel < airrisist)) {
_global.xaccel = 0;
}
}
if (_root.ground.hitTest(this._x, this._y - 11, true)) {
gravity = 1;
while (_root.ground.hitTest(this._x, this._y - 10, true)) {
yaccel = 0;
canSlide = true;
sliding = false;
slidingTimer = 0;
this._y++;
}
}
if (_global.xaccel > 0) {
this._xscale = 100;
}
if (_global.xaccel < 0) {
this._xscale = -100;
}
if (!Key.isDown(38)) {
pressOnce = 0;
}
if (Key.isDown(38) && (jump)) {
gravity = gravity - (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * maxjump);
jump = false;
pressOnce = 1;
readyToFly = true;
_root.jumpsnd.start(0, 0);
}
if (((_global.heroMode && (Key.isDown(38))) && (readyToFly == true)) && (pressOnce == 0)) {
flying = true;
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 7);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 7);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 7);
i = _global.rocks.length - 1;
while (i >= 0) {
if (_global.rocks[i].hitTest(this._x, this._y + 11, true)) {
flying = false;
jump = true;
yaccel = 0;
readyToFly = false;
grounded = true;
falling = false;
while (_global.rocks[i].hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (_global.rocks[i].hitTest(leftx, lefty, true)) {
_global.xaccel = 0;
canSlide = true;
sliding = false;
slidingTimer = 0;
this._x++;
}
if (_global.rocks[i].hitTest(rightx, righty, true)) {
_global.xaccel = 0;
canSlide = true;
sliding = false;
slidingTimer = 0;
this._x--;
}
i--;
}
if (_root.ground.hitTest(leftx, lefty, true)) {
_global.xaccel = 0;
canSlide = true;
sliding = false;
slidingTimer = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
_global.xaccel = 0;
canSlide = true;
sliding = false;
slidingTimer = 0;
this._x--;
}
if (!flying) {
this._y = this._y + gravity;
}
if (flying) {
this._y = this._y + yaccel;
}
if (!_global.heroMode) {
if (flying) {
flying = false;
}
if (_global.fireBeam) {
_global.fireBeam = false;
}
}
this._x = this._x + _global.xaccel;
};
Symbol 507 MovieClip Frame 2
stop();
Symbol 507 MovieClip Frame 6
stop();
Symbol 510 MovieClip Frame 1
gravity = 0;
gravityaccel = 0.2;
runaccelamt = 0.3;
friction = 0.5;
airrisist = 0.05;
xaccel = 0;
maxaccel = 5;
onEnterFrame = function () {
if (this.hitTest(_root.player)) {
if (_global.heroMode) {
if (this._x < _root.player._x) {
xaccel = (_global.xaccel - (runaccelamt - airrisist)) - 1;
} else {
xaccel = (_global.xaccel + (runaccelamt - airrisist)) + 1;
}
}
}
if (!_root.ground.hitTest(this._x, this._y + 10, true)) {
falling = true;
grounded = false;
}
if (_root.ground.hitTest(this._x, this._y + 11, true)) {
grounded = true;
falling = false;
while (_root.ground.hitTest(this._x, this._y + 9, true)) {
this._y--;
}
}
if (falling == true) {
gravity = gravity + gravityaccel;
} else {
gravity = 0;
}
if (_root.ground.hitTest(this._x, this._y - 11, true)) {
gravity = 1;
while (_root.ground.hitTest(this._x, this._y - 10, true)) {
this._y++;
}
}
if (grounded == true) {
if (xaccel > 0) {
xaccel = xaccel - friction;
}
if (xaccel < 0) {
xaccel = xaccel + friction;
}
if ((xaccel < 0) && (xaccel > friction)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < friction)) {
xaccel = 0;
}
} else {
if (xaccel > 0) {
xaccel = xaccel - airrisist;
}
if (xaccel < 0) {
xaccel = xaccel + airrisist;
}
if ((xaccel < 0) && (xaccel > airrisist)) {
xaccel = 0;
}
if ((xaccel > 0) && (xaccel < airrisist)) {
xaccel = 0;
}
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 38);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 38);
if (_root.ground.hitTest(leftx, lefty, true)) {
xaccel = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
xaccel = 0;
this._x--;
}
this._y = this._y + gravity;
this._x = this._x + xaccel;
};
Symbol 526 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 536 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 542 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 546 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 556 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 583 MovieClip Frame 21
stop();
Symbol 584 MovieClip Frame 1
stop();
health = 100;
onEnterFrame = function () {
if (this.hitTest(_root.laser_mc)) {
health = health - 2;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:500, gb:0, bb:0};
myColor.setTransform(myColorTransform);
} else {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
if (health < 1) {
gotoAndStop ("boom");
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 38);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 38);
if (_root.ground.hitTest(leftx, lefty, true)) {
xaccel = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
xaccel = 0;
this._x--;
}
};
Symbol 607 MovieClip Frame 21
stop();
Symbol 608 MovieClip Frame 1
stop();
frozen = 0;
onEnterFrame = function () {
if (this.hitTest(_root.player) && (_global.breath)) {
frozen = frozen + 5;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:frozen};
myColor.setTransform(myColorTransform);
}
if (frozen > 100) {
gotoAndStop ("frozen");
}
};
Symbol 608 MovieClip Frame 2
stop();
onEnterFrame = function () {
if ((this.hitTest(_root.player) && (_global.punch)) && (!_global.breath)) {
gotoAndStop ("shatter");
}
};
Symbol 615 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 619 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 627 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 632 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
this.gotoAndStop("display");
}
if (!_root.player.hitTest(this)) {
this.gotoAndStop("hide");
}
};
Symbol 633 MovieClip Frame 1
stop();
health = 100;
onEnterFrame = function () {
if (this.hitTest(_root.laser_mc)) {
health = health - 2;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:500, gb:0, bb:0};
myColor.setTransform(myColorTransform);
} else {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
if (health < 1) {
gotoAndStop ("boom");
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 38);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 38);
if (_root.ground.hitTest(leftx, lefty, true)) {
xaccel = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
xaccel = 0;
this._x--;
}
};
Symbol 715 MovieClip Frame 141
stop();
Symbol 726 MovieClip Frame 1
stop();
Symbol 726 MovieClip Frame 2
stop();
Symbol 731 MovieClip Frame 1
stop();
Symbol 731 MovieClip Frame 2
stop();
Symbol 731 MovieClip Frame 3
stop();
Symbol 731 MovieClip Frame 4
stop();
Symbol 731 MovieClip Frame 5
stop();
Symbol 731 MovieClip Frame 6
stop();
Symbol 735 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local3 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local3);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local3;
_parent._yscale = 100 * _local4;
}
stop();
this._visible = true;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
camControl();
Instance of Symbol 61 MovieClip in Symbol 735 MovieClip Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Symbol 745 MovieClip Frame 41
stop();
Instance of Symbol 751 MovieClip in Symbol 752 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Symbol 757 MovieClip Frame 1
stop();
Instance of Symbol 61 MovieClip in Symbol 757 MovieClip Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Symbol 818 MovieClip Frame 1
onEnterFrame = function () {
if (_root.player.hitTest(this)) {
_global.heartsLost = 0;
}
};
Symbol 820 MovieClip Frame 1
stop();
health = 100;
onEnterFrame = function () {
if (this.hitTest(_root.laser_mc)) {
health = health - 2;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:500, gb:0, bb:0};
myColor.setTransform(myColorTransform);
} else {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
if (health < 1) {
gotoAndStop ("boom");
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 38);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 38);
if (_root.ground.hitTest(leftx, lefty, true)) {
xaccel = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
xaccel = 0;
this._x--;
}
};
Instance of Symbol 751 MovieClip in Symbol 828 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Symbol 833 MovieClip Frame 1
stop();
health = 100;
onEnterFrame = function () {
if (this.hitTest(_root.laser_mc)) {
health = health - 2;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:500, gb:0, bb:0};
myColor.setTransform(myColorTransform);
} else {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
if (health < 1) {
gotoAndStop ("boom");
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 38);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 38);
if (_root.ground.hitTest(leftx, lefty, true)) {
xaccel = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
xaccel = 0;
this._x--;
}
};
Symbol 834 MovieClip Frame 1
stop();
health = 100;
onEnterFrame = function () {
if (this.hitTest(_root.laser_mc)) {
health = health - 2;
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:500, gb:0, bb:0};
myColor.setTransform(myColorTransform);
} else {
myColor = new Color(this);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
if (health < 1) {
gotoAndStop ("boom");
}
leftx = this._x + (Math.cos(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
lefty = this._y - (Math.sin(3.141593 * (((this._rotation * -1) + 180) / 180)) * 38);
rightx = this._x + (Math.cos(3.141593 * ((this._rotation * -1) / 180)) * 38);
righty = this._y - (Math.sin(3.141593 * ((this._rotation * -1) / 180)) * 38);
if (_root.ground.hitTest(leftx, lefty, true)) {
xaccel = 0;
this._x++;
}
if (_root.ground.hitTest(rightx, righty, true)) {
xaccel = 0;
this._x--;
}
};
Instance of Symbol 751 MovieClip in Symbol 838 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Instance of Symbol 751 MovieClip in Symbol 845 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Instance of Symbol 751 MovieClip in Symbol 851 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Instance of Symbol 751 MovieClip in Symbol 859 MovieClip Frame 1
on (release) {
_root.nextFrame();
}
Symbol 866 Button
on (release) {
_root.gotoAndStop("main_menu");
}
Symbol 872 MovieClip Frame 1
stop();
Instance of Symbol 61 MovieClip in Symbol 872 MovieClip Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Symbol 872 MovieClip Frame 2
stop();
Symbol 876 MovieClip Frame 1
stop();
Symbol 876 MovieClip Frame 2
stop();
Symbol 879 MovieClip Frame 1
stop();
Instance of Symbol 61 MovieClip in Symbol 879 MovieClip Frame 1
on (release) {
getURL ("http://www.MaxGames.com", "_blank");
}
Symbol 879 MovieClip Frame 2
stop();