Frame 1
MochiAd.showPreGameAd({id:"7f462d280eca9676", res:"640x480", background:16777161, color:16747008, outline:11169067, no_bg:true});
function blockMe() {
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
}
if (lock) {
block.gotoAndStop(2);
}
}
block = attachMovie("urlblock", "urlblock", 999501);
block._x = Stage.width / 2;
block._y = Stage.height / 2;
urls_allowed = ["bgraeber.googlepages.com", "www.flashgamelicense.com", "www.neboola.com", ""];
sitelock(urls_allowed);
}
mochi.MochiServices.connect("7f462d280eca9676");
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("970cd6a5", this, 10301, true);
function frameTransition(frame) {
theFader = attachMovie("fader", "fader1", 999192);
theFader._x = (Stage.width + theFader._width) + 100;
theFader._y = Stage.height / 2;
theFader.onEnterFrame = function () {
this._x = this._x - 50;
if (this._x < Stage.width) {
this._x = Stage.width;
_root.gotoAndStop(frame);
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
}
};
}
function frameTransition2(frame) {
theFader = attachMovie("fader2", "fader2", 999192);
theFader._x = (Stage.width + theFader._width) + 100;
theFader._y = Stage.height / 2;
theFader.onEnterFrame = function () {
this._x = this._x - 50;
if (this._x < Stage.width) {
this._x = Stage.width;
_root.gotoAndStop(frame);
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
}
};
}
stop();
Stage.showMenu = false;
fscommand ("allowscale", "false");
theFpsLock = attachMovie("fpslock", "fpslock1", 191829);
mochi.MochiServices.addLinkEvent("http://x.mochiads.com/link/5d3fd2a7fc21ad37", "http://www.stickpage.com/", linkBtn);
Frame 12
stop();
mochi.MochiServices.addLinkEvent("http://x.mochiads.com/link/aba3ab92c8948932", "http://www.stickpage.com/", linkBtn);
Frame 23
stop();
menuSound = new Sound();
menuSound.attachSound("menushot1.wav");
gunCockSound = new Sound();
gunCockSound.attachSound("guncock.wav");
startBtn.onRelease = function () {
frameTransition("play");
menuSound.start(0, 1);
testDay = testBox.text;
};
instructionsBtn.onRelease = function () {
menuSound.start(0, 1);
frameTransition("instructions");
};
optionsBtn.onRelease = function () {
menuSound.start(0, 1);
frameTransition("options");
};
if (Mode == null) {
Mode = "normal";
}
easyBtn.onRelease = function () {
Mode = "easy";
gunCockSound.start(0, 1);
};
normalBtn.onRelease = function () {
Mode = "normal";
gunCockSound.start(0, 1);
};
hardBtn.onRelease = function () {
Mode = "hard";
gunCockSound.start(0, 1);
};
testBtn.onRelease = function () {
Mode = "test";
gunCockSound.start(0, 1);
};
this.onEnterFrame = function () {
easyBtn.gotoAndStop("inactive");
normalBtn.gotoAndStop("inactive");
hardBtn.gotoAndStop("inactive");
testBtn.gotoAndStop("inactive");
if (Mode == "easy") {
easyBtn.gotoAndStop("active");
} else if (easyBtn.hitTest(_xmouse, _ymouse)) {
if (!easyBtn.asdf) {
gunCockSound.start(0, 1);
easyBtn.asdf = true;
}
easyBtn.gotoAndStop("hover");
} else {
easyBtn.asdf = false;
}
if (Mode == "normal") {
normalBtn.gotoAndStop("active");
} else if (normalBtn.hitTest(_xmouse, _ymouse)) {
if (!normalBtn.asdf) {
gunCockSound.start(0, 1);
normalBtn.asdf = true;
}
normalBtn.gotoAndStop("hover");
} else {
normalBtn.asdf = false;
}
if (Mode == "hard") {
hardBtn.gotoAndStop("active");
} else if (hardBtn.hitTest(_xmouse, _ymouse)) {
if (!hardBtn.asdf) {
gunCockSound.start(0, 1);
hardBtn.asdf = true;
}
hardBtn.gotoAndStop("hover");
} else {
hardBtn.asdf = false;
}
if (Mode == "test") {
testBtn.gotoAndStop("active");
} else if (testBtn.hitTest(_xmouse, _ymouse)) {
if (!testBtn.asdf) {
gunCockSound.start(0, 1);
testBtn.asdf = true;
}
testBtn.gotoAndStop("hover");
} else {
testBtn.asdf = false;
}
};
mochi.MochiServices.addLinkEvent("http://x.mochiads.com/link/ecf1edaae35d37e2", "http://www.stickpage.com/", linkBtn);
mochi.MochiServices.addLinkEvent("http://x.mochiads.com/link/1a61b0dcc6073d21", "http://www.stickpage.com/", moreGamesBtn);
Frame 32
backBtn.onRelease = function () {
frameTransition("title");
menuSound.start(0, 1);
};
high.onRelease = function () {
_root._quality = "HIGH";
gunCockSound.start(0, 1);
};
med.onRelease = function () {
_root._quality = "MEDIUM";
gunCockSound.start(0, 1);
};
low.onRelease = function () {
_root._quality = "LOW";
gunCockSound.start(0, 1);
};
Frame 42
backBtn.onRelease = function () {
frameTransition("title");
menuSound.start(0, 1);
};
Frame 52
function freeplay() {
function weaponBtnCheck() {
weapons.btn2._alpha = (weapons.btn3._alpha = (weapons.btn4._alpha = (weapons.btn5._alpha = (weapons.btn6._alpha = (weapons.btn7._alpha = 50)))));
weapons.btn1.gotoAndStop(1);
weapons.btn2.gotoAndStop(1);
weapons.btn3.gotoAndStop(1);
weapons.btn4.gotoAndStop(1);
weapons.btn5.gotoAndStop(1);
weapons.btn6.gotoAndStop(1);
weapons.btn7.gotoAndStop(1);
if (nailgunUnlocked) {
weapons.btn2._alpha = 100;
}
if (sniperUnlocked) {
weapons.btn3._alpha = 100;
}
if (rpgUnlocked) {
weapons.btn4._alpha = 100;
}
if (minigunUnlocked) {
weapons.btn5._alpha = 100;
}
if (deathrayUnlocked) {
weapons.btn6._alpha = 100;
}
if (laserUnlocked) {
weapons.btn7._alpha = 100;
}
if (weaponType == 1) {
weapons.btn1.gotoAndStop("active");
}
if (weaponType == 2) {
weapons.btn2.gotoAndStop("active");
}
if (weaponType == 3) {
weapons.btn3.gotoAndStop("active");
}
if (weaponType == 4) {
weapons.btn4.gotoAndStop("active");
}
if (weaponType == 5) {
weapons.btn5.gotoAndStop("active");
}
if (weaponType == 6) {
weapons.btn6.gotoAndStop("active");
}
if (weaponType == 7) {
weapons.btn7.gotoAndStop("active");
}
}
day = 1;
if (Mode == "test") {
nailgunUnlocked = true;
sniperUnlocked = true;
rpgUnlocked = true;
minigunUnlocked = true;
deathrayUnlocked = true;
laserUnlocked = true;
} else {
nailgunUnlocked = false;
sniperUnlocked = false;
rpgUnlocked = false;
minigunUnlocked = false;
deathrayUnlocked = false;
laserUnlocked = false;
}
if (Mode == "easy") {
hpVar = 1;
speedVar = 1;
speedVarOrig = speedVar;
moneyVar = 1;
} else if (Mode == "normal") {
hpVar = 2;
speedVar = 1.5;
speedVarOrig = speedVar;
moneyVar = 1.5;
} else if (Mode == "hard") {
hpVar = 3;
speedVar = 2;
speedVarOrig = speedVar;
moneyVar = 2;
} else if (Mode == "test") {
day = testDay;
hpVar = 2;
speedVar = 1.5;
speedVarOrig = speedVar;
moneyVar = 1.5;
moneyVar = 999999 /* 0x0F423F */;
Mode = "normal";
}
dayStarted = false;
gameOver = false;
shopOpen = false;
backgroundTimer.gotoAndPlay(2);
setTimeout(function () {
setupLevelText(1, day);
}, 2000);
pauseScreen._visible = false;
gamePaused = false;
berserkOnce = false;
bossOnly = true;
enemyLimit = 3;
enemyUnlocked = 1;
enemySpawnChance = 1.5;
bossSpawnChance = 0;
tankUnlocked = false;
heliUnlocked = false;
money = 0;
weaponType = 1;
weaponReady = false;
bulletRate = 150;
overHeatNum = 15;
shakeNum = 0;
particleNum = 0;
laserNum = 0;
shellNum = 0;
tankCounter = 0;
heliCounter = 0;
enemyNum = 0;
gliderNum = 0;
enemyCounter = 0;
Pause = 0;
shake = 0;
shakeX = 0;
shakeY = 0;
berserk = 0;
shakeDecay = 1;
overHeat = 1;
overHeated = false;
bulletDamage = 20;
maxLife = 100;
playerLife = maxLife;
bulletArray = [];
enemyArray = [];
shellBitmap = new flash.display.BitmapData(800, 600, true, 0);
this.createEmptyMovieClip("effects", 1599);
effects.attachBitmap(shellBitmap, 1600);
chachingSound = new Sound();
chachingSound.attachSound("chaching.wav");
machineGunSound = new Sound();
machineGunSound.attachSound("machinegun.wav");
nailGunSound = new Sound();
nailGunSound.attachSound("nailgun.wav");
sniperSound = new Sound();
sniperSound.attachSound("autosniper2.wav");
rpgSound = new Sound();
rpgSound.attachSound("rocket.wav");
miniGunSound = new Sound();
miniGunSound.attachSound("ak.wav");
laserSound = new Sound();
laserSound.attachSound("disruptor.wav");
if (deathRaySound == null) {
this.createEmptyMovieClip("soundContainer1", 99999998);
_root.deathRaySound = new Sound(soundContainer1);
_root.deathRaySound.attachSound("beam2.wav");
_root.deathRaySound.stop();
}
ricochetSound = new Sound();
ricochetSound.attachSound("ricochet.wav");
steamSound = new Sound();
steamSound.attachSound("steam.wav");
berserkSound = new Sound();
berserkSound.attachSound("berserkyell.wav");
bloodSound = new Sound();
bloodSound.attachSound("blood.wav");
weaponSound = machineGunSound;
bulletType = "bullet";
keyListener = new Object();
theInterface = attachMovie("interface", "interface1", 902929, {_x:intSpot._x, _y:intSpot._y});
intSpot._visible = false;
pauseBtn = attachMovie("pauseThing", "pauseBtn1", 902932, {_x:pauseSpot._x, _y:pauseSpot._y});
pauseSpot._visible = false;
pauseBtn.onRelease = function () {
if (((!gamePaused) && (!shopOpen)) && (!gameOver)) {
Pause = 1;
theHero.gotoAndStop("normal");
gamePaused = true;
backgroundTimer.stop();
thePauseScreen = attachMovie("pausescreen", "pausescreen1", 902931, {_x:Stage.width / 2, _y:Stage.height / 2});
} else if ((gamePaused && (!shopOpen)) && (!gameOver)) {
Pause = 0;
gamePaused = false;
backgroundTimer.play();
thePauseScreen.removeMovieClip();
}
};
keyListener.onKeyDown = function () {
var _local1 = Key.getCode();
if ((((_local1 == 80) && (!gamePaused)) && (!shopOpen)) && (!gameOver)) {
Pause = 1;
theHero.gotoAndStop("normal");
gamePaused = true;
backgroundTimer.stop();
thePauseScreen = attachMovie("pausescreen", "pausescreen1", 902931, {_x:Stage.width / 2, _y:Stage.height / 2});
} else if ((((_local1 == 80) && (gamePaused)) && (!shopOpen)) && (!gameOver)) {
Pause = 0;
gamePaused = false;
backgroundTimer.play();
thePauseScreen.removeMovieClip();
}
if ((_local1 == 49) && (weaponType != 1)) {
bulletType = "bullet";
weaponSound = machineGunSound;
weaponType = 1;
overHeatNum = 15;
bulletRate = 150;
shakeNum = 0;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 20;
if (mouseIsDown) {
clearInterval(bulletInt);
}
} else if (((_local1 == 50) && (weaponType != 2)) && (nailgunUnlocked)) {
bulletType = "nail";
weaponSound = nailGunSound;
weaponType = 2;
overHeatNum = 10;
bulletRate = 120;
shakeNum = 0;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 20;
if (mouseIsDown) {
clearInterval(bulletInt);
}
} else if (((_local1 == 51) && (weaponType != 3)) && (sniperUnlocked)) {
bulletType = "bullet";
weaponSound = sniperSound;
weaponType = 3;
overHeatNum = 24;
bulletRate = 250;
shakeNum = 5;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 100;
if (mouseIsDown) {
clearInterval(bulletInt);
}
} else if (((_local1 == 52) && (weaponType != 4)) && (rpgUnlocked)) {
bulletType = "rpg";
weaponSound = rpgSound;
weaponType = 4;
overHeatNum = 40;
bulletRate = 500;
shakeNum = 10;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 100;
if (mouseIsDown) {
clearInterval(bulletInt);
}
} else if (((_local1 == 53) && (weaponType != 5)) && (minigunUnlocked)) {
bulletType = "bullet";
weaponSound = miniGunSound;
weaponType = 5;
overHeatNum = 3;
bulletRate = 1;
shakeNum = 1;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 20;
if (mouseIsDown) {
clearInterval(bulletInt);
}
} else if (((_local1 == 54) && (weaponType != 6)) && (deathrayUnlocked)) {
bulletType = "bullet";
weaponSound = null;
weaponType = 6;
overHeatNum = 5;
shakeNum = 0;
bulletRate = 500;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 100;
if (mouseIsDown) {
clearInterval(bulletInt);
}
} else if (((_local1 == 55) && (weaponType != 7)) && (laserUnlocked)) {
bulletType = "bullet";
weaponType = 7;
overHeatNum = 60;
bulletRate = 500;
shakeNum = 10;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 9999;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weaponBtnSpot._visible = false;
weapons = attachMovie("weaponBtn", "weaponBtn1", 902930, {_x:weaponBtnSpot._x, _y:weaponBtnSpot._y});
weapons.btn1.onRelease = function () {
if (weaponType != 1) {
bulletType = "bullet";
weaponSound = machineGunSound;
weaponType = 1;
overHeatNum = 15;
bulletRate = 150;
shakeNum = 0;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 20;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weapons.btn2.onRelease = function () {
if ((weaponType != 2) && (nailgunUnlocked)) {
bulletType = "nail";
weaponSound = nailGunSound;
weaponType = 2;
overHeatNum = 10;
bulletRate = 120;
shakeNum = 0;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 20;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weapons.btn3.onRelease = function () {
if ((weaponType != 3) && (sniperUnlocked)) {
bulletType = "bullet";
weaponSound = sniperSound;
weaponType = 3;
overHeatNum = 24;
bulletRate = 250;
shakeNum = 5;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 100;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weapons.btn4.onRelease = function () {
if ((weaponType != 4) && (rpgUnlocked)) {
bulletType = "rpg";
weaponSound = rpgSound;
weaponType = 4;
overHeatNum = 40;
bulletRate = 500;
shakeNum = 10;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 100;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weapons.btn5.onRelease = function () {
if ((weaponType != 5) && (minigunUnlocked)) {
bulletType = "bullet";
weaponSound = miniGunSound;
weaponType = 5;
overHeatNum = 3;
bulletRate = 1;
shakeNum = 1;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 20;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weapons.btn6.onRelease = function () {
if ((weaponType != 6) && (deathrayUnlocked)) {
bulletType = "bullet";
weaponSound = null;
weaponType = 6;
overHeatNum = 5;
shakeNum = 0;
bulletRate = 500;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 100;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
weapons.btn7.onRelease = function () {
if ((weaponType != 7) && (laserUnlocked)) {
bulletType = "bullet";
weaponType = 7;
overHeatNum = 60;
bulletRate = 500;
shakeNum = 10;
if (berserk == 1) {
bulletRate = bulletRate * 0.6;
}
bulletDamage = 9999;
if (mouseIsDown) {
clearInterval(bulletInt);
}
}
};
Key.addListener(keyListener);
setupHero();
setupWall();
setupCrosshair();
dayVars();
onEnterFrame = function () {
if (Pause == 0) {
enemyCleanup();
muteCheck();
spawnEnemy();
deathCheck();
shakeScreen();
coolMeDown();
moveBullets();
weaponBtnCheck();
if (Key.isDown(32)) {
berserkMode();
}
if (!berserkOnce) {
theInterface.berserkBtn.gotoAndStop(1);
} else {
theInterface.berserkBtn.gotoAndStop(2);
}
}
};
theInterface.berserkBtn.onRelease = function () {
berserkMode();
};
onMouseDown = function () {
mouseIsDown = true;
if (((!shopOpen) && (Pause == 0)) && (!gameOver)) {
clearInterval(bulletInt);
if (weaponType == 1) {
bullet();
bulletInt = setInterval(this, "bullet", bulletRate);
} else if (weaponType == 2) {
bullet();
bulletInt = setInterval(this, "bullet", bulletRate);
} else if (weaponType == 3) {
bullet();
bulletInt = setInterval(this, "bullet", bulletRate);
} else if (weaponType == 4) {
bullet();
bulletInt = setInterval(this, "bullet", bulletRate);
} else if (weaponType == 5) {
bullet();
bulletInt = setInterval(this, "bullet", bulletRate);
} else if (weaponType == 6) {
if (!overHeated) {
deathRaySound.start(0, 9999);
createDeathRay();
}
} else if (weaponType == 7) {
createLaser();
bulletInt = setInterval(this, "createLaser", bulletRate);
}
}
};
onMouseUp = function () {
mouseIsDown = false;
clearInterval(bulletInt);
if (weaponType == 6) {
theDeathRay.removeMovieClip();
}
deathRaySound.stop();
};
}
function dayOver() {
dayStarted = false;
clearInterval(bulletInt);
thePauseScreen.removeMovieClip();
Pause = 0;
openShop();
destroyAll(enemyArray);
enemyArray = [];
enemyCounter = 0;
tankCounter = 0;
heliCounter = 0;
destroyAll(bulletArray);
bulletArray = [];
particleNum = 0;
}
function nextDay() {
day++;
dayVars();
textCounter = 1;
berserkOnce = false;
backgroundTimer.gotoAndPlay(2);
setTimeout(function () {
setupLevelText(1, day);
}, 1000);
}
function dayVars() {
enemyLimit = 3 + Math.floor(day / 5);
enemySpawnChance = 1.5 + (day * 0.2);
if (day <= 4) {
enemyUnlocked = 1;
bossSpawnChance = 0;
tankUnlocked = false;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 8) {
enemyUnlocked = 2;
bossSpawnChance = 0;
tankUnlocked = false;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 12) {
enemyUnlocked = 3;
bossSpawnChance = 0;
tankUnlocked = false;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 16) {
enemyUnlocked = 4;
bossSpawnChance = 0;
tankUnlocked = false;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 20) {
if (day == 17) {
setupTank();
}
enemyUnlocked = 4;
bossSpawnChance = 0.2;
tankUnlocked = true;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 24) {
enemyUnlocked = 5;
bossSpawnChance = 0.2;
tankUnlocked = true;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 28) {
enemyUnlocked = 6;
bossSpawnChance = 0.2;
tankUnlocked = true;
heliUnlocked = false;
bossOnly = true;
} else if (day <= 32) {
if (day == 29) {
setupHeli();
}
enemyUnlocked = 6;
bossSpawnChance = 0.3;
tankUnlocked = true;
heliUnlocked = true;
bossOnly = true;
} else {
enemyLimit = 9 + Math.floor(day / 1);
speedVar = speedVarOrig + ((day - 32) * 0.1);
enemyUnlocked = 6;
bossSpawnChance = 0.3 + ((day - 32) * 0.1);
tankUnlocked = true;
heliUnlocked = true;
bossOnly = false;
}
}
function generateText(textVar) {
textGen.alphaTo(100, 2, 0, 0, "fadeoutText");
textGenText = textVar;
}
function fadeoutText() {
textCounter++;
textGen.alphaTo(0, 2, 0, 10, "followUpText");
}
function followUpText() {
if ((day == 1) && (!gameOver)) {
if (textCounter == 2) {
generateText("WASD/Arrows to move");
}
if (textCounter == 3) {
generateText("Spacebar for berserk");
}
if (textCounter == 4) {
generateText("ProtIp: Headshots deal trIple");
}
}
}
function moneyCheck() {
if (money > 999999) {
money = 999999 /* 0x0F423F */;
}
}
function destroyAll(array) {
for (i in array) {
array[i].removeMovieClip();
array[i].splice(x, 1);
}
array = [];
}
function setupCrosshair() {
Mouse.hide();
theCrosshair = attachMovie("crosshair", "crosshair", 999000, {_x:_xmouse, _y:_ymouse});
theCrosshair.onMouseMove = function () {
this._x = _xmouse;
this._y = _ymouse;
};
}
function openShop() {
theHero.gotoAndStop("normal");
shopOpen = true;
theCrosshair.removeMovieClip();
Mouse.show();
stopAllSounds();
theFpsLock = attachMovie("fpslock", "fpslock1", 191829);
theShop = attachMovie("shopscreen", "shopscreen1", 918898, {_x:Stage.width / 2, _y:Stage.height / 2});
}
function muteCheck() {
if (Mute) {
steamSound.setVolume(0);
} else {
steamSound.setVolume(100);
}
}
function deathCheck() {
if ((playerLife <= 0) && (!gameOver)) {
gameOver = true;
playerLife = 0;
endGame();
}
}
function cleanUpEverything() {
gameOver = true;
weapons.removeMovieClip();
pauseBtn.removeMovieClip();
theInterface.removeMovieClip();
backgroundTimer.stop();
stopAllSounds();
theFpsLock = attachMovie("fpslock", "fpslock1", 191829);
Pause = 1;
theDeathRay.removeMovieClip();
clearInterval(bulletInt);
destroyAll(enemyArray);
destroyAll(bulletArray);
theShop.removeMovieClip();
effects.removeMovieClip();
theHero.removeMovieClip();
theWall.removeMovieClip();
theCrosshair.removeMovieClip();
Mouse.show();
}
function winGame() {
frameTransition("win");
}
function endGame() {
frameTransition2("gameover");
}
function setupLevelText(theNum, theText) {
dayStarted = true;
thePickupText = attachMovie("leveltext", "leveltext", 120000, {_x:Stage.width / 2, _y:Stage.height / 2});
thePickupText.gotoAndStop(theNum);
thePickupText.output = "Day " + theText;
thePickupText.alphaRate = 2;
thePickupText.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
if (day == 1) {
generateText("AIm and clIck to shoot");
}
if (day == 2) {
generateText("ProtIp: P to pause");
}
if (day == 3) {
generateText("Number keys to change weapons");
}
if (day == 6) {
generateText("ProtIp: The cake Is a lIe");
}
if (day == 9) {
generateText("Cows can be traIned to kIll");
}
if (day == 13) {
generateText("ProtIp: AIm for the feet");
}
if (day == 17) {
generateText("ProtIp: AIm for the head");
}
if (day == 25) {
generateText("Send In the glIders!");
}
if (day == 29) {
generateText("ProtIp: AIm for the glass");
}
if (day == 35) {
generateText("NothIng wItty to say");
}
if (day == 38) {
generateText("ProtIp: 1+1=2");
}
this.removeMovieClip();
}
};
}
function spawnEnemy() {
if (dayStarted) {
spawnMe = Math.random() * 100;
if (bossOnly) {
if (((spawnMe <= bossSpawnChance) && (tankCounter < 1)) && (heliCounter < 1)) {
enemyGen = Math.ceil(Math.random() * 2);
if ((enemyGen == 1) && (tankUnlocked)) {
setupTank();
} else if ((enemyGen == 2) && (heliUnlocked)) {
setupHeli();
} else {
setupTank();
}
}
if ((((spawnMe <= enemySpawnChance) && (enemyCounter < enemyLimit)) && (tankCounter < 1)) && (heliCounter < 1)) {
var enemyGen = Math.ceil(Math.random() * enemyUnlocked);
if (enemyGen <= 5) {
setupEnemy(enemyGen);
} else {
setupFlyingEnemy(enemyGen);
}
}
} else {
if (spawnMe <= bossSpawnChance) {
enemyGen = Math.ceil(Math.random() * 2);
if ((enemyGen == 1) && (tankUnlocked)) {
setupTank();
} else if ((enemyGen == 2) && (heliUnlocked)) {
setupHeli();
} else {
setupTank();
}
}
if ((spawnMe <= enemySpawnChance) && (enemyCounter < enemyLimit)) {
var enemyGen = Math.ceil(Math.random() * enemyUnlocked);
if (enemyGen <= 5) {
setupEnemy(enemyGen);
} else {
setupFlyingEnemy(enemyGen);
}
}
}
}
}
function berserkMode() {
if ((((berserk == 0) && (!berserkOnce)) && (!shopOpen)) && (Pause == 0)) {
berserkOnce = true;
berserkSound.start(0, 1);
bulletRate = bulletRate * 0.6;
if (mouseIsDown) {
clearInterval(bulletInt);
bulletInt = setInterval(this, "bullet", bulletRate);
}
berserk = 1;
overHeated = false;
setTimeout(_root, "unshake", 300);
setTimeout(_root, "unberserk", 4000);
}
}
function unberserk() {
bulletRate = bulletRate / 0.6;
if (mouseIsDown) {
clearInterval(bulletInt);
bulletInt = setInterval(this, "bullet", bulletRate);
}
overHeat = 1;
berserk = 0;
}
function unshake() {
shake = shake - 10;
}
function createLaser() {
var _local1 = _xmouse;
if (_local1 > wallspot._x) {
_local1 = wallspot._x;
}
var _local2 = -50;
if (!overHeated) {
overHeat = overHeat + overHeatNum;
if (overHeat >= 100) {
overHeat = 100;
if (berserk == 0) {
steamSound.start(0, 1);
overHeated = true;
overHeatTime = getTimer();
}
}
if (shake < 30) {
shake = shake + 5;
} else {
shake = 30;
}
shake = shake + shakeNum;
laserSound.start(0, 1);
theLaser = attachMovie("disruptor", "disruptor", 100205 + laserNum, {_x:_local1, _y:_local2});
theLaser.damage = bulletDamage;
laserNum++;
if (laserNum > 100) {
laserNum = 0;
}
}
}
function createDeathRay() {
theDeathRay = attachMovie("deathray", "deathray", 100205, {_x:bulletHoleX, _y:bulletHoleY});
theDeathRay._rotation = theHero.hero.gun.dir + 100;
theDeathRay.damage = bulletDamage;
theDeathRay.onEnterFrame = function () {
shake = 5;
overHeat = overHeat + overHeatNum;
if (overHeat >= 100) {
overHeat = 100;
if (berserk == 0) {
steamSound.start(0, 1);
overHeated = true;
overHeatTime = getTimer();
deathRaySound.stop();
this.removeMovieClip();
}
}
};
}
function setupHero() {
theHero = attachMovie("hero", "hero", 59999);
theHero._x = gunnerPoint._x;
theHero._y = gunnerPoint._y;
theHero.walkbackward = false;
theHero.walkforward = false;
theHero.walkup = false;
theHero.walkdown = false;
theHero.onEnterFrame = function () {
theDeathRay._x = bulletHoleX;
theDeathRay._y = bulletHoleY;
theDeathRay._rotation = theHero.hero.gun.dir + 95;
if ((!shopOpen) && (!gamePaused)) {
if ((Key.isDown(87) || (Key.isDown(38))) && (!limitTop.hitTest(this._x, this._y, false))) {
if ((((!Key.isDown(68)) && (!Key.isDown(65))) && (!Key.isDown(39))) && (!Key.isDown(37))) {
this.gotoAndStop("walkup");
}
theDeathRay._y = theDeathRay._y - 5;
this._y = this._y - 5;
}
if (((Key.isDown(83) || (Key.isDown(40))) && (!limitLeft.hitTest(this._x, this._y, true))) && (!limitBottom.hitTest(this._x, this._y, false))) {
if ((((!Key.isDown(68)) && (!Key.isDown(65))) && (!Key.isDown(39))) && (!Key.isDown(37))) {
this.gotoAndStop("walkdown");
}
theDeathRay._y = theDeathRay._y + 5;
this._y = this._y + 5;
}
if ((Key.isDown(68) || (Key.isDown(39))) && (!limitRight.hitTest(this._x, this._y, false))) {
this.gotoAndStop("walkbackward");
this._x = this._x + 5;
theDeathRay._x = theDeathRay._x + 5;
}
if ((Key.isDown(65) || (Key.isDown(37))) && (!limitLeft.hitTest(this._x, this._y, true))) {
this.gotoAndStop("walkforward");
this._x = this._x - 5;
theDeathRay._x = theDeathRay._x - 5;
}
if ((((((((!Key.isDown(68)) && (!Key.isDown(83))) && (!Key.isDown(65))) && (!Key.isDown(87))) && (!Key.isDown(37))) && (!Key.isDown(39))) && (!Key.isDown(38))) && (!Key.isDown(40))) {
this.gotoAndStop("normal");
}
}
};
}
function setupWall() {
theWall = attachMovie("wall1", "wall", 19999);
theWall._x = wallspot._x;
theWall._y = wallspot._y;
}
function setupGlider(sprite) {
theGlider = attachMovie("glider", "glider_" + gliderNum, 1500 + gliderNum);
theGlider.cacheAsBitmap = true;
theGlider._x = sprite._x + sprite.glider._x;
theGlider._y = sprite._y + sprite.glider._y;
theGlider.dx = sprite.dxOrig;
gliderNum++;
enemyArray.push(theGlider);
if (gliderNum > 50) {
gliderNum = 0;
}
theGlider.onEnterFrame = function () {
this._x = this._x + this.dx;
if (this._x > (Stage.width + (this._width * 0.5))) {
this.dead = true;
}
if (this._x < (-(this._width * 0.5))) {
this.dead = true;
}
if (this._y > (Stage.height + (this._height * 0.5))) {
this.dead = true;
}
if (this._y < (-(this._height * 0.5))) {
this.dead = true;
}
};
}
function enemyCleanup() {
for (x in enemyArray) {
if (enemyArray[x].dead) {
enemyArray[x].removeMovieClip();
enemyArray.splice(x, 1);
}
}
}
function setupEnemy(enemyGen) {
theY = Math.ceil(((zone._height * Math.random()) + zone._y) - (zone._height * 0.5));
if (this.getInstanceAtDepth((40000 + (theY * 10)) + enemyNum) != undefined) {
trace("overlap");
setupEnemy(enemyGen);
} else {
theEnemy = attachMovie("enemy" + enemyGen, ("enemy_40000" + (theY * 10)) + enemyNum, (40000 + (theY * 10)) + enemyNum);
theEnemy._x = (((-zone._width) * 0.5) + zone._x) - (theEnemy._width * 0.5);
theEnemy._y = theY;
theEnemy.dead = false;
theEnemy.depth = (40000 + (theY * 10)) + enemyNum;
theEnemy.counter = 0;
theEnemy.attack = 0;
enemyNum++;
if (enemyNum >= 9) {
enemyNum = 0;
}
enemyArray.push(theEnemy);
enemyCounter++;
theEnemy.onEnterFrame = function () {
if (Pause == 0) {
this._x = this._x + this.dx;
if (this.attack == 0) {
if (stopMe.hitTest(this._x, this._y, false)) {
if ((stopMe.hitTest(this._x, this._y, true) && (this.attack == 0)) && (this.counter == 0)) {
this.dx = 0;
this.attack = 1;
this.gotoAndStop("attack");
}
}
}
if (weaponType == 6) {
if (theDeathRay.hitTest(this._x + this.body._x, this._y + this.body._y, true)) {
this.hp = this.hp - theDeathRay.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
this.gotoAndStop("dieNormal");
} else if ((this.hp <= 0) || (this.hp == null)) {
this.gotoAndStop("dieNormal");
}
}
}
if (weaponType == 7) {
if (theLaser.hitTest(this._x + this.body._x, this._y + this.body._y, true)) {
this.hp = this.hp - theLaser.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
this.gotoAndStop("dieNormal");
} else if ((this.hp <= 0) || (this.hp == null)) {
this.gotoAndStop("dieNormal");
}
}
}
for (x in bulletArray) {
if (this.hitTest(bulletArray[x])) {
if (this.body.hitTest(bulletArray[x])) {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
this.hp = this.hp - bulletArray[x].damage;
if (bulletArray[x].weaponType != 4) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
} else {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
}
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
this.gotoAndStop("dieNormal");
} else if ((this.hp <= 0) || (this.hp == null)) {
this.gotoAndStop("dieNormal");
}
}
if (this.head.hitTest(bulletArray[x])) {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
this.hp = this.hp - (bulletArray[x].damage * 3);
if (bulletArray[x].weaponType != 4) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
this.gotoAndStop("dieNormal");
} else if ((this.hp <= 0) || (this.hp == null)) {
this.gotoAndStop("dieNormal");
}
}
if (this.block.hitTest(bulletArray[x])) {
spark(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
ricochetSound.start(0, 1);
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
}
}
}
};
}
}
function setupFlyingEnemy(enemyGen) {
theY = ((flyzone._height * Math.random()) + flyzone._y) - (flyzone._height * 0.5);
if (this.getInstanceAtDepth((40000 + (theY * 10)) + enemyNum) != undefined) {
setupFlyingEnemy(enemyGen);
} else {
theEnemy = attachMovie("enemyfly" + enemyGen, "enemy_" + enemyNum, (40000 + (theY * 10)) + enemyNum);
theEnemy._x = (((-zone._width) * 0.5) + zone._x) - (theEnemy._width * 0.5);
theEnemy._y = theY;
theEnemy.counter = 0;
theEnemy.attack = 0;
enemyNum++;
if (enemyNum >= 9) {
enemyNum = 0;
}
enemyArray.push(theEnemy);
enemyCounter++;
theEnemy.onEnterFrame = function () {
if (Pause == 0) {
this._x = this._x + this.dx;
if (this.attack == 0) {
if (stopMeFly.hitTest(this._x, this._y, false)) {
if ((stopMeFly.hitTest(this._x, this._y, true) && (this.attack == 0)) && (this.counter == 0)) {
this.counter = 1;
this.attack = 1;
this.gotoAndStop("attack");
clearInterval(this.attackInt);
}
}
}
if (weaponType == 6) {
if (theDeathRay.hitTest(this._x + this.body._x, this._y + this.body._y, true)) {
this.hp = this.hp - theDeathRay.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
this.counter++;
enemyCounter--;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
delete this.onEnterFrame;
}
}
}
if (weaponType == 7) {
if (theLaser.hitTest(this._x + this.body._x, this._y + this.body._y, true)) {
this.hp = this.hp - theLaser.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
this.counter++;
enemyCounter--;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
delete this.onEnterFrame;
}
}
}
for (x in bulletArray) {
if (this.hitTest(bulletArray[x])) {
if (this.body.hitTest(bulletArray[x])) {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
this.hp = this.hp - bulletArray[x].damage;
if (bulletArray[x].weaponType != 4) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
} else {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
}
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
this.counter++;
enemyCounter--;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
delete this.onEnterFrame;
}
}
if (this.head.hitTest(bulletArray[x])) {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
this.hp = this.hp - (bulletArray[x].damage * 3);
if (bulletArray[x].weaponType != 4) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (100 * moneyVar);
this.counter++;
enemyCounter--;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
}
}
if (this.block.hitTest(bulletArray[x])) {
spark(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
ricochetSound.start(0, 1);
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
}
}
}
};
}
}
function setupHeli() {
theY = (((flyzone._height * Math.random()) + flyzone._y) - (flyzone._height * 0.5)) + (flyzone._height * 1);
if (this.getInstanceAtDepth((40000 + (theY * 10)) + enemyNum) != undefined) {
setupHeli();
} else {
theEnemy = attachMovie("enemyheli", "enemy_" + enemyNum, (40000 + (theY * 10)) + enemyNum);
theEnemy._x = (((-zone._width) * 0.5) + zone._x) - (theEnemy._width * 0.5);
theEnemy._y = theY;
theEnemy.counter = 0;
theEnemy.attack = 0;
enemyNum++;
if (enemyNum >= 9) {
enemyNum = 0;
}
enemyArray.push(theEnemy);
heliCounter++;
theEnemy.onEnterFrame = function () {
if (Pause == 0) {
this._x = this._x + this.dx;
if (this.attack == 0) {
shake = 5 + ((2.5 * heliCounter) - 1);
if (stopMeFly.hitTest(this._x, this._y, false)) {
if ((stopMeFly.hitTest(this._x, this._y, true) && (this.attack == 0)) && (this.counter == 0)) {
this.dx = 0;
this.attack = 1;
this.gotoAndStop("attack");
this.heli.copter.gun.play();
clearInterval(this.attackInt);
}
}
}
if (weaponType == 6) {
if (theDeathRay.hitTest(this._x + this.body._x, this._y + this.body._y, true)) {
this.hp = this.hp - theDeathRay.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1500 * moneyVar);
moneyCheck();
this.counter++;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
delete this.onEnterFrame;
}
}
}
if (weaponType == 7) {
if (theLaser.hitTest(this._x + this.body._x, this._y + this.body._y, true)) {
this.hp = this.hp - theLaser.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1500 * moneyVar);
moneyCheck();
this.counter++;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
delete this.onEnterFrame;
}
}
}
for (x in bulletArray) {
if (this.hitTest(bulletArray[x])) {
if (this.body.hitTest(bulletArray[x])) {
this.hp = this.hp - bulletArray[x].damage;
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1500 * moneyVar);
moneyCheck();
this.counter++;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
delete this.onEnterFrame;
}
}
if (this.head.hitTest(bulletArray[x])) {
this.hp = this.hp - (bulletArray[x].damage * 3);
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1500 * moneyVar);
moneyCheck();
this.counter++;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
}
}
if (this.block.hitTest(bulletArray[x])) {
spark(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
ricochetSound.start(0, 1);
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
}
}
}
};
}
}
function setupTank() {
theY = ((zone._height * Math.random()) + zone._y) - (zone._height * 0.5);
if (this.getInstanceAtDepth((40000 + (theY * 10)) + enemyNum) != undefined) {
setupTank();
} else {
theEnemy = attachMovie("enemytank", "enemy_" + enemyNum, (40000 + (theY * 10)) + enemyNum);
theEnemy._x = (((-zone._width) * 0.5) + zone._x) - (theEnemy._width * 0.5);
theEnemy._y = theY;
theEnemy.counter = 0;
theEnemy.attack = 0;
enemyNum++;
if (enemyNum >= 9) {
enemyNum = 0;
}
enemyArray.push(theEnemy);
tankCounter++;
theEnemy.onEnterFrame = function () {
if (Pause == 0) {
this._x = this._x + this.dx;
if (this.attack == 0) {
shake = 5 + ((2.5 * tankCounter) - 1);
if (stopMe.hitTest(this._x, this._y, false)) {
if (stopMe.hitTest(this._x, this._y, true)) {
this.dx = 0;
this.attack = 1;
this.gotoAndStop("attack");
}
}
}
if (weaponType == 6) {
if (theDeathRay.hitTest(this._x + this.block2._x, this._y + this.block2._y, true)) {
this.hp = this.hp - theDeathRay.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1000 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
}
}
}
if (weaponType == 7) {
if (theLaser.hitTest(this._x + this.block2._x, this._y + this.block2._y, true)) {
this.hp = this.hp - theLaser.damage;
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1000 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
}
}
}
for (x in bulletArray) {
if (this.hitTest(bulletArray[x])) {
if (this.body.hitTest(bulletArray[x])) {
this.hp = this.hp - bulletArray[x].damage;
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1000 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
}
}
if (this.head.hitTest(bulletArray[x])) {
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
blood(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
this.hp = this.hp - (bulletArray[x].damage * 3);
if (bulletArray[x].weaponType != 4) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if ((this.hp <= 0) && (this.counter == 0)) {
money = money + (1000 * moneyVar);
moneyCheck();
this.counter++;
this.dx = 0;
clearInterval(this.attackInt);
this.gotoAndStop("dieNormal");
}
}
if (this.block.hitTest(bulletArray[x])) {
spark(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
ricochetSound.start(0, 1);
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if (this.block2.hitTest(bulletArray[x])) {
spark(bulletArray[x]._x, bulletArray[x]._y, -bulletArray[x].dir, this.dx);
ricochetSound.start(0, 1);
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
}
}
}
};
}
}
function removeMe(sprite) {
sprite.removeMovieClip();
}
function damageMe(T) {
if (T.damage == null) {
} else {
playerLife = playerLife - T.damage;
}
}
function moveBullets() {
for (x in bulletArray) {
bulletArray[x]._x = bulletArray[x]._x + bulletArray[x].dx;
bulletArray[x]._y = bulletArray[x]._y + bulletArray[x].dy;
if (bulletArray[x]._x > (Stage.width + (bulletArray[x]._width * 0.5))) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if (bulletArray[x]._x < (-(bulletArray[x]._width * 0.5))) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if (bulletArray[x]._y > (Stage.height + (bulletArray[x]._height * 0.5))) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
if (bulletArray[x]._y < (-(bulletArray[x]._height * 0.5))) {
bulletArray[x].removeMovieClip();
bulletArray.splice(x, 1);
}
}
}
function makeArms() {
removeMovieClip("Right");
_root.createEmptyMovieClip("Right", 0);
with (Right) {
moveTo(theGunner.rightArm._x + theGunner._x, theGunner.rightArm._y + theGunner._y);
lineStyle(3, 0, 100);
mc3x = theGunner.mc1._x + theGunner._x;
mc3y = theGunner.mc1._y + theGunner._y;
mc2x = theGunner.theMachineGun.theGun.rightHand.Point.x - shakeX;
mc2y = theGunner.theMachineGun.theGun.rightHand.Point.y - shakeY;
curveTo(mc3x, mc3y, mc2x, mc2y);
}
removeMovieClip("Left");
_root.createEmptyMovieClip("Left", 1);
with (Left) {
moveTo(theGunner.leftArm._x + theGunner._x, theGunner.leftArm._y + theGunner._y);
lineStyle(3, 0, 100);
mc3x = theGunner.mc2._x + theGunner._x;
mc3y = theGunner.mc2._y + theGunner._y;
mc2x = theGunner.theMachineGun.theGun.leftHand.Point.x - shakeX;
mc2y = theGunner.theMachineGun.theGun.leftHand.Point.y - shakeY;
curveTo(mc3x, mc3y, mc2x, mc2y);
}
}
function coolMeDown() {
if (overHeat > 1) {
overHeat = overHeat - 2;
} else {
overHeat = 1;
overHeated = false;
}
}
function shakeScreen() {
if (berserk == 1) {
shake2 = 10;
}
shakeX = ((Math.random() * shake2) * 2) - shake2;
shakeY = ((Math.random() * shake2) * 2) - shake2;
_x = shakeX;
_y = shakeY;
if (shake2 > 0) {
shake2 = shake2 - shakeDecay;
} else {
shake2 = 0;
}
}
function shakeIt(sprite) {
sprite._x = sprite._x + (((Math.random() * shake) * 2) - shake);
sprite._y = sprite._y + (((Math.random() * shake) * 2) - shake);
}
function turn(sprite) {
degrees = sprite.dir - 90;
radians = (degrees / 180) * 3.141593;
sprite.dx = Math.cos(radians);
sprite.dy = Math.sin(radians);
sprite.dx = sprite.dx * sprite.speed;
sprite.dy = sprite.dy * sprite.speed;
}
function outerLimits(T) {
if (T._x > (Stage.width + (T._width * 0.5))) {
T.removeMovieClip();
}
if (T._x < (-(T._width * 0.5))) {
T.removeMovieClip();
}
if (T._y > (Stage.height + (T._height * 0.5))) {
T.removeMovieClip();
}
if (T._y < (-(T._height * 0.5))) {
T.removeMovieClip();
}
}
function bullet(targetX, targetY, theDir) {
if (!overHeated) {
weaponSound.start();
if (((weaponType == 1) || (weaponType == 3)) || (weaponType == 5)) {
shell(shellHoleX, shellHoleY, gunDir);
}
overHeat = overHeat + overHeatNum;
if (overHeat >= 100) {
overHeat = 100;
if (berserk == 0) {
steamSound.start(0, 1);
overHeated = true;
overHeatTime = getTimer();
}
}
if (shake < 30) {
shake = shake + shakeNum;
} else {
shake = 30;
}
var _local2 = bulletHoleX;
var _local1 = bulletHoleY;
theParticle = attachMovie(bulletType, "particlebullet" + particleNum, 20000 + particleNum, {_x:_local2, _y:_local1});
theParticle.weaponType = weaponType;
theParticle.damage = bulletDamage;
if (weaponType == 3) {
theParticle.dir = gunDir + 1;
} else if (weaponType == 4) {
theParticle.dir = gunDir - 1.5;
} else {
theParticle.dir = ((Math.random() * 5) - 2.5) + gunDir;
}
theParticle._rotation = theParticle.dir;
theParticle.cacheAsBitmap = true;
if (weaponType == 4) {
theParticle.speed = 30;
} else {
theParticle.speed = ((Math.random() * 5) - 2.5) + 20;
}
turn(theParticle);
theParticle.alphaRate = 0;
particleNum++;
if (particleNum >= 5000) {
particleNum = 5000;
}
bulletArray.push(theParticle);
theParticle.onEnterFrame = function () {
};
}
}
function blood(targetX, targetY, theDir, theSpeed) {
i = 0;
while (i < 5) {
var _local3 = targetX + (Math.random() * -5);
var _local2 = targetY + (Math.random() * -2);
theParticle = attachMovie("particleblood", "particleblood" + particleNum, 20000 + particleNum);
theParticle.cacheAsBitmap = true;
theParticle._x = _local3;
theParticle._y = _local2;
theParticle.dir = ((Math.random() * 60) - 30) + theDir;
theParticle._rotation = theParticle.dir;
theParticle.gravity = 0.5;
theParticle.speed = (theSpeed + (Math.random() * 2)) + 2;
turn(theParticle);
theParticle.alphaRate = 10;
particleNum++;
if (particleNum >= 5000) {
particleNum = 5000;
}
theParticle.onEnterFrame = function () {
outerLimits(this);
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + this.gravity;
this.dir = ((Math.atan2(this.dy, this.dx) / 3.141593) * 180) + 90;
this._alpha = this._alpha - this.alphaRate;
this._rotation = this.dir;
};
i++;
}
}
function spark(targetX, targetY, theDir, theSpeed) {
var _local3 = targetX;
var _local2 = targetY;
theParticle = attachMovie("particlespark", "particlespark" + particleNum, 20000 + particleNum);
theParticle.cacheAsBitmap = true;
theParticle._x = _local3;
theParticle._y = _local2;
theParticle.dir = ((Math.random() * 5) - 2.5) + theDir;
theParticle._rotation = theParticle.dir;
theParticle.gravity = 0.4;
theParticle.speed = theSpeed + 2;
turn(theParticle);
theParticle.alphaRate = 10;
particleNum++;
if (particleNum >= 5000) {
particleNum = 5000;
}
theParticle.onEnterFrame = function () {
outerLimits(this);
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + this.gravity;
this.dir = ((Math.atan2(this.dy, this.dx) / 3.141593) * 180) + 90;
this._alpha = this._alpha - this.alphaRate;
this._rotation = this.dir;
};
}
function bloodExplosion(targetX, targetY) {
var _local3 = (targetX + (Math.random() * 50)) - 25;
var _local2 = (targetY + (Math.random() * 50)) - 25;
i = 0;
while (i < 20) {
theParticle = attachMovie("particleblood2", "particle" + particleNum, 88000 + particleNum);
theParticle.cacheAsBitmap = true;
theParticle._xscale = (Math.random() * 50) + 50;
theParticle._yscale = (Math.random() * 50) + 50;
theParticle._x = _local3;
theParticle._y = _local2;
theParticle.dir = Math.random() * 360;
theParticle.gravity = 0.5;
theParticle.friction = 1;
theParticle.speed = (Math.random() * 3) + 2;
turn(theParticle);
theParticle.alphaRate = 7;
particleNum++;
if (particleNum >= 5000) {
particleNum = 5000;
}
theParticle.onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + this.gravity;
this.dx = this.dx * this.friction;
this.dir = ((Math.atan2(this.dy, this.dx) / 3.141593) * 180) + 90;
this._alpha = this._alpha - this.alphaRate;
this._rotation = this.dir;
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
i++;
}
}
function shell(targetX, targetY, theDir) {
var _local3 = targetX;
var _local2 = targetY;
theParticle = attachMovie("particle3", "shell" + shellNum, 60000 + shellNum);
theParticle.shell._x = _local3;
theParticle.shell._y = _local2;
theParticle.shell.Stop = false;
theParticle.shell.dir = (((Math.random() * 35) + 10) + theDir) - 90;
theParticle.shell._rotation = theParticle.shell.dir;
theParticle.shell.gravity = 1;
theParticle.shell.speed = -(((Math.random() * 2) - 1) + 5);
turn(theParticle.shell);
shellNum++;
if (shellNum >= 9000) {
shellNum = 0;
}
theParticle.shell.theFloor = theHero._y;
theParticle.shell.onEnterFrame = function () {
if (this._y < this.theFloor) {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + this.gravity;
this.dir = ((Math.atan2(this.dy, this.dx) / 3.141593) * 180) + 90;
this._rotation = this.dir;
} else if (this.Stop == false) {
this.Stop = true;
this._x = this._x - effects._x;
this._y = this._y - effects._y;
shellBitmap.draw(this._parent);
this._parent.removeMovieClip();
}
};
}
stop();
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
freeplay();
textGen = attachMovie("textGen", "textGen1", 902927, {_x:textSpot._x, _y:textSpot._y, _alpha:0});
textSpot._visible = false;
textCounter = 1;
Frame 62
function calculateDayScore() {
_root.onEnterFrame = function () {
trace(dayScoreVar);
counter++;
if (counter >= 3) {
clickSound.start(0, 1);
dayScoreVar = dayScoreVar + 1000000;
counter = 0;
}
totalScoreVar = moneyScoreVar + dayScoreVar;
if (dayScoreVar >= dayScore) {
dayScoreVar = dayScore;
totalScoreVar = moneyScoreVar + dayScoreVar;
calculateMoneyScore();
}
};
}
function calculateMoneyScore() {
_root.onEnterFrame = function () {
trace(moneyScoreVar);
counter++;
if (counter >= 3) {
clickSound.start(0, 1);
moneyScoreVar = moneyScoreVar + moneyVarVar;
counter = 0;
}
totalScoreVar = moneyScoreVar + dayScoreVar;
if (moneyScoreVar >= moneyScore) {
moneyScoreVar = moneyScore;
totalScoreVar = moneyScoreVar + dayScoreVar;
delete _root.onEnterFrame;
}
};
}
function submitScore() {
scoreSubmitted = true;
if (Mode == "easy") {
mochi.MochiScores.showLeaderboard({boardID:"7fd78f73ceea6f58", score:totalScore, onDisplay:function () {
openScoreBoard = true;
}, onClose:function () {
openScoreBoard = false;
}});
} else if (Mode == "normal") {
mochi.MochiScores.showLeaderboard({boardID:"89243e3de57cfef1", score:totalScore, onDisplay:function () {
openScoreBoard = true;
}, onClose:function () {
openScoreBoard = false;
}});
} else if (Mode == "hard") {
mochi.MochiScores.showLeaderboard({boardID:"7fb59bc18e55483a", score:totalScore, onDisplay:function () {
openScoreBoard = true;
}, onClose:function () {
openScoreBoard = false;
}});
}
}
cleanUpEverything();
clickSound = new Sound();
clickSound.attachSound("click.wav");
theFpsLock = attachMovie("fpslock", "fpslock1", 191829);
dayScore = day * 1000000;
moneyScore = money;
totalScore = dayScore + moneyScore;
dayScoreVar = 0;
moneyScoreVar = 0;
totalScoreVar = 0;
counter = 0;
if (money > 100000) {
moneyVarVar = 10000;
} else {
moneyVarVar = 1000;
}
calculateDayScore();
scoreSubmitted = false;
openScoreBoard = false;
submitBtn.onRelease = function () {
if (!scoreSubmitted) {
submitScore();
menuSound.start(0, 1);
}
};
backBtn.onRelease = function () {
if (!openScoreBoard) {
frameTransition("title");
menuSound.start(0, 1);
}
};
Frame 72
function submitScore() {
scoreSubmitted = true;
if (Mode == "easy") {
mochi.MochiScores.showLeaderboard({boardID:"14c3a368d3b1eef4", score:day, onDisplay:function () {
openScoreBoard = true;
}, onClose:function () {
openScoreBoard = false;
}});
} else if (Mode == "normal") {
mochi.MochiScores.showLeaderboard({boardID:"0fe2b535fbb97cbb", score:day, onDisplay:function () {
openScoreBoard = true;
}, onClose:function () {
openScoreBoard = false;
}});
} else if (Mode == "hard") {
mochi.MochiScores.showLeaderboard({boardID:"f695c0529a8e1131", score:day, onDisplay:function () {
openScoreBoard = true;
}, onClose:function () {
openScoreBoard = false;
}});
}
}
cleanUpEverything();
theFpsLock = attachMovie("fpslock", "fpslock1", 191829);
backBtn.onRelease = function () {
if (!openScoreBoard) {
frameTransition("title");
menuSound.start(0, 1);
}
};
scoreSubmitted = false;
openScoreBoard = false;
submitBtn.onRelease = function () {
if (!scoreSubmitted) {
submitScore();
menuSound.start(0, 1);
}
};
Symbol 6 MovieClip [urlblock] Frame 1
stop();
Symbol 6 MovieClip [urlblock] Frame 2
stop();
Symbol 7 MovieClip [fpslock] Frame 6714
Symbol 16 MovieClip Frame 1
this.onEnterFrame = function () {
bar._xscale = _root.overHeat;
};
Symbol 25 MovieClip Frame 1
stop();
this.onRelease = function () {
if (!_root.Mute) {
_root.Mute = true;
} else if (_root.Mute) {
_root.Mute = false;
_root.gunCockSound.start(0, 1);
}
};
this.onEnterFrame = function () {
if (_root.Mute) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
};
Symbol 28 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 1
stop();
Symbol 48 MovieClip [weaponBtn] Frame 1
mochi.MochiServices.addLinkEvent("http://x.mochiads.com/link/7ea2f4f5ae63ed4d", "http://www.stickpage.com/", linkBtn);
Symbol 53 MovieClip [fps] Frame 1
var averageFrames = 30;
var timerArray = new Array(averageFrames);
var startTime = 0;
var currentFrame = 0;
this.onEnterFrame = function () {
if (this.currentFrame == 0) {
this.startTime = getTimer();
}
this.timerArray.unshift(getTimer());
this.timerArray.pop();
if (this.currentFrame > 0) {
(this.currentFrame * 1000) / (this.timerArray[0] - this.startTime);
}
if (this.currentFrame > this.averageFrames) {
fps = (this.averageFrames * 1000) / (this.timerArray[0] - this.timerArray[averageFrames - 1]);
}
this.currentFrame++;
};
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 1863
stop();
_root.dayOver();
Symbol 840 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.43");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
if (_root.mochiad_options) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local4 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local4) + "=") + escape(_local2[_local4]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local6 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local6.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.MochiServices.netup = false;
}
};
}
btn.onRelease = function () {
if (mochi.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 841 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 842 MovieClip [__Packages.com.mosesSupposes.fuse.Shortcuts] Frame 0
class com.mosesSupposes.fuse.Shortcuts
{
function Shortcuts () {
}
static function initialize() {
if (shortcuts == null) {
initShortcuts();
}
}
static function doShortcut(obj, methodName) {
initialize();
var _local5 = shortcuts[methodName];
if (_local5 == undefined) {
if (typeof(obj) == "movieclip") {
_local5 = mcshortcuts[methodName];
}
}
if (_local5 == undefined) {
return(null);
}
obj = arguments.shift();
methodName = String(arguments.shift());
if (!(obj instanceof Array)) {
obj = [obj];
}
var _local3 = "";
for (var _local6 in obj) {
var _local2 = String(_local5.apply(obj[_local6], arguments));
if ((_local2 != null) && (_local2.length > 0)) {
if (_local3.length > 0) {
_local3 = (_local2 + "|") + _local3;
} else {
_local3 = _local2;
}
}
}
return(((_local3 == "") ? null : (_local3)));
}
static function addShortcutsTo() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, _local2.getter, _local2.setter);
_global.ASSetPropFlags(o, _local5, 3, 1);
} else {
o[_local5] = _local2;
_global.ASSetPropFlags(o, _local5, 7, 1);
}
}
};
for (var _local7 in arguments) {
var _local4 = arguments[_local7];
if ((_local4 == MovieClip.prototype) || (typeof(_local4) == "movieclip")) {
_local5(_local4, mcshortcuts);
}
_local5(_local4, shortcuts);
}
}
static function removeShortcutsFrom() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
_global.ASSetPropFlags(o, _local5, 0, 2);
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, null, null);
}
delete o[_local5];
}
};
for (var _local7 in arguments) {
var _local3 = arguments[_local7];
if ((_local3 == MovieClip.prototype) || (typeof(_local3) == "movieclip")) {
_local5(_local3, mcshortcuts);
}
_local5(_local3, shortcuts);
}
}
static function parseStringTypeCallback(callbackStr) {
var evaluate = function (val) {
var first = val.charAt(0);
if ((first == val.slice(-1)) && ((first == "\"") || (first == "'"))) {
return(val.slice(1, -1));
}
if (val == "true") {
return(Object(true));
}
if (val == "false") {
return(Object(false));
}
if (val == "null") {
return(Object(null));
}
if (_global.isNaN(Number(val)) == false) {
return(Object(Number(val)));
}
return(Object(eval (val)));
};
var trimWhite = function (str) {
while (str.charAt(0) == " ") {
str = str.slice(1);
}
while (str.slice(-1) == " ") {
str = str.slice(0, -1);
}
return(str);
};
var evaluateList = function (list) {
var _local11 = [];
var _local4 = 0;
while (_local4 < list.length) {
var _local3 = list[_local4];
_local3 = trimWhite(_local3);
var _local5 = (_local3.charAt(0) == "{") && ((_local3.indexOf("}") > -1) || (_local3.indexOf(":") > -1));
var _local10 = _local3.charAt(0) == "[";
if ((_local5 || (_local10)) == true) {
var _local6 = ((_local5 == true) ? ({}) : ([]));
var _local2 = _local4;
while (_local2 < list.length) {
if (_local2 == _local4) {
_local3 = _local3.slice(1);
}
var _local1;
var _local8 = (_local1.slice(-1) == ((_local5 == true) ? "}" : "]")) || (_local2 == (list.length - 1));
if (_local8 == true) {
_local1 = _local1.slice(0, -1);
}
if ((_local5 == true) && (_local1.indexOf(":") > -1)) {
var _local7 = _local1.split(":");
_local6[trimWhite(_local7[0])] = evaluate(trimWhite(_local7[1]));
} else if (_local10 == true) {
_local6.push(evaluate(trimWhite(_local1)));
}
if (_local8 == true) {
_local11.push(_local6);
_local4 = _local2;
break;
}
_local2++;
}
} else {
_local11.push(evaluate(trimWhite(_local3)));
}
_local4++;
}
return(_local11);
};
var parts = callbackStr.split("(");
var p0 = parts[0];
var p1 = parts[1];
return({func:p0.slice(p0.lastIndexOf(".") + 1), scope:eval (p0.slice(0, p0.lastIndexOf("."))), args:evaluateList(p1.slice(0, p1.lastIndexOf(")")).split(","))});
}
static function initShortcuts() {
shortcuts = new Object();
var methods = {alphaTo:"_alpha", scaleTo:"_scale", sizeTo:"_size", rotateTo:"_rotation", brightnessTo:"_brightness", brightOffsetTo:"_brightOffset", contrastTo:"_contrast", colorTo:"_tint", tintPercentTo:"_tintPercent", colorResetTo:"_colorReset", invertColorTo:"_invertColor"};
var _local4 = _global.com.mosesSupposes.fuse.FuseFMP.getAllShortcuts();
var _local7 = {blur:1, blurX:1, blurY:1, strength:1, shadowAlpha:1, highlightAlpha:1, angle:1, distance:1, alpha:1, color:1};
for (var _local9 in _local4) {
if (_local7[_local4[_local9].split("_")[1]] === 1) {
methods[_local4[_local9] + "To"] = _local4[_local9];
}
}
var _local8 = {__resolve:function (name) {
var propName = methods[name];
return(function () {
var _local4 = _global.com.mosesSupposes.fuse.ZigoEngine.doTween.apply(com.mosesSupposes.fuse.ZigoEngine, new Array(this, propName).concat(arguments));
return(_local4);
});
}};
var _local5 = {__resolve:function (name) {
var _local3 = {setter:function (v) {
_global.com.mosesSupposes.fuse.ZigoEngine.doTween(this, ((name == "_tintString") ? "_tint" : (name)), v, 0);
}};
switch (name) {
case "_colorReset" :
_local3.getter = function () {
return(100 - _global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this).tintPercent);
};
break;
case "_colorTransform" :
_local3.getter = function () {
return(Color(new Color(this)).getTransform());
};
break;
case "_fade" :
_local3.getter = function () {
return(this._alpha);
};
break;
case "_size" :
_local3.getter = function () {
return(((this._width == this._height) ? (this._width) : null));
};
break;
case "_scale" :
_local3.getter = function () {
return(((this._xscale == this._yscale) ? (this._xscale) : null));
};
break;
default :
_local3.getter = function () {
return(_global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this)[name.slice(1)]);
};
}
return(_local3);
}};
for (var _local9 in methods) {
shortcuts[_local9] = _local8[_local9];
if ((_local9 != "alphaTo") && (_local9 != "rotateTo")) {
shortcuts[methods[_local9]] = _local5[methods[_local9]];
}
}
shortcuts._tintString = _local5._tintString;
shortcuts._colorTransform = _local5._colorTransform;
shortcuts._fade = _local5._fade;
shortcuts.tween = function (props, endVals, seconds, ease, delay, callback) {
if ((arguments.length == 1) && (typeof(props) == "object")) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween({target:this, action:props}));
}
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, props, endVals, seconds, ease, delay, callback));
};
shortcuts.removeTween = (shortcuts.stopTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.removeTween(this, props);
});
shortcuts.removeAllTweens = (shortcuts.stopAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.removeTween("ALL");
});
shortcuts.isTweening = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweening(this, prop));
};
shortcuts.getTweens = function () {
return(com.mosesSupposes.fuse.ZigoEngine.getTweens(this));
};
shortcuts.lockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, true);
};
shortcuts.unlockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, false);
};
shortcuts.isTweenLocked = function () {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenLocked(this));
};
shortcuts.isTweenPaused = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenPaused(this, prop));
};
shortcuts.pauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.pauseTween(this, props);
};
shortcuts.resumeTween = (shortcuts.unpauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween(this, props);
});
shortcuts.pauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.pauseTween("ALL");
};
shortcuts.resumeAllTweens = (shortcuts.unpauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween("ALL");
});
shortcuts.ffTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.ffTween(this, props);
};
shortcuts.rewTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, false, suppressStartEvents);
};
shortcuts.rewAndPauseTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, true, suppressStartEvents);
};
shortcuts.skipTweenTo = function (seconds, props) {
com.mosesSupposes.fuse.ZigoEngine.skipTweenTo(seconds, this, props);
};
shortcuts.bezierTo = function (destX, destY, controlX, controlY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_bezier_", {x:destX, y:destY, controlX:controlX, controlY:controlY}, seconds, ease, delay, callback));
};
shortcuts.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_colorTransform", {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab}, seconds, ease, delay, callback));
};
shortcuts.tintTo = function (rgb, percent, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_tint", {tint:rgb, percent:percent}, seconds, ease, delay, callback));
};
shortcuts.slideTo = function (destX, destY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_x,_y", [destX, destY], seconds, ease, delay, callback));
};
shortcuts.fadeIn = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 100, seconds, ease, delay, callback));
};
shortcuts.fadeOut = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 0, seconds, ease, delay, callback));
};
mcshortcuts = new Object();
mcshortcuts._frame = {getter:function () {
return(this._currentframe);
}, setter:function (v) {
this.gotoAndStop(Math.round(v));
}};
mcshortcuts.frameTo = function (endframe, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_frame", ((endframe != undefined) ? (endframe) : (this._totalframes)), seconds, ease, delay, callback));
};
}
static var registryKey = "shortcuts";
static var shortcuts = null;
static var mcshortcuts = null;
}
Symbol 843 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.4 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 844 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage.call(com.mosesSupposes.fuse.ZigoEngine, "onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local6 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local8 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local3 = {tintPercent:Number(((_local6 == true) ? (100 - _local1.ra) : 0))};
if (_local3.tintPercent != 0) {
var _local5 = 100 / _local3.tintPercent;
_local3.tint = (((_local1.rb * _local5) << 16) | ((_local1.gb * _local5) << 8)) | (_local1.bb * _local5);
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local6 == true) && (_local8 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 845 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
} else {
_local3.fmp.setFilterProp(_local5, _local30, _local7[0]);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 846 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 847 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.MochiServices.clip;
}
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 848 MovieClip [__Packages.mochi.MochiDigits] Frame 0
class mochi.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 118 MovieClip Frame 18
if (this.hp <= 0) {
gotoAndPlay ("dieNormal");
} else if (this.attack == 1) {
gotoAndPlay ("attack");
} else {
gotoAndPlay ("normal");
}
Symbol 135 MovieClip Frame 273
_root.play();
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 172 MovieClip Frame 1
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 178 MovieClip [bullet] Frame 1
stop();
Symbol 190 MovieClip [deathray] Frame 97
gotoAndPlay ("normal");
Symbol 195 MovieClip [disruptor] Frame 14
removeMovieClip(this);
Symbol 207 MovieClip Frame 1
if (_root.berserk == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
this.onEnterFrame = function () {
if (_root.berserk == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
stop();
Symbol 207 MovieClip Frame 2
stop();
Symbol 218 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 1
offset = 0;
if (_root.weaponType == 1) {
this.gotoAndStop("machinegun");
offset = 1.5;
} else if (_root.weaponType == 2) {
this.gotoAndStop("nailgun");
offset = -1;
} else if (_root.weaponType == 3) {
this.gotoAndStop("autosniper");
offset = 0;
} else if (_root.weaponType == 4) {
this.gotoAndStop("rocketlauncher");
offset = 0;
} else if (_root.weaponType == 5) {
this.gotoAndStop("minigun");
offset = 2;
} else if (_root.weaponType == 6) {
this.gotoAndStop("deathray");
offset = 0;
} else if (_root.weaponType == 7) {
this.gotoAndStop("laser");
offset = 0;
}
stop();
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this.dx = -(_root._xmouse - Point.x);
this.dy = -(_root._ymouse - Point.y);
this.angleRad = Math.atan2(this.dy, this.dx);
this.angle = ((this.angleRad / Math.PI) * 180) - 90;
this.dir = this.angle + offset;
if (this.dir < -130) {
this.dir = -130;
}
if (this.dir > -50) {
this.dir = -50;
}
this._rotation = this.dir;
this.onEnterFrame = function () {
if (_root.Pause == 0) {
if (_root.weaponType == 1) {
this.gotoAndStop("machinegun");
offset = 1.5;
} else if (_root.weaponType == 2) {
this.gotoAndStop("nailgun");
offset = -1;
} else if (_root.weaponType == 3) {
this.gotoAndStop("autosniper");
offset = 0;
} else if (_root.weaponType == 4) {
this.gotoAndStop("rocketlauncher");
offset = 0;
} else if (_root.weaponType == 5) {
this.gotoAndStop("minigun");
offset = 2;
} else if (_root.weaponType == 6) {
this.gotoAndStop("deathray");
offset = 0;
} else if (_root.weaponType == 7) {
this.gotoAndStop("laser");
offset = 0;
}
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this.dx = -(_root._xmouse - Point.x);
this.dy = -(_root._ymouse - Point.y);
this.angleRad = Math.atan2(this.dy, this.dx);
this.angle = ((this.angleRad / Math.PI) * 180) - 90;
this.dir = this.angle + offset;
if (this.dir < -130) {
this.dir = -130;
}
if (this.dir > -50) {
this.dir = -50;
}
}
this._rotation = this.dir;
_root.gunDir = this.dir;
_root.theDeathRay._rotation = this.dir + 95;
};
bullethole.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
_root.bulletHoleX = Point.x;
_root.bulletHoleY = Point.y;
};
shellhole.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
_root.shellHoleX = Point.x;
_root.shellHoleY = Point.y;
};
Symbol 238 MovieClip Frame 10
stop();
Symbol 238 MovieClip Frame 20
stop();
Symbol 238 MovieClip Frame 30
stop();
Symbol 238 MovieClip Frame 40
stop();
Symbol 238 MovieClip Frame 49
stop();
Symbol 238 MovieClip Frame 58
stop();
Symbol 271 MovieClip [hero] Frame 1
stop();
Symbol 273 MovieClip [leveltext] Frame 1
stop();
Symbol 275 MovieClip [nail] Frame 1
stop();
Symbol 287 MovieClip [rpg] Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 1
function resetFocus() {
startText._visible = false;
text1._visible = true;
text2._visible = true;
repair.gotoAndStop(1);
fortify.gotoAndStop(1);
nailgun.gotoAndStop(1);
sniper.gotoAndStop(1);
harpoon.gotoAndStop(1);
minigun.gotoAndStop(1);
deathray.gotoAndStop(1);
laser.gotoAndStop(1);
winBtn.gotoAndStop(1);
if (_root.nailgunUnlocked) {
nailgun.gotoAndStop(3);
}
if (_root.sniperUnlocked) {
sniper.gotoAndStop(3);
}
if (_root.rpgUnlocked) {
harpoon.gotoAndStop(3);
}
if (_root.minigunUnlocked) {
minigun.gotoAndStop(3);
}
if (_root.deathrayUnlocked) {
deathray.gotoAndStop(3);
}
if (_root.laserUnlocked) {
laser.gotoAndStop(3);
}
if (_root.maxLife >= 1000) {
fortify.gotoAndStop(3);
}
}
winBtn._visible = false;
if (_root.nailgunUnlocked) {
nailgun.gotoAndStop(3);
}
if (_root.sniperUnlocked) {
sniper.gotoAndStop(3);
}
if (_root.rpgUnlocked) {
harpoon.gotoAndStop(3);
}
if (_root.minigunUnlocked) {
minigun.gotoAndStop(3);
}
if (_root.deathrayUnlocked) {
deathray.gotoAndStop(3);
}
if (_root.laserUnlocked) {
laser.gotoAndStop(3);
}
if (_root.maxLife >= 9999) {
fortify.gotoAndStop(3);
}
if (((((_root.laserUnlocked && (_root.deathrayUnlocked)) && (_root.minigunUnlocked)) && (_root.rpgUnlocked)) && (_root.sniperUnlocked)) && (_root.nailgunUnlocked)) {
winBtn._visible = true;
}
this.onEnterFrame = function () {
if (_root.nailgunUnlocked) {
nailgun.gotoAndStop(3);
}
if (_root.sniperUnlocked) {
sniper.gotoAndStop(3);
}
if (_root.rpgUnlocked) {
harpoon.gotoAndStop(3);
}
if (_root.minigunUnlocked) {
minigun.gotoAndStop(3);
}
if (_root.deathrayUnlocked) {
deathray.gotoAndStop(3);
}
if (_root.laserUnlocked) {
laser.gotoAndStop(3);
}
if (_root.maxLife >= 9999) {
fortify.gotoAndStop(3);
}
if (((((_root.laserUnlocked && (_root.deathrayUnlocked)) && (_root.minigunUnlocked)) && (_root.rpgUnlocked)) && (_root.sniperUnlocked)) && (_root.nailgunUnlocked)) {
winBtn._visible = true;
}
};
buyBtn.onRelease = function () {
if ((focus == "winbutton") && (_root.money >= 999999)) {
_root.money = _root.money - 999999;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Wow, you actually bought it? Woo! I'm set for life, I'm out of here.";
_root.winGame();
} else if (((focus == "repair") && (_root.money >= 400)) && (_root.playerLife < _root.maxLife)) {
_root.money = _root.money - 400;
_root.chachingSound.start(0, 1);
_root.playerLife = _root.playerLife + 20;
if (_root.playerLife >= _root.maxLife) {
_root.playerLife = _root.maxLife;
}
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if (((focus == "fortify") && (_root.money >= 5000)) && (_root.maxLife < 9999)) {
_root.money = _root.money - 5000;
_root.chachingSound.start(0, 1);
_root.maxLife = _root.maxLife + 20;
_root.playerLife = _root.playerLife + 20;
if (_root.maxLife >= 9999) {
_root.maxLife = 9999;
}
if (_root.playerLife > _root.maxLife) {
_root.playerLife = _root.maxLife;
}
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if ((focus == "nailgun") && (_root.money >= 4500)) {
_root.money = _root.money - 4500;
_root.nailgunUnlocked = true;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if ((focus == "sniper") && (_root.money >= 10000)) {
_root.money = _root.money - 10000;
_root.sniperUnlocked = true;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if ((focus == "harpoon") && (_root.money >= 25000)) {
_root.money = _root.money - 25000;
_root.rpgUnlocked = true;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if ((focus == "minigun") && (_root.money >= 48000)) {
_root.money = _root.money - 48000;
_root.minigunUnlocked = true;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if ((focus == "deathray") && (_root.money >= 105000)) {
_root.money = _root.money - 105000;
_root.deathrayUnlocked = true;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else if ((focus == "laser") && (_root.money >= 170000)) {
_root.money = _root.money - 170000;
_root.laserUnlocked = true;
_root.chachingSound.start(0, 1);
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Thank you, come again!";
} else {
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "Come back when you have some money.";
}
if (((focus == "repair") && (_root.money >= 400)) && (_root.playerLife >= _root.maxLife)) {
startText._visible = true;
text1._visible = false;
text2._visible = false;
mainOutput = "You are at full health.";
}
};
doneBtn.onRelease = function () {
_root.setupCrosshair();
_root.nextDay();
_root.shopOpen = false;
this._parent._parent.removeMovieClip();
};
winBtn.onRelease = function () {
resetFocus();
focus = "winbutton";
this.gotoAndStop(2);
titleOutput = "Win Button - $999999";
textOutput = "Buy this and you will be treated to some anti-climatic screen saying you beat the game. Beating a game was never so easy!";
};
repair.onRelease = function () {
resetFocus();
focus = "repair";
this.gotoAndStop(2);
titleOutput = "Repair +20 - $400";
textOutput = "We don't only sell weapons here, we also specialize in repairing barricades of any kind.";
};
fortify.onRelease = function () {
if (_root.maxLife < 1000) {
resetFocus();
focus = "fortify";
this.gotoAndStop(2);
titleOutput = "Fortify +20 - $5000";
textOutput = "A few sandbags, perfect for barricades. Sand not included.";
}
};
nailgun.onRelease = function () {
if (!_root.nailgunUnlocked) {
resetFocus();
focus = "nailgun";
this.gotoAndStop(2);
titleOutput = "Nailgun - $4500";
textOutput = "I find that shooting someone in the head with a nail, tends to make them think twice before attacking you.";
}
};
sniper.onRelease = function () {
if (!_root.sniperUnlocked) {
resetFocus();
focus = "sniper";
this.gotoAndStop(2);
titleOutput = "Autosniper - $10000";
textOutput = "Who has time for regular sniper rifles anymore? For killing sprees you need something a little more automatic.";
}
};
harpoon.onRelease = function () {
if (!_root.rpgUnlocked) {
resetFocus();
focus = "harpoon";
this.gotoAndStop(2);
titleOutput = "Harpoon Launcher - $25000";
textOutput = "If it's good enough to bring down a whale, a few stick figures should be no problem. This will impale anything in its path.";
}
};
minigun.onRelease = function () {
if (!_root.minigunUnlocked) {
resetFocus();
focus = "minigun";
this.gotoAndStop(2);
titleOutput = "Minigun - $48000";
textOutput = "The minigun (a.k.a. 'The Lag Cannon') can only be wielded by the mightiest of people (and computers).";
}
};
deathray.onRelease = function () {
if (!_root.deathrayUnlocked) {
resetFocus();
focus = "deathray";
this.gotoAndStop(2);
titleOutput = "Death Ray - $105000";
textOutput = "It does exactly what you think it does.";
}
};
laser.onRelease = function () {
if (!_root.laserUnlocked) {
resetFocus();
focus = "laser";
this.gotoAndStop(2);
titleOutput = "Orbital Attack Satellite - $170000";
textOutput = "A giant laser will come from the sky and utterly obliterate your enemies in one shot, including vehicles. What more could you want?";
}
};
Symbol 378 MovieClip Frame 8
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 1;
}
Symbol 378 MovieClip Frame 16
if (this._parent.hp <= 0) {
this._parent.gotoAndStop("dieNormal");
}
Symbol 397 MovieClip Frame 17
stop();
this.alphaRate = 3;
_root.enemyCounter--;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 398 MovieClip [enemy1] Frame 1
stop();
this.damage = 1;
if (this.dx == null) {
this.dx = ((Math.random() * 2) + 3) * _root.speedVar;
}
if (this.hp == null) {
this.hp = 100 * _root.hpVar;
}
Symbol 428 MovieClip Frame 9
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 1;
}
Symbol 428 MovieClip Frame 16
if (this._parent.hp <= 0) {
this._parent.gotoAndStop("dieNormal");
}
Symbol 447 MovieClip Frame 1
Symbol 447 MovieClip Frame 15
stop();
this.alphaRate = 3;
_root.enemyCounter--;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 448 MovieClip [enemy2] Frame 1
stop();
this.damage = 2;
if (this.dx == null) {
this.dx = ((Math.random() * 1) + 2.5) * _root.speedVar;
}
if (this.hp == null) {
this.hp = 150 * _root.hpVar;
}
Symbol 474 MovieClip Frame 8
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 2;
}
Symbol 474 MovieClip Frame 16
if (this._parent.hp <= 0) {
this._parent.gotoAndStop("dieNormal");
}
Symbol 488 MovieClip Frame 23
stop();
this.alphaRate = 3;
_root.enemyCounter--;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 489 MovieClip [enemy3] Frame 1
stop();
this.damage = 2;
if (this.dx == null) {
this.dx = ((Math.random() * 1) + 1.5) * _root.speedVar;
}
if (this.hp == null) {
this.hp = 200 * _root.hpVar;
}
Symbol 529 MovieClip Frame 16
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 1;
}
Symbol 529 MovieClip Frame 24
if (this._parent.hp <= 0) {
this._parent.gotoAndStop("dieNormal");
}
Symbol 551 MovieClip Frame 16
stop();
this.alphaRate = 3;
_root.enemyCounter--;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 552 MovieClip [enemy4] Frame 1
stop();
this.damage = 1;
if (this.dx == null) {
this.dx = 2 * _root.speedVar;
}
if (this.hp == null) {
this.hp = 100 * _root.hpVar;
}
Symbol 592 MovieClip Frame 1
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 10;
}
Symbol 592 MovieClip Frame 17
_root.enemyCounter--;
stop();
this.alphaRate = 3;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 603 MovieClip Frame 17
stop();
this.alphaRate = 3;
_root.enemyCounter--;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 604 MovieClip [enemy5] Frame 1
stop();
this.damage = 0;
if (this.dx == null) {
this.dx = ((Math.random() * 1) + 4) * _root.speedVar;
}
if (this.hp == null) {
this.hp = 100 * _root.hpVar;
}
Symbol 619 MovieClip Frame 1
this.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
};
Symbol 620 MovieClip Frame 1
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
};
Symbol 638 MovieClip Frame 1
Symbol 638 MovieClip Frame 15
this._parent.dx = 0;
_root.playerLife = _root.playerLife - 10;
Symbol 638 MovieClip Frame 31
this.stop();
this.alphaRate = 3;
_root.enemyCounter--;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.removeMovieClip();
}
};
Symbol 646 MovieClip Frame 1
_root.enemyCounter--;
Symbol 646 MovieClip Frame 15
this._parent.dx = 0;
Symbol 646 MovieClip Frame 20
this.stop();
this.alphaRate = 3;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.removeMovieClip();
}
};
Symbol 647 MovieClip [enemyfly6] Frame 1
stop();
this.damage = 0;
if (this.dx == null) {
this.dx = ((Math.random() * 1) + 2) * _root.speedVar;
this.dxOrig = this.dx;
}
if (this.hp == null) {
this.hp = 100 * _root.hpVar;
}
Symbol 647 MovieClip [enemyfly6] Frame 20
_root.setupGlider(this);
Symbol 647 MovieClip [enemyfly6] Frame 35
_root.setupGlider(this);
Symbol 669 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 8
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 1;
}
Symbol 669 MovieClip Frame 14
gotoAndPlay ("start");
Symbol 684 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if ((_parent._parent.hp / _parent._parent.maxhp) >= 0.8) {
this.gotoAndStop(1);
} else if ((_parent._parent.hp / _parent._parent.maxhp) >= 0.6) {
this.gotoAndStop(2);
} else if ((_parent._parent.hp / _parent._parent.maxhp) >= 0.4) {
this.gotoAndStop(3);
} else if ((_parent._parent.hp / _parent._parent.maxhp) >= 0.2) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
};
Symbol 687 MovieClip Frame 1
copter.gun.play();
Symbol 687 MovieClip Frame 68
if (this.hp <= 0) {
gotoAndPlay ("dieNormal");
} else {
gotoAndPlay ("attack");
}
Symbol 723 MovieClip Frame 1
copter.gun.gotoAndStop(1);
copter.propeller.gotoAndStop(1);
copter.tail.stop();
Symbol 723 MovieClip Frame 31
copter.gun.gotoAndStop(1);
copter.propeller.gotoAndStop(1);
copter.tail.stop();
_root.heliCounter--;
this.stop();
this.alphaRate = 3;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 724 MovieClip [enemyheli] Frame 1
stop();
this.damage = 5;
if (this.dx == null) {
this.dx = (Math.random() * 2) + 4;
this.dxOrig = this.dx;
}
if (this.hp == null) {
this.hp = 2000 * _root.hpVar;
this.maxhp = this.hp;
}
Symbol 750 MovieClip Frame 30
if (_root.Pause == 0) {
_root.playerLife = _root.playerLife - 10;
}
Symbol 773 MovieClip Frame 47
_root.tankCounter--;
this.stop();
this.alphaRate = 3;
this.onEnterFrame = function () {
this._alpha = this._alpha - this.alphaRate;
if (this._alpha <= 0) {
this._parent.dead = true;
}
};
Symbol 774 MovieClip [enemytank] Frame 1
stop();
if (this.dx == null) {
this.dx = (Math.random() * 2) + 2;
}
if (this.hp == null) {
this.hp = 2000 * _root.hpVar;
}
Symbol 774 MovieClip [enemytank] Frame 66
if (this.hp <= 0) {
gotoAndPlay ("dieNormal");
} else {
gotoAndPlay ("attack");
}
Symbol 781 MovieClip Frame 1
stop();
Symbol 792 MovieClip [medqual] Frame 1
stop();
this.onEnterFrame = function () {
if (_root._quality == "MEDIUM") {
this.gotoAndStop("yes");
} else {
this.gotoAndStop("no");
}
};
Symbol 792 MovieClip [medqual] Frame 2
stop();
Symbol 795 MovieClip [lowqual] Frame 1
stop();
this.onEnterFrame = function () {
if (_root._quality == "LOW") {
this.gotoAndStop("yes");
} else {
this.gotoAndStop("no");
}
};
Symbol 795 MovieClip [lowqual] Frame 2
stop();
Symbol 798 MovieClip [highqual] Frame 1
stop();
this.onEnterFrame = function () {
if (_root._quality == "HIGH") {
this.gotoAndStop("yes");
} else {
this.gotoAndStop("no");
}
};
Symbol 798 MovieClip [highqual] Frame 2
stop();
Symbol 819 MovieClip Frame 1
stop();
Symbol 819 MovieClip Frame 2
stop();