Frame 1
stop();
Instance of Symbol 12 MovieClip "main" in Frame 1
onClipEvent (enterFrame) {
display = "Loading";
mobut._visible = false;
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent = (loading / total) * 100;
per = int(percent);
percentage = per + "%";
DPLAY = "Loading . . . " + percentage;
for (a in sheeps) {
sheeps[a]._visible = false;
}
switch (int(per / 10)) {
case 10 :
case 9 :
sheeps.s10._visible = true;
case 8 :
sheeps.s9._visible = true;
case 7 :
sheeps.s8._visible = true;
case 6 :
sheeps.s7._visible = true;
case 5 :
sheeps.s6._visible = true;
case 4 :
sheeps.s5._visible = true;
case 3 :
sheeps.s4._visible = true;
case 2 :
sheeps.s3._visible = true;
case 1 :
sheeps.s2._visible = true;
case 0 :
sheeps.s1._visible = true;
}
if (per > 99) {
motxt._visible = false;
mobut._visible = true;
_level0.play();
}
}
Frame 3
function goTo() {
getURL ("http://www.MoFunZone.com/", "_blank");
}
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("MoFunZone.com - Play More Games", goTo));
this.menu = newMenu;
MoFunZone_URL = "http://gamefilez.mofunzone";
MoFunZone_path = _url.substring(0, length(MoFunZone_URL));
Frame 4
_quality = "HIGH";
stopAllSounds();
Frame 5
stopAllSounds();
_global.MenuMusic = new Sound();
_global.GameMusic = new Sound();
_global.MenuMusic.attachSound("musMenu");
_global.GameMusic.attachSound("musGame");
_global.MenuMusic.onSoundComplete = function () {
_global.MenuMusic.start();
};
_global.GameMusic.onSoundComplete = function () {
_global.GameMusic.start();
};
_global.MenuMusic.start();
_global.SoundAntiGravity = new Sound();
_global.SoundAntiGravity.attachSound("anti gravity");
_global.SoundAttractBullets = new Sound();
_global.SoundAttractBullets.attachSound("attract bullets");
_global.SoundBigSun = new Sound();
_global.SoundBigSun.attachSound("big sun");
_global.SoundBounce = new Sound();
_global.SoundBounce.attachSound("bounce");
_global.SoundDiarrhoea = new Sound();
_global.SoundDiarrhoea.attachSound("diarrhoea");
_global.SoundEndOfPowerUp = new Sound();
_global.SoundEndOfPowerUp.attachSound("end of power up");
_global.SoundGunshot = new Sound();
_global.SoundGunshot.attachSound("gunshot");
_global.SoundLife = new Sound();
_global.SoundLife.attachSound("life");
_global.SoundMatingSeason = new Sound();
_global.SoundMatingSeason.attachSound("mating season");
_global.SoundPop = new Sound();
_global.SoundPop.attachSound("pop");
_global.SoundPowerUpAppears = new Sound();
_global.SoundPowerUpAppears.attachSound("power up appears");
_global.SoundPowerUpDisappears = new Sound();
_global.SoundPowerUpDisappears.attachSound("power up disappears");
_global.SoundRepelBullets = new Sound();
_global.SoundRepelBullets.attachSound("repel bullets");
_global.SoundRoundabout = new Sound();
_global.SoundRoundabout.attachSound("round about");
_global.SoundSmallSun = new Sound();
_global.SoundSmallSun.attachSound("small sun");
_global.SoundStraightBullet = new Sound();
_global.SoundStraightBullet.attachSound("straight bullet");
_global.SoundZeroGravity = new Sound();
_global.SoundZeroGravity.attachSound("zero gravity");
_global.SoundSheepExplode = new Sound();
_global.SoundSheepExplode.attachSound("sheepexplode");
_global.Sounddown = false;
_global.Qualdown = false;
_global.SoundOn = true;
_global.sqcheck = function () {
if (!_global.typing) {
if (Key.isDown(81)) {
if (!_global.Qualdown) {
_global.Qualdown = true;
switch (_quality) {
case "HIGH" :
_quality = "MEDIUM";
break;
case "MEDIUM" :
_quality = "LOW";
break;
case "LOW" :
_quality = "HIGH";
}
}
} else {
_global.Qualdown = false;
}
if (Key.isDown(79)) {
if (!_global.Sounddown) {
String.prototype.startsWith = function (str) {
return(!this.indexOf(str));
};
_global.Sounddown = true;
_global.SoundOn = !_global.SoundOn;
if (_global.SoundOn) {
for (poo in _global) {
if (poo.startsWith("Sound") or poo.startsWith("Music")) {
_global[poo].setVolume(100);
}
}
} else {
for (poo in _global) {
if (poo.startsWith("Sound") or poo.startsWith("Music")) {
_global[poo].setVolume(0);
}
}
}
}
} else {
_global.Sounddown = false;
}
}
};
setInterval(_global.sqcheck, 50);
Frame 134
stop();
Frame 230
stop();
Frame 231
function clearall() {
onEnterFrame = function () {
};
for (n in _level0) {
_level0[n].removeMovieClip();
}
}
function setup(ai1, ai2) {
onEnterFrame = function () {
};
if (_global.easy) {
speedbooster = 0.15;
cspeedbooster = 0.2;
speedrotation = 7;
gm = 0.6;
} else {
speedbooster = 0.2;
cspeedbooster = 0.25;
speedrotation = 6;
gm = 1.1;
}
if (ai1 or ai2) {
TextChange = "Kills";
Player1.Lives = 5;
Player2.Lives = 0;
} else {
TextChange = "Lives";
Player1.Lives = 5;
Player2.Lives = 5;
}
Player1.AI = ai1;
Player2.AI = ai2;
reset();
onEnterFrame = function () {
todo();
};
}
function reset() {
camdist = 100;
for (r in _level0) {
if (r.startsWith("obj")) {
_level0[r].removeMovieClip();
}
}
Sun.UpdateCamera = true;
Space.UpdateCamera = true;
Player1.UpdateCamera = true;
Player2.UpdateCamera = true;
Sun.KillCollide = true;
Sun.isObject = true;
Sun._width = originalwidth;
Sun._height = originalheight;
PUMating = 0;
PUNoGravity = 0;
PUAntiGravity = 0;
Player1.PUReflect = 0;
Player1.PUAttract = 0;
Player1.PURound = 0;
Player1.PUTurd = 0;
Player2.PUReflect = 0;
Player2.PUAttract = 0;
Player2.PURound = 0;
Player2.PUTurd = 0;
if ((int(Math.random() * 2) + 1) == 1) {
t = 1;
q = 2;
} else {
t = 2;
q = 1;
}
_level0["Player" + t]._x = 520;
_level0["Player" + t]._y = 250;
Player1._rotation = int(Math.random() * 360) - 179;
Player1._visible = true;
_level0["Player" + q]._x = -20;
_level0["Player" + q]._y = 250;
Player2._rotation = int(Math.random() * 360) - 179;
Player2._visible = true;
Player1.Collide = true;
Player1.isObject = true;
Player1.Gravity = true;
Player1.UpdateVols = true;
Player1.freezeai = 0;
Player1.Cancel = 0;
Player1.Trail = "Fart";
Player1.Player = true;
Player1.ToTrail = 9;
Player1.CountShot = 0;
Player1.DestructIn = -1;
Player2.isObject = true;
Player2.Gravity = true;
Player2.UpdateVols = true;
Player2.freezeai = 0;
Player2.Collide = true;
Player2.Cancel = 0;
Player2.Trail = "Fart";
Player2.Player = true;
Player2.ToTrail = 9;
Player2.CountShot = 0;
Player2.DestructIn = -1;
_level0["Player" + t].xvol = 0.5;
_level0["Player" + t].yvol = -2.5;
_level0["Player" + q].xvol = -0.5;
_level0["Player" + q].yvol = 2.5;
Change = true;
}
function todo() {
bluetext = "Lives:" + Player1.Lives;
redtext = ((Player1.AI or Player2.AI) ? ("Kills:" + Player2.Lives) : ("Lives:" + Player2.Lives));
frames++;
if (Change) {
hudmate._visible = PUMating > 0;
hudnograv._visible = PUNoGravity > 0;
hudantigrav._visible = PUAntiGravity > 0;
hudblue1._visible = Player1.PUReflect > 0;
hudblue2._visible = Player1.PUAttract > 0;
hudblue3._visible = Player1.PURound > 0;
hudblue4._visible = Player1.PUTurd > 0;
hudgreen1._visible = Player2.PUReflect > 0;
hudgreen2._visible = Player2.PUAttract > 0;
hudgreen3._visible = Player2.PURound > 0;
hudgreen4._visible = Player2.PUTurd > 0;
Player1.swapDepths(getNextHighestDepth());
Player2.swapDepths(getNextHighestDepth());
Sun.swapDepths(getNextHighestDepth());
MAIN.swapDepths(getNextHighestDepth());
doupdate = true;
} else {
doupdate = false;
}
if ((Player1._visible and Player2._visible) and (int(Math.random() * 100) == 1)) {
type = int(Math.random() * 10) + 1;
if (type == 8) {
type = int(Math.random() * 10) + 1;
}
attachMovie(type + "Power", "obj" + (++NextObj), getNextHighestDepth());
_level0["obj" + NextObj].UpdateCamera = true;
_level0["obj" + NextObj].Power = true;
_level0["obj" + NextObj].Catch = 150;
_level0["obj" + NextObj].Type = type;
_level0["obj" + NextObj].isObject = true;
_level0["obj" + NextObj]._x = int(Math.random() * 1000) - 250;
_level0["obj" + NextObj]._y = int(Math.random() * 1000) - 250;
_level0["obj" + NextObj]._width = _level0["obj" + NextObj]._width * 0.66;
_level0["obj" + NextObj]._height = _level0["obj" + NextObj]._height * 0.66;
_level0["obj" + NextObj].cacheAsBitmap = true;
Change = true;
_global.SoundPowerUpAppears.start();
}
if (PUMating > 0) {
PUMating--;
if (PUMating == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (PUNoGravity > 0) {
PUNoGravity--;
if (PUGravity == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (PUAntiGravity > 0) {
PUAntiGravity--;
if (PUAntiGravity == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player1.PUReflect > 0) {
Player1.PUReflect--;
if (Player1.PUReflect == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player1.PUAttract > 0) {
Player1.PUAttract--;
if (Player1.PUAttract == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player1.PURound > 0) {
Player1.PURound--;
if (Player1.PURound == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player1.PUTurd > 0) {
Player1.PUTurd--;
if (Player1.PUTurd == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player2.PUReflect > 0) {
Player2.PUReflect--;
if (Player2.PUReflect == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player2.PUAttract > 0) {
Player2.PUAttract--;
if (Player2.PUAttract == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player2.PURound > 0) {
Player2.PURound--;
if (Player2.PURound == 0) {
_global.SoundEndOfPowerUp.start();
}
}
if (Player2.PUTurd > 0) {
Player2.PUTurd--;
if (Player2.PUTurd == 0) {
_global.SoundEndOfPowerUp.start();
}
}
for (a in _level0) {
if (_level0[a].UpdateCamera and _level0[a].caminit) {
_level0[a]._oldr = _level0[a]._rotation;
_level0[a]._rotation = 0;
_level0[a]._oldf = _level0[a]._currentframe;
_level0[a].gotoAndStop(1);
_level0[a]._x = _level0[a]._oldx;
_level0[a]._y = _level0[a]._oldy;
_level0[a]._width = _level0[a]._oldw;
_level0[a]._height = _level0[a]._oldh;
_level0[a]._rotation = _level0[a]._oldr;
_level0[a].gotoAndPlay(_level0[a]._oldf);
}
}
camerazoom = false;
for (a in _level0) {
if (doupdate) {
if (a.startsWith("hud")) {
if (_level0[a]._visible) {
_level0[a].swapDepths(getNextHighestDepth());
}
}
}
if (a == "Player1") {
col = 1;
}
if (a == "Player2") {
col = 2;
}
if (_level0[a].Power) {
_level0[a]._rotation = _level0[a]._rotation + 3;
_level0[a].Catch--;
if (_level0[a].Catch == 0) {
attachMovie("Explode", "obj" + (++NextObj), getNextHighestDepth());
Change = true;
_level0["obj" + NextObj]._x = _level0[a]._x;
_level0["obj" + NextObj]._y = _level0[a]._y;
_level0["obj" + NextObj].UpdateCamera = true;
_level0[a].removeMovieClip();
_global.SoundPowerUpDisappears.start();
}
}
if (_level0[a].DestructIn > 0) {
_level0[a].DestructIn--;
} else if (_level0[a].DestructIn == 0) {
if (a.startsWith("Player")) {
for (boom in _level0) {
if (_level0[boom].endOf) {
_level0[boom].gotoAndStop(54);
}
}
reset();
} else {
attachMovie("Explode", "obj" + (++NextObj), getNextHighestDepth());
Change = true;
_level0["obj" + NextObj].UpdateCamera = true;
_level0["obj" + NextObj]._x = _level0[a]._x;
_level0["obj" + NextObj]._y = _level0[a]._y;
_level0[a].removeMovieClip();
_global.SoundPop.start();
}
}
if (_level0[a].isObject and _level0[a]._visible) {
if (_level0[a].Trail == "Fart") {
if (_level0[a].ToTrail != 0) {
_level0[a].ToTrail--;
} else if (_level0[a].acc) {
if (a == "Player1") {
b = 1;
} else if (a == "Player2") {
b = 2;
}
attachMovie(b + "Smoke", "obj" + (++NextObj), getNextHighestDepth());
Change = true;
_level0["obj" + NextObj].UpdateCamera = true;
_level0["obj" + NextObj].Player = false;
_level0["obj" + NextObj].Gravity = false;
_level0["obj" + NextObj].isObject = true;
_level0["obj" + NextObj].UpdateVols = true;
_level0["obj" + NextObj]._x = _level0[a]._x + (Math.sin(((_level0[a]._rotation - 180) / 180) * Math.PI) * 20);
_level0["obj" + NextObj]._y = _level0[a]._y - (Math.cos(((_level0[a]._rotation - 180) / 180) * Math.PI) * 20);
_level0["obj" + NextObj].xvol = Math.sin((_level0[a]._rotation / 180) * Math.PI);
_level0["obj" + NextObj].yvol = -Math.cos((_level0[a]._rotation / 180) * Math.PI);
_level0[a].ToTrail = 9;
}
}
if (_level0[a].Trail == "Particle") {
if (_level0[a].ToTrail == 0) {
b = _level0[a].col;
attachMovie(b + "Part", "obj" + (++NextObj), getNextHighestDepth());
_level0["obj" + NextObj].isObject = false;
woo = int(Math.random() * 33) - 16;
woo2 = int(Math.random() * 33) - 16;
_level0["obj" + NextObj]._x = _level0[a]._x + woo;
_level0["obj" + NextObj]._y = _level0[a]._y + woo2;
_level0["obj" + NextObj].UpdateCamera = true;
_level0[a].ToTrail = 1;
} else {
_level0[a].ToTrail--;
}
}
if (_level0[a].Player) {
if (_level0[a].CountShot > 0) {
_level0[a].CountShot--;
}
if (_level0[a].AI) {
if (_level0[a].freezeai == 0) {
_level0[a].freezeai = 5;
_level0[a].escapeangle = 0;
_level0[a].shootangle = 0;
_level0[a].togo = -2;
_level0[a].acc = false;
threats = new Array();
divideby = 0;
avx = 0;
avy = 0;
for (avoid in _level0) {
if ((avoid == "Sun") and ((PUAntiGravity > 0) or (PUNoGravity > 0))) {
continue;
}
if ((avoid != "Sun") and (_level0[a].PUReflect > 0)) {
continue;
}
if (_level0[avoid].KillCollide) {
sheepathreat = ((Math.atan2(_level0[a]._y - _level0[avoid]._y, _level0[a]._x - _level0[avoid]._x) * 180) / Math.PI) - 90;
threatasheep = ((Math.atan2(_level0[avoid]._y - _level0[a]._y, _level0[avoid]._x - _level0[a]._x) * 180) / Math.PI) - 90;
sheepmotionangle = ((Math.atan2(_level0[a].yvol, _level0[a].xvol) * 180) / Math.PI) + 90;
threatmotionangle = ((Math.atan2(_level0[avoid].yvol, _level0[avoid].xvol) * 180) / Math.PI) + 90;
sheepathreat = ((sheepathreat < -180) ? (sheepathreat + 360) : (sheepathreat));
threatasheep = ((threatasheep < -180) ? (threatasheep + 360) : (threatasheep));
threatmotionangle = ((threatmotionangle > 180) ? (threatmotionangle - 360) : (threatmotionangle));
sheepmotionangle = ((sheepmotionangle > 180) ? (sheepmotionangle - 360) : (sheepmotionangle));
isThreat = false;
sen = 60;
if (avoid != "Sun") {
if ((threatasheep - sen) < -180) {
if ((((threatasheep + sen) > threatmotionangle) and (threatmotionangle > -180)) or ((180 > threatmotionangle) and (threatmotionangle > ((threatasheep - sen) + 360)))) {
isThreat = true;
}
} else if ((threatasheep + sen) > 180) {
if (((180 > threatmotionangle) and (threatmotionangle > (threatasheep - sen))) or ((-180 < threatmotionangle) and (threatmotionangle < ((threatasheep + sen) - 360)))) {
isThreat = true;
}
} else if (((threatasheep + sen) > threatmotionangle) and ((threatasheep - sen) < threatmotionangle)) {
isThreat = true;
}
} else {
sen = 45;
}
if (!isThreat) {
if ((sheepathreat - sen) < -180) {
if ((((sheepathreat + sen) > sheepmotionangle) and (sheepmotionangle > -180)) or ((180 > sheepmotionangle) and (sheepmotionangle > ((sheepathreat - sen) + 360)))) {
isThreat = true;
}
} else if ((sheepathreat + sen) > 180) {
if (((180 > sheepmotionangle) and (sheepmotionangle > (sheepathreat - sen))) or ((-180 < sheepmotionangle) and (sheepmotionangle < ((sheepathreat + sen) - 360)))) {
isThreat = true;
}
} else if (((sheepathreat + sen) > sheepmotionangle) and ((sheepathreat - sen) < sheepmotionangle)) {
isThreat = true;
}
}
if (isThreat) {
threats.push(avoid);
avx = avx + _level0[avoid]._x;
avy = avy + _level0[avoid]._y;
divideby++;
}
}
}
debugTarget._x = avx;
debugTarget._y = avy;
_level0[a].escapeangle = ((Math.atan2(_level0[a]._y - avy, _level0[a]._x - avx) * 180) / Math.PI) + 90;
if (_level0[a].escapeangle > 180) {
_level0[a].escapeangle = _level0[a].escapeangle - 360;
}
debugTarget._rotation = _level0[a].escapeangle;
o = ((col == 1) ? 2 : 1);
_level0[a].shootangle = ((Math.atan2(_level0[a]._y - _level0["Player" + o]._y, _level0[a]._x - _level0["Player" + o]._x) * 180) / Math.PI) - 90;
dfp = Math.sqrt(Math.pow(_level0[a]._x - _level0["Player" + o]._x, 2) + Math.pow(_level0[a]._y - _level0["Player" + o]._y, 2));
areathreats = false;
n = 0;
while (n < threats.length) {
dft = Math.sqrt(Math.pow(_level0[a]._x - _level0[threats[n]]._x, 2) + Math.pow(_level0[a]._y - _level0[threats[n]]._y, 2));
if (dft < 160) {
areathreats = true;
break;
}
n++;
}
if ((dfp < 300) and (!areathreats)) {
_level0[a].togo = -2;
if ((_level0[a].shootangle - 3) < -180) {
if (((-180 < _level0[a]._rotation) and (_level0[a]._rotation < (_level0[a].shootangle + 3))) or ((180 > _level0[a]._rotation) and (_level0[a]._rotation > ((_level0[a].shootangle - 3) + 360)))) {
_level0[a].togo = 0;
}
} else if ((_level0[a].shootangle + 3) > 180) {
if (((_level0[a]._rotation < 180) and (_level0[a]._rotation > (_level0[a].shootangle - 3))) or ((_level0[a]._rotation > -180) and (_level0[a]._rotation < ((_level0[a].shootangle + 3) - 360)))) {
_level0[a].togo = 0;
}
} else if (((_level0[a].shootangle - 3) < _level0[a]._rotation) and ((_level0[a].shootangle + 3) > _level0[a]._rotation)) {
_level0[a].togo = 0;
}
if (_level0[a].togo == -2) {
if ((_level0[a].shootangle - 180) < -180) {
if (((_level0[a].shootangle > _level0[a]._rotation) and (_level0[a]._rotation > -180)) or ((180 > _level0[a]._rotation) and (_level0[a]._rotation > ((_level0[a].shootangle - 180) + 360)))) {
_level0[a].togo = 1;
}
} else if ((_level0[a].shootangle > _level0[a]._rotation) and ((_level0[a].shootangle - 180) < _level0[a]._rotation)) {
_level0[a].togo = 1;
}
if (_level0[a].togo == -2) {
_level0[a].togo = -1;
}
}
} else {
_level0[a].togo = -2;
if ((_level0[a].escapeangle - 3) < -180) {
if (((-180 < _level0[a]._rotation) and (_level0[a]._rotation < (_level0[a].escapeangle + 3))) or ((180 > _level0[a]._rotation) and (_level0[a]._rotation > ((_level0[a].escapeangle - 3) + 360)))) {
_level0[a].togo = 0;
}
} else if ((_level0[a].escapeangle + 3) > 180) {
if (((_level0[a]._rotation < 180) and (_level0[a]._rotation > (_level0[a].escapeangle - 3))) or ((_level0[a]._rotation > -180) and (_level0[a]._rotation < ((_level0[a].escapeangle + 3) - 360)))) {
_level0[a].togo = 0;
}
} else if (((_level0[a].escapeangle - 3) < _level0[a]._rotation) and ((_level0[a].escapeangle + 3) > _level0[a]._rotation)) {
_level0[a].togo = 0;
}
if (_level0[a].togo == -2) {
if ((_level0[a].escapeangle - 180) < -180) {
if (((_level0[a].escapeangle > _level0[a]._rotation) and (_level0[a]._rotation > -180)) or ((180 > _level0[a]._rotation) and (_level0[a]._rotation > ((_level0[a].escapeangle - 180) + 360)))) {
_level0[a].togo = 1;
}
} else if ((_level0[a].escapeangle > _level0[a]._rotation) and ((_level0[a].escapeangle - 180) < _level0[a]._rotation)) {
_level0[a].togo = 1;
}
if (_level0[a].togo == -2) {
_level0[a].togo = -1;
}
}
}
rens = 110;
closeek = false;
if ((_level0[a].escapeangle - rens) < -180) {
if (((-180 < _level0[a]._rotation) and (_level0[a]._rotation < (_level0[a].escapeangle + rens))) or ((180 > _level0[a]._rotation) and (_level0[a]._rotation > ((_level0[a].escapeangle - rens) + 360)))) {
closeek = true;
}
} else if ((_level0[a].escapeangle + rens) > 180) {
if (((_level0[a]._rotation < 180) and (_level0[a]._rotation > (_level0[a].escapeangle - rens))) or ((_level0[a]._rotation > -180) and (_level0[a]._rotation < ((_level0[a].escapeangle + rens) - 360)))) {
closeek = true;
}
} else if (((_level0[a].escapeangle - rens) < _level0[a]._rotation) and ((_level0[a].escapeangle + rens) > _level0[a]._rotation)) {
closeek = true;
}
if (closeek and areathreats) {
_level0[a].acc = true;
}
if (((dfp < 140) or (PUNoGravity > 0)) or (_level0[a].PUTurd > 0)) {
rens = 15;
} else if (_level0["Player" + o].PUAttract > 0) {
rens = 90;
} else {
rens = 45;
}
closeek = false;
if ((_level0[a].shootangle - rens) < -180) {
if (((-180 < _level0[a]._rotation) and (_level0[a]._rotation < (_level0[a].shootangle + rens))) or ((180 > _level0[a]._rotation) and (_level0[a]._rotation > ((_level0[a].shootangle - rens) + 360)))) {
closeek = true;
}
} else if ((_level0[a].shootangle + rens) > 180) {
if (((_level0[a]._rotation < 180) and (_level0[a]._rotation > (_level0[a].shootangle - rens))) or ((_level0[a]._rotation > -180) and (_level0[a]._rotation < ((_level0[a].shootangle + rens) - 360)))) {
closeek = true;
}
} else if (((_level0[a].shootangle - rens) < _level0[a]._rotation) and ((_level0[a].shootangle + rens) > _level0[a]._rotation)) {
closeek = true;
}
if (((_level0[a].CountShot == 0) and closeek) and Player1._visible) {
CreateBull(col);
_level0[a].CountShot = 100;
}
}
_level0[a].freezeai--;
if ((_level0[a].togo < 0) or (_level0[a].PURound > 0)) {
_level0[a]._rotation = _level0[a]._rotation - speedrotation;
} else if ((_level0[a].togo > 0) and (_level0[a].PURound == 0)) {
_level0[a]._rotation = _level0[a]._rotation + speedrotation;
}
if (_level0[a].acc) {
_level0[a].xvol = _level0[a].xvol + (Math.sin((_level0[a]._rotation / 180) * Math.PI) * cspeedbooster);
_level0[a].yvol = _level0[a].yvol - (Math.cos((_level0[a]._rotation / 180) * Math.PI) * cspeedbooster);
}
} else {
if (a == "Player1") {
cu = 38;
cl = 37;
cr = 39;
cs = 13;
} else if (a == "Player2") {
cu = 87;
cl = 65;
cr = 68;
cs = 32;
}
if (Key.isDown(cl) or (_level0[a].PURound > 0)) {
_level0[a]._rotation = _level0[a]._rotation - speedrotation;
}
if (Key.isDown(cr) and (_level0[a].PURound == 0)) {
_level0[a]._rotation = _level0[a]._rotation + speedrotation;
}
if (Key.isDown(cu)) {
_level0[a].acc = true;
_level0[a].xvol = _level0[a].xvol + (Math.sin((_level0[a]._rotation / 180) * Math.PI) * speedbooster);
_level0[a].yvol = _level0[a].yvol - (Math.cos((_level0[a]._rotation / 180) * Math.PI) * speedbooster);
} else {
_level0[a].acc = false;
}
if (Key.isDown(cs) and (_level0[a].CountShot == 0)) {
CreateBull(col);
_level0[a].CountShot = 100;
}
}
}
if (_level0[a].Collide) {
if (_level0[a].Cancel == 0) {
for (test in _level0) {
if (((test != a) and _level0[test]._visible) and (((_level0[test].Collide and (_level0[test].Cancel == 0)) or _level0[test].KillCollide) or _level0[test].Power)) {
if (test == "Sun") {
distance = Math.sqrt(((_level0[test]._y - _level0[a]._y) * (_level0[test]._y - _level0[a]._y)) + ((_level0[test]._x - _level0[a]._x) * (_level0[test]._x - _level0[a]._x)));
d = 40;
}
if (_level0[test].KillCollide and (test != "Sun")) {
}
if (_level0[a].hitTest(_level0[test]._x, _level0[test]._y, false) or ((test == "Sun") and (distance < d))) {
if (_level0[test].Collide or ((_level0[test].KillCollide and _level0[a].PUReflect) and (test != "Sun"))) {
_global.SoundBounce.start();
if ((_level0[a].xvol + _level0[a].yvol) > (_level0[test].xvol + _level0[test].yvol)) {
fast = a;
slow = test;
} else {
fast = test;
slow = a;
}
t1 = _level0[slow].xvol;
t2 = _level0[slow].yvol;
_level0[slow].xvol = _level0[fast].xvol * 0.66;
_level0[slow].yvol = _level0[fast].yvol * 0.66;
_level0[fast].yvol = (-_level0[fast].yvol) * 0.66;
_level0[fast].xvol = (-_level0[fast].xvol) * 0.66;
_level0[slow].Cancel = 50;
} else if (_level0[test].Power) {
o = ((a == "Player1") ? "Player2" : "Player1");
if ((!_level0.Player1._visible) or (!_level0.Player1._visible)) {
_global.PowerUpDisappears.start();
} else {
if (_level0[test].Type == 1) {
_level0[a].PUReflect = 250;
_global.SoundRepelBullets.start();
}
if (_level0[test].Type == 2) {
PUNoGravity = 250;
_global.SoundZeroGravity.start();
}
if (_level0[test].Type == 3) {
PUAntiGravity = 250;
_global.SoundAntiGravity.start();
}
if (_level0[test].Type == 4) {
PUMating = 250;
_global.SoundMatingSeason.start();
}
if (_level0[test].Type == 5) {
_level0[o].PUAttract = 250;
_global.SoundAttractBullets.start();
}
if ((_level0[test].Type == 8) and (!_level0[a].AI)) {
_level0[a].Lives++;
_global.SoundLife.start();
}
if (_level0[test].Type == 6) {
_level0[o].PURound = 100;
_global.SoundRoundabout.start();
}
if (_level0[test].Type == 7) {
_level0[a].PUTurd = 250;
_global.SoundStraightBullet.start();
}
}
_level0[test].removeMovieClip();
Change = true;
} else {
for (power in _level0) {
if (_level0[power].Power) {
_level0[power].Catch = 1;
}
}
PUMating = 0;
PUNoGravity = 0;
PUAntiGravity = 0;
Player1.PUReflect = 0;
Player1.PUAttract = 0;
Player1.PURound = 0;
Player1.PUTurd = 0;
Player2.PUReflect = 0;
Player2.PUAttract = 0;
Player2.PURound = 0;
Player2.PUTurd = 0;
attachMovie("BOOM", "obj" + (++NextObj), getNextHighestDepth());
_level0["obj" + NextObj].UpdateCamera = true;
_global.SoundSheepExplode.start();
Change = true;
PUMating = 0;
_level0["obj" + NextObj]._x = _level0[a]._x;
_level0["obj" + NextObj]._y = _level0[a]._y;
_level0["obj" + NextObj]._width = _level0["obj" + NextObj]._width * 2;
_level0["obj" + NextObj]._height = _level0["obj" + NextObj]._height * 2;
_level0[a].DestructIn = 75;
_level0[a]._visible = false;
if (Player1.AI or Player2.AI) {
if (_level0[a].AI) {
_level0[a].Lives++;
} else {
_level0[a].Lives--;
}
} else {
_level0[a].Lives--;
}
endOf = _level0[a].Lives == 0;
if (endOf) {
_level0._quality = "HIGH";
Mouse.show();
stopAllSounds();
_global.MenuMusic.start();
oso = ((a == "Player1") ? "Player2" : "Player1");
ono = ((a == "Player1") ? 2 : 1);
if (_level0[o].AI and _level0[a].AI) {
} else if (_level0[oso].AI and (!_level0[a].AI)) {
_global.playerscore = _level0[oso].Lives;
_root.gotoAndPlay("1P");
_level0.clearall();
} else if ((!_level0[oso].AI) and _level0[a].AI) {
} else if ((!_level0[oso].AI) and (!_level0[a].AI)) {
_global.bluescore = _level0.Player1.Lives;
_global.greenscore = _level0.Player2.Lives;
_root.gotoAndPlay("2P" + ono);
_level0.clearall();
}
}
_level0["obj" + NextObj].a = a;
}
}
}
}
} else {
_level0[a].Cancel--;
}
}
if (_level0[a].Gravity and (PUNoGravity == 0)) {
_level0[a].s = Math.sqrt(((_level0.Suny - _level0[a]._y) * (_level0.Suny - _level0[a]._y)) + ((_level0.Sunx - _level0[a]._x) * (_level0.Sunx - _level0[a]._x)));
_level0[a].s = ((_level0[a].s > 200) ? 200 : (_level0[a].s));
_level0[a].s = _level0[a].s / 2;
_level0[a].ang = ((Math.atan2(_level0.Suny - _level0[a]._y, _level0.Sunx - _level0[a]._x) * 180) / Math.PI) + 90;
sens = 800;
if (PUAntiGravity > 0) {
_level0[a].ang = _level0[a].ang - 180;
if (_level0[a].ang < -180) {
_level0[a].ang = _level0[a].ang + 360;
}
}
_level0[a].xvol = _level0[a].xvol + ((Math.sin((_level0[a].ang / 180) * Math.PI) * ((180 - _level0[a].s) / sens)) * gm);
_level0[a].yvol = _level0[a].yvol - ((Math.cos((_level0[a].ang / 180) * Math.PI) * ((180 - _level0[a].s) / sens)) * gm);
if (_level0[a].Player and (PUMating > 0)) {
opp = ((col == 1) ? 2 : 1);
o = "Player" + opp;
_level0[a].s = Math.sqrt(((_level0[o]._y - _level0[a]._y) * (_level0[o]._y - _level0[a]._y)) + ((_level0[o]._x - _level0[a]._x) * (_level0[o]._x - _level0[a]._x)));
_level0[a].s = ((_level0[a].s > 200) ? 200 : (_level0[a].s));
_level0[a].s = _level0[a].s / 2;
_level0[a].ang = ((Math.atan2(_level0[o]._y - _level0[a]._y, _level0[o]._x - _level0[a]._x) * 180) / Math.PI) + 90;
sens = 600;
if (PUAntiGravity > 0) {
_level0[a].ang = _level0[a].ang - 180;
if (_level0[a].ang < -180) {
_level0[a].ang = _level0[a].ang + 360;
}
}
_level0[a].xvol = _level0[a].xvol + ((Math.sin((_level0[a].ang / 180) * Math.PI) * ((180 - _level0[a].s) / sens)) * gm);
_level0[a].yvol = _level0[a].yvol - ((Math.cos((_level0[a].ang / 180) * Math.PI) * ((180 - _level0[a].s) / sens)) * gm);
}
if (_level0[a].Player and (_level0[a].PUAttract > 0)) {
for (bu in _level0) {
if ((bu != "Sun") and _level0[bu].KillCollide) {
_level0[bu].s = Math.sqrt(((_level0[a]._y - _level0[bu]._y) * (_level0[a]._y - _level0[bu]._y)) + ((_level0[a]._x - _level0[bu]._x) * (_level0[a]._x - _level0[bu]._x)));
_level0[bu].s = ((_level0[bu].s > 200) ? 200 : (_level0[bu].s));
_level0[bu].s = _level0[bu].s / 2;
_level0[bu].ang = ((Math.atan2(_level0[a]._y - _level0[bu]._y, _level0[a]._x - _level0[bu]._x) * 180) / Math.PI) + 90;
sens = 600;
if (PUAntiGravity > 0) {
_level0[bu].ang = _level0[bu].ang - 180;
if (_level0[bu].ang < -180) {
_level0[bu].ang = _level0[bu].ang + 360;
}
}
_level0[bu].xvol = _level0[bu].xvol + ((Math.sin((_level0[bu].ang / 180) * Math.PI) * ((180 - _level0[bu].s) / sens)) * gm);
_level0[bu].yvol = _level0[bu].yvol - ((Math.cos((_level0[bu].ang / 180) * Math.PI) * ((180 - _level0[bu].s) / sens)) * gm);
}
}
}
}
if (_level0[a].UpdateVols) {
angle = ((Math.atan2(_level0[a].yvol, _level0[a].xvol) * 180) / Math.PI) + 90;
speed = Math.sqrt(Math.pow(_level0[a].yvol, 2) + Math.pow(_level0[a].xvol, 2));
if (speed > 10) {
speed = 10;
_level0[a].xvol = Math.sin((angle / 180) * Math.PI) * speed;
_level0[a].yvol = (-Math.cos((angle / 180) * Math.PI)) * speed;
}
_level0[a]._x = _level0[a]._x + _level0[a].xvol;
_level0[a]._y = _level0[a]._y + _level0[a].yvol;
h = 500;
l = 0;
hh = 780;
ll = -280;
if (_level0[a]._x > h) {
if (_level0[a].Player and (!_level0[a].AI)) {
camerazoom = true;
}
if (_level0[a]._x > hh) {
_level0[a].xvol = -_level0[a].xvol;
_level0[a].yvol = -_level0[a].yvol;
}
}
if (_level0[a]._x < l) {
if (_level0[a].Player and (!_level0[a].AI)) {
camerazoom = true;
}
if (_level0[a]._x < ll) {
_level0[a].xvol = -_level0[a].xvol;
_level0[a].yvol = -_level0[a].yvol;
}
}
if (_level0[a]._y > h) {
if (_level0[a].Player and (!_level0[a].AI)) {
camerazoom = true;
}
if (_level0[a]._y > hh) {
_level0[a].xvol = -_level0[a].xvol;
_level0[a].yvol = -_level0[a].yvol;
}
}
if ((_level0[a]._y < l) and (!_level0[a].AI)) {
if (_level0[a].Player) {
camerazoom = true;
}
if (_level0[a]._y < ll) {
_level0[a].xvol = -_level0[a].xvol;
_level0[a].yvol = -_level0[a].yvol;
}
}
}
}
}
if (camerazoom) {
camdist = camdist + 8;
if (camdist > 200) {
camdist = 200;
}
} else {
camdist = camdist - 8;
if (camdist < 100) {
camdist = 100;
}
}
for (a in _level0) {
if (_level0[a].UpdateCamera) {
_level0[a].caminit = true;
_level0[a]._oldr = _level0[a]._rotation;
_level0[a]._rotation = 0;
_level0[a]._oldf = _level0[a]._currentframe;
_level0[a].gotoAndStop(1);
_level0[a]._oldx = _level0[a]._x;
_level0[a]._oldy = _level0[a]._y;
_level0[a]._oldw = _level0[a]._width;
_level0[a]._oldh = _level0[a]._height;
pz = camdist / 100;
_level0[a]._width = _level0[a]._width / pz;
_level0[a]._height = _level0[a]._height / pz;
_level0[a]._x = ((_level0[a]._x - 250) / pz) + 250;
_level0[a]._y = ((_level0[a]._y - 250) / pz) + 250;
_level0[a]._rotation = _level0[a]._oldr;
_level0[a].gotoAndPlay(_level0[a]._oldf);
}
}
}
_quality = "LOW";
stopAllSounds();
_global.GameMusic.start();
attachMovie("Space", "Space", getNextHighestDepth(), {_x:250, _y:250, _width:1000, _height:1000});
attachMovie("Player1", "Player1", getNextHighestDepth());
attachMovie("Player2", "Player2", getNextHighestDepth());
attachMovie("Star", "Sun", getNextHighestDepth(), {_x:250, _y:250});
attachMovie("1PowerHUD", "hudgreen1", getNextHighestDepth(), {_x:90, _y:15});
attachMovie("5PowerHUD", "hudgreen2", getNextHighestDepth(), {_x:120, _y:15});
attachMovie("9PowerHUD", "hudgreen3", getNextHighestDepth(), {_x:150, _y:15});
attachMovie("10PowerHUD", "hudgreen4", getNextHighestDepth(), {_x:180, _y:15});
attachMovie("1PowerHUD", "hudblue1", getNextHighestDepth(), {_x:320, _y:15});
attachMovie("5PowerHUD", "hudblue2", getNextHighestDepth(), {_x:350, _y:15});
attachMovie("9PowerHUD", "hudblue3", getNextHighestDepth(), {_x:380, _y:15});
attachMovie("10PowerHUD", "hudblue4", getNextHighestDepth(), {_x:410, _y:15});
attachMovie("4PowerHUD", "hudmate", getNextHighestDepth(), {_x:250, _y:15});
attachMovie("2PowerHUD", "hudnograv", getNextHighestDepth(), {_x:220, _y:15});
attachMovie("3PowerHUD", "hudantigrav", getNextHighestDepth(), {_x:280, _y:15});
attachMovie("HUD", "MAIN", getNextHighestDepth(), {_x:0, _y:0, cacheAsBitmap:true});
frames = 0;
originalwidth = Sun._width;
originalheight = Sun._height;
stop();
String.prototype.startsWith = function (str) {
return(!this.indexOf(str));
};
String.prototype.endsWith = function (str) {
return(this.lastIndexOf(str) == (this.length - str.length));
};
NextObj = 0;
_level0.NINETY = (Math.PI/2);
Sunx = 250;
Suny = 250;
CreateBull = function (col) {
attachMovie(col + "Bullet", "obj" + (++NextObj), getNextHighestDepth());
Change = true;
_level0["obj" + NextObj].UpdateCamera = true;
_level0["obj" + NextObj].isObject = true;
_level0["obj" + NextObj].Player = false;
_level0["obj" + NextObj].col = col;
_level0["obj" + NextObj].Gravity = !_level0[a].PUTurd;
_level0["obj" + NextObj].DestructIn = 250;
_level0["obj" + NextObj].KillCollide = true;
_level0["obj" + NextObj].UpdateVols = true;
_level0["obj" + NextObj].Trail = "Particle";
_level0["obj" + NextObj].ToTrail = 1;
speed = Math.sqrt(Math.pow(_level0[a].yvol, 2) + Math.pow(_level0[a].xvol, 2));
sp = ((speed < 3) ? 4 : (speed + 1));
_level0["obj" + NextObj].xvol = Math.sin((_level0[a]._rotation / 180) * Math.PI) * sp;
_level0["obj" + NextObj].yvol = (-Math.cos((_level0[a]._rotation / 180) * Math.PI)) * sp;
_level0["obj" + NextObj]._x = _level0[a]._x + (Math.sin((_level0[a]._rotation / 180) * Math.PI) * 80);
_level0["obj" + NextObj]._y = _level0[a]._y - (Math.cos((_level0[a]._rotation / 180) * Math.PI) * 80);
_global.SoundGunshot.start();
};
setup(_global.ai1, _global.ai2);
Frame 232
_global.typing = true;
Frame 271
stop();
Frame 311
stop();
Frame 351
stop();
Frame 352
stop();
Frame 353
stop();
Symbol 15 Button
on (press) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 25 MovieClip [1Smoke] Frame 45
this.removeMovieClip();
Symbol 35 MovieClip [2Smoke] Frame 45
this.removeMovieClip();
Symbol 38 MovieClip [1Part] Frame 20
this.removeMovieClip();
Symbol 41 MovieClip [2Part] Frame 20
this.removeMovieClip();
Symbol 43 MovieClip [Explode] Frame 22
this.removeMovieClip();
Symbol 84 MovieClip [BOOM] Frame 54
this.removeMovieClip();
Symbol 93 Button
on (press) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 141 Button
on (press) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 162 Button
on (press) {
getURL ("http://www.mofunzone.com/game_scores/eweniverse/highscores.shtml", "_blank");
}
Symbol 164 Button
on (press) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 166 Button
on (release) {
gotoAndPlay ("INSTRUCT");
}
Symbol 168 Button
on (press) {
_global.ai1 = false;
_global.ai2 = false;
play();
}
Symbol 170 Button
on (press) {
_global.ai1 = false;
_global.ai2 = true;
play();
}
Symbol 173 Button
on (press) {
_global.easy = false;
play();
}
Symbol 174 Button
on (press) {
_global.easy = true;
play();
}
Symbol 179 Button
on (press) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 194 Button
on (press) {
_root.gotoAndPlay("GOTOMAIN");
_global.typing = false;
}
Symbol 201 Button
on (press) {
getURL ("http://mofunzone.com/online_games/eweniverse.shtml", "_blank");
}
Symbol 202 Button
on (press) {
gotoAndPlay ("GOTOMAIN");
}
Symbol 219 Button
on (press) {
gotoAndPlay ("GOTOMAIN");
}
Symbol 231 Button
on (press) {
play();
}
Symbol 232 Button
on (release) {
gotoAndPlay ("GOTOMAIN");
}
Symbol 239 MovieClip Frame 25
stop();