Frame 1
if (_global.played_once == true) {
inbetween.stop();
gotoAndStop (11);
} else {
var shot_1 = new Sound();
var shot_2 = new Sound();
var shot_3 = new Sound();
var shot_4 = new Sound();
var explosion_1 = new Sound();
var explosion_2 = new Sound();
var explosion_3 = new Sound();
var shield_bonus_snd = new Sound();
var ammo_bonus_snd = new Sound();
var big_gun = new Sound();
var lazer_shot_1 = new Sound();
var loop_1 = new Sound();
var loop_2 = new Sound();
var inbetween = new Sound();
shot_1.attachSound("shot_1");
shot_2.attachSound("shot_2");
shot_3.attachSound("shot_3");
shot_4.attachSound("shot_4");
explosion_1.attachSound("explosion_1");
explosion_2.attachSound("explosion_2");
explosion_3.attachSound("explosion_3");
shield_bonus_snd.attachSound("shield_bonus_snd");
ammo_bonus_snd.attachSound("ammo_bonus_snd");
big_gun.attachSound("big_gun");
lazer_shot_1.attachSound("lazer_shot_1");
loop_1.attachSound("loop_1");
loop_2.attachSound("loop_2");
inbetween.attachSound("inbetween");
}
Instance of Symbol 172 MovieClip in Frame 1
//component parameters
onClipEvent (construct) {
xin_motion_val = "Down";
xin_alphatype_val = "Yes";
xout_motion_val = "Down";
xout_alphatype_val = "Yes";
perc_req_val = 90;
show_perc_val = "Yes";
slow_factor_val = 0.3;
init_action_val = "_root.stop();";
play_action_val = "_root.play();";
}
Instance of Symbol 175 MovieClip in Frame 1
//component parameters
onClipEvent (construct) {
highscore_url = "http://www.gamesinaflash.com/hs_scores.php";
game_id = 20;
score_variable = "score";
button_label = "Play Again";
}
Frame 11
stop();
score_info._visible = false;
_global.FRICTION = 0.87;
if (_global.played_once != true) {
var cArr = new Array();
var nNArr = new Array();
var eArr = new Array();
var tArr = new Array();
var bArr = new Array();
cArr = [["RollnShoot", 1, 100], ["SquareMobile", 2, 110], ["duneRover", 2, 130], ["smallTank", 1, 180], ["bugMobile", 2, 100], ["Helicopter", 2, 130], ["smallPlane", 2, 120], ["fighterJet", 2, 160], ["BigTank", 1, 200], ["Destroyer", 3, 250]];
nNArr = ["Rolling Sentries", "Photon Rovers", "Dune Rovers", "Small Tanks", "Bug-mobiles", "Helicopters", "Airplanes", "Figher Jets", "Big Tanks", "Destroyer!"];
bArr = ["ammunition", "health", "shield", "smartBomb"];
var xPos;
var yPos;
var useEShields = false;
var score;
var speed = 50;
var espeed;
var pspeed;
var eBulletSpeed;
var shield = 100;
var numBullets;
var keyListener_obj = new Object();
level = {};
}
level.shotsToKill = 1;
level.timer = 2;
level.total = 10;
level.sendFreq = 2000;
level.bg = 1;
level.chars = {prevE:cArr[0][0], prevEnumGuns:cArr[0][1], prevEbulletScale:cArr[0][2], currE:cArr[0][0], currEnumGuns:cArr[0][1], currEbulletScale:cArr[0][2], nextE:cArr[1][0], nextEnumGuns:cArr[1][1], nextEbulletScale:cArr[1][2]};
_global.playerHealth = 100;
_global.shieldPower = 100;
statusBar.health_txt.htmlText = playerHealth + "%";
statusBar.shield_txt.htmlText = shieldPower + "%";
numBullets = 100;
loadedOnce = true;
level.curr = 1;
score = 0;
var bg_music = new Object();
Frame 12
stop();
novice_btn.onRelease = function () {
level.difficulty = "novice";
espeed = 1;
pspeed = 5;
eBulletSpeed = 15;
bg_music = loop_1;
bg_music.start(0, 999);
_global.loopPlaying = 1;
play();
};
experienced_btn.onRelease = function () {
level.difficulty = "experienced";
espeed = 2;
pspeed = 6;
eBulletSpeed = 20;
bg_music = loop_1;
bg_music.start(0, 999);
_global.loopPlaying = 1;
play();
};
expert_btn.onRelease = function () {
level.difficulty = "expert";
espeed = 3;
pspeed = 7;
eBulletSpeed = 25;
bg_music = loop_1;
bg_music.start(0, 999);
_global.loopPlaying = 1;
play();
};
Frame 13
function stopPlayer(goto) {
playerHealth = playerHealth * 1;
shieldPower = shieldPower * 1;
delete _root.player.onEnterFrame;
_root.player.removeMovieClip();
_root.forceField.removeMovieClip();
clearInterval(_root.sender);
clearInterval(_root.eBulletChecker);
_root.removeEnemy();
_root.removeAmmo();
bulletNum = 0;
switch (goto) {
case "loser" :
clearInterval(timeCheck);
_global.won = false;
gotoAndStop ("loser");
break;
case "winner" :
clearInterval(timeCheck);
gotoAndStop ("nextLevel");
eSpeed = eSpeed + 0.5;
level.curr = 1;
break;
case "nextLevel" :
clearInterval(timeCheck);
gotoAndStop ("nextLevel");
}
}
function gameTime() {
if (playerHealth <= 0) {
clearInterval(timeCheck);
clearInterval(Timer.startIt);
_root.attachMovie("explosion", "playerExplosion", _root.getNextHighestDepth(), {_x:_root.player._x, _y:_root.player._y});
explosion_2.start();
player.removeMovieClip();
clearInterval(sender);
i = 0;
while (i < eArr.length) {
_root[_root.eArr[i]].shooting = false;
i++;
}
_root.stopPlayer("loser");
}
statusBar.ammoClip_txt.htmlText = _root.numBullets;
if (numBullets <= 100) {
statusBar.ammo_status._width = _root.numBullets / 2;
}
if ((_root.Timer.eMin >= level.timer) && (playerHealth > 0)) {
if (missed == false) {
score = score + 2000;
}
score = score + 500;
clearInterval(timeCheck);
clearEBullets();
level.finished = true;
level.curr++;
clearInterval(Timer.startIt);
if (level.curr < level.total) {
theLevel = "nextLevel";
_root.stopPlayer(theLevel);
} else {
clearEBullets();
theLevel = "winner";
level.curr = 1;
level.shotsToKill = 2;
_root.stopPlayer(theLevel);
}
}
}
function clearEBullets() {
i = 1;
while (i <= 5) {
_root["eBlt" + i].removeMovieClip();
i++;
}
}
function EBullets() {
b = 0;
while (b <= 5) {
if ((((_root["eBlt" + b]._x < 0) || (_root["eBlt" + b]._x > 600)) || (_root["eBlt" + b]._y < 0)) || (_root["eBlt" + b]._y > 450)) {
_root["eBlt" + b].removeMovieClip();
}
if (_root["eBlt" + b].hitTest(_root.player)) {
_root["eBlt" + b].removeMovieClip();
if (shieldPower <= 0) {
hChance = randi(1, 10);
if ((hChance < 4) && (_root.h_mc.showing == false)) {
h_mc._x = randi(20, 580);
h_mc._y = randi(20, 400);
h_mc.showing = true;
h_mc.ds = getTimer();
}
playerHealth = playerHealth - 10;
_root.score = _root.score - 20;
} else {
sChance = randi(1, 10);
if ((sChance < 4) && (_root.s_mc.showing == false)) {
s_mc._x = randi(20, 580);
s_mc._y = randi(20, 400);
s_mc.showing = true;
s_mc.ds = getTimer();
}
shieldPower = shieldPower - 10;
forceField._alpha = forceField._alpha - 10;
statusBar.shield_status._width = statusBar.shield_status._width - 5;
statusBar.shield_txt.htmlText = shieldPower + "%";
}
statusBar.health_txt.htmlText = playerHealth + "%";
statusBar.health_status._width = playerHealth / 2;
statusBar.score_txt.htmlText = _root.score;
}
b++;
}
}
function followPlayer(mc) {
ex = _root.player._x - mc._x;
ey = _root.player._y - mc._y;
ec = Math.sqrt((ex * ex) + (ey * ey));
mc.esine = ey / ec;
mc.ecosine = ex / ec;
dx = _root.player._x - mc._x;
dy = _root.player._y - mc._y;
radians = Math.atan2(dy, dx);
mc._rotation = (radians * 180) / 3.141593;
}
function sendCurrEnemy() {
currENum = randi(1, 10);
otherENum = randi(1, 10);
if (currENum >= 3) {
char = level.chars.currE;
use = "curr";
} else if (otherENum > 5) {
char = level.chars.nextE;
use = "next";
} else {
char = level.chars.prevE;
use = "prev";
}
_root.attachMovie(char, char + currCount, _root.getNextHighestDepth());
objEn = _root[char + currCount];
objEn.numGuns = level.chars[use + "EnumGuns"];
objEn.bulletScale = level.chars[use + "EbulletScale"];
_root.eArr.push(objEn._name);
objEn._xscale = 20;
objEn._yscale = 20;
xPos = randi(-400, 1280);
if (xPos < 0) {
xPos = -100;
yPos = randi(-80, 530);
} else if (xPos > 600) {
xPos = 700;
yPos = randi(-80, 530);
} else {
yPos = -100;
}
objEn._x = xPos;
objEn._y = yPos;
ex2 = player._x;
ey2 = player._y;
_root.followPlayer(objEn);
objEn.onEnterFrame = function () {
if ((((this._y > 540) || (this._x > 710)) || (this._y < -120)) || (this._x < -120)) {
delete this.onEnterFrame;
newArr = remItem(_root.eArr, this._name);
_root.eArr = newArr;
clearInterval(this.follower);
this.removeMovieClip();
}
bCnt = 6;
while ((--bCnt) >= 0) {
if (this.hitTest(_root["bullet" + bCnt])) {
_root["bullet" + bCnt].removeMovieClip();
i = 1;
while (i <= this.numGuns) {
this["eb" + i].removeMovieClip();
i++;
}
_root.attachMovie("explosion", "explosion" + i, _root.getNextHighestDepth(), {_x:this._x, _y:this._y, _xscale:25, _yscale:25});
exNum = randi(1, 3);
_root["explosion_" + exNum].start();
_root.score = _root.score + (100 * this.numGuns);
_root.statusBar.score_txt.htmlText = _root.score;
newArr = remItem(_root.eArr, this._name);
_root.eArr = newArr;
delete this.onEnterFrame;
clearInterval(this.follower);
this.removeMovieClip();
_root.score = _root.score - 50;
}
}
this.d = Math.sqrt(((_root.player._x - this._x) * (_root.player._x - this._x)) + ((_root.player._y - this._y) * (_root.player._y - this._y)));
n = this._name;
len = this._name.length;
sn = n.substr(0, 10);
if (this.hitTest(_root.player)) {
_root.attachMovie("explosion", "hitExp", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
_root.hitExp._xscale = 10;
_root.hitExp._yscale = 10;
sfxNm = randi(1, 3);
_root["explosion_" + sfxNm].start();
i = 1;
while (i <= this.numGuns) {
this["eb" + i].removeMovieClip();
i++;
}
delete this.onEnterFrame;
e_n = this._name;
clearInterval(this.follower);
this.removeMovieClip();
newArr = remItem(eArr, e_n);
eArr = newArr;
}
if ((this.d <= 150) && (this.shooting == false)) {
this.shooting = true;
i = 1;
while (i <= this.numGuns) {
this["eObj" + i] = {x:this["box" + i]._x, y:this["box" + i]._y};
this.localToGlobal(this["eObj" + i]);
this["eObj" + i].depth = _root.eDepth;
_root.attachMovie("eBullet", "eBlt" + _root.ebNum, _root.getNextHighestDepth(), {_x:this["eObj" + i].x, _y:this["eObj" + i].y});
this["eb" + i] = _root["eBlt" + _root.ebNum];
sNm = _root.randi(1, 3);
_root["shot_" + sNm].start();
this.ss = getTimer();
if (_root.ebNum == 5) {
_root.ebNum = 0;
} else {
_root.ebNum++;
}
i++;
}
} else if ((((this.shooting == false) || (sn == "smallPlane")) || (sn == "fighterJet")) || (sn == "Destroyer")) {
this._x = this._x + (this.ecosine * espeed);
this._y = this._y + (this.esine * espeed);
}
if (this.shooting == true) {
i = 1;
while (i <= this.numGuns) {
this["eb" + i]._x = this["eb" + i]._x + (this.ecosine * eBulletSpeed);
this["eb" + i]._y = this["eb" + i]._y + (this.esine * eBulletSpeed);
i++;
}
this.now = getTimer();
st = _root.randi(1.5, 3);
st = st * 1000;
if (this.now >= Number(this.ss + st)) {
this.shooting = false;
}
}
};
currCount++;
if (_root.eArr.length > 5) {
sbChance = randi(1, 10);
if ((sbChance < 4) && (_root.smartBomb.showing != true)) {
_root.smartBomb._x = randi(20, 580);
_root.smartBomb._y = randi(20, 400);
_root.smartBomb.showing = true;
_root.smartBomb.ds = getTimer();
}
}
}
function s_bomb() {
smartBomb.showing = false;
smartBomb._x = _root.smartBomb.startX;
smartBomb._y = _root.smartBomb.startY;
i = 0;
while (i < eArr.length) {
e_mc = _root[eArr[i]];
if (e_mc != undefined) {
_root.attachMovie("explosion", "sExp" + i, _root.getNextHighestDepth(), {_x:e_mc._x, _y:e_mc._y});
_root["sExp" + i]._xscale = 10;
_root["sExp" + i]._yscale = 10;
sfxNm = randi(1, 3);
_root["explosion_" + sfxNm].start();
delete e_mc.onEnterFrame;
e_nm = e_mc._name;
e_mc.removeMovieClip();
newArr = remItem(eArr, e_nm);
eArr = newArr;
}
i++;
}
screenMsg = "Smart Bomb Engaged. Enemy Destroyed!";
}
function randi(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function removeEnemy() {
clearInterval(sender);
e = 0;
while (e < eArr.length) {
delete _root[eArr[e]].onEnterFrame;
e++;
}
e = 0;
while (e < eArr.length) {
_root[eArr[e]].removeMovieClip();
e++;
}
}
function remItem(arr, item) {
tArr = [];
i = arr.length - 1;
while (i >= 0) {
if (arr[i] != item) {
tArr.push(arr[i]);
}
i--;
}
tArr.reverse();
arr = tArr;
return(arr);
}
stop();
bg_mc.gotoAndStop(level.bg);
stop();
_root.attachMovie("WalknShoot", "player", 0, {_x:300, _y:220, _xscale:20, _yscale:20});
player._rotation = -90;
player.gotoAndStop("stand");
player.arrow_move_amt = 1.3;
level.finished = false;
bulletNum = 0;
var ebNum = 0;
var eDepth = 0;
var currCount = 0;
player.v_rt = 0;
player.v_lf = 0;
var missed = false;
level.sendFreq = level.sendFreq - 60;
espeed = espeed + 0.1;
statusBar.health_txt.htmlText = playerHealth + "%";
statusBar.shield_txt.htmlText = shieldPower + "%";
if ((shieldPower > 0) || (_global.playing_again == true)) {
if (_global.playing_again == true) {
_root.attachMovie("forceField", "forceField", _root.getNextHighestDepth(), {_x:player._x, _y:player._y - 10, _xscale:85, _yscale:85, _alpha:100});
} else {
_root.attachMovie("forceField", "forceField", _root.getNextHighestDepth(), {_x:player._x, _y:player._y - 10, _xscale:85, _yscale:85, _alpha:_root.shieldPower});
}
}
player.onEnterFrame = function () {
this.v_rt = this.v_rt + (Key.isDown(39) * this.arrow_move_amt);
this.v_lf = this.v_lf - (Key.isDown(37) * this.arrow_move_amt);
this._rotation = this._rotation + this.v_rt;
this._rotation = this._rotation + this.v_lf;
this.v_rt = this.v_rt * FRICTION;
this.v_lf = this.v_lf * FRICTION;
dirObj1 = {x:this.dir1._x, y:this.dir1._y};
dirObj2 = {x:this.dir2._x, y:this.dir2._y};
this.localToGlobal(dirObj1);
x1 = dirObj1.x;
y1 = dirObj1.y;
this.localToGlobal(dirObj2);
x2 = dirObj2.x;
y2 = dirObj2.y;
DX = x2 - x1;
DY = y2 - y1;
DC = Math.sqrt((DX * DX) + (DY * DY));
YS = DY / DC;
XS = DX / DC;
_root.forceField._x = player._x;
_root.forceField._y = player._y;
_root.forceField._rotation = this._rotation;
this._x = this._x + (((Key.isDown(38) * XS) * pspeed) * 0.95);
this._y = this._y + (((Key.isDown(38) * YS) * pspeed) * 0.95);
this._x = this._x - (((Key.isDown(40) * XS) * pspeed) * 0.95);
this._y = this._y - (((Key.isDown(40) * YS) * pspeed) * 0.95);
if (this._x > 620) {
this._x = -10;
}
if (this._x < -10) {
this._x = 610;
}
if (this._y > 460) {
this._y = -10;
}
if (this._y < -10) {
this._y = 460;
}
if (this.hitTest(_root.a_mc)) {
if (_root.a_mc.showing == true) {
_root.screenMsg = "Ammo Clip Reloaded";
_root.numBullets = 100;
_root.statusBar.ammoClip_txt.htmlText = numBullets;
_root.statusBar.ammo_status._width = 50;
_root.ammo_bonus_snd.start();
_root.a_mc._x = a_mc.startX;
_root.a_mc.showing = false;
}
}
if (this.hitTest(_root.h_mc)) {
if (_root.h_mc.showing == true) {
_root.screenMsg = "Health Restored";
_root.playerHealth = 100;
_root.statusBar.health_txt.htmlText = playerHealth;
_root.statusBar.health_status._width = 50;
_root.h_mc._x = h_mc.startX;
_root.h_mc.showing = false;
}
}
if (this.hitTest(_root.s_mc)) {
if (_root.s_mc.showing == true) {
_root.shield_bonus_snd.start();
_root.screenMsg = "Shield Strength Restored";
_root.shieldPower = 100;
_root.statusBar.shield_status._width = 50;
_root.statusBar.shield_txt.htmlText = "100%";
_root.forceField._alpha = 100;
_root.s_mc._x = s_mc.startX;
_root.s_mc.showing = false;
}
}
};
keyListener_obj.onKeyDown = function () {
if (Key.isDown(32)) {
var _local5 = new Object({x:player.box1._x, y:player.box1._y});
var _local6 = new Object({x:player.box2._x, y:player.box2._y});
player.localToGlobal(_local5);
x1 = _local5.x;
y1 = _local5.y;
player.localToGlobal(_local6);
x2 = _local6.x;
y2 = _local6.y;
x = x2 - x1;
y = y2 - y1;
c = Math.sqrt((x * x) + (y * y));
sine = y / c;
cosine = x / c;
if (_root.numBullets >= 1) {
bName = "bullet" + bulletNum;
_root.attachMovie("bullet", bName, _root.getNextHighestDepth());
player.gun.gotoAndPlay("shoot");
_root.lazer_shot_1.start();
_root.numBullets--;
} else {
_root.screenMsg = "You're out of ammo. Take evasive action!";
}
if (_root.numBullets < 50) {
aChance = randi(1, 10);
if ((aChance < 4) && (a_mc.showing == false)) {
a_mc._x = randi(20, 580);
a_mc._y = randi(20, 400);
a_mc.showing = true;
a_mc.ds = getTimer();
}
}
if (bulletNum == 5) {
bulletNum = 0;
} else {
bulletNum++;
}
_root[bName]._x = x2;
_root[bName]._y = y2;
_root[bName].onEnterFrame = function () {
xmov = speed * cosine;
ymov = speed * sine;
this._x = this._x + xmov;
this._y = this._y + ymov;
if (this.hitTest(_root.smartBomb)) {
_root.s_bomb();
}
if ((((this._x > 650) || (this._x < -50)) || (this._y > 500)) || (this._y < -50)) {
_root.missed = true;
this.removeMovieClip();
}
};
}
if (Key.isDown(66)) {
_root.s_bomb();
}
};
statusBar.music_btn.onPress = function () {
if (this.music == "on") {
this.gotoAndStop("off");
bg_music.stop();
} else {
this.gotoAndStop("on");
bg_music.start(0, 999);
}
};
Key.addListener(keyListener_obj);
sender = setInterval(sendCurrEnemy, level.sendFreq);
eBulletChecker = setInterval(EBullets, 20);
timeCheck = setInterval(gameTime, 100);
Instance of Symbol 121 MovieClip [TimeScore] "Timer" in Frame 13
//component parameters
onClipEvent (construct) {
maxScore = 300000 /* 0x0493E0 */;
tCurve = 1;
starter = true;
useScore = false;
}
Frame 17
stop();
level.bg++;
if (statusBar.music_btn.music == "on") {
bg_music.stop();
bg_music = inbetween;
bg_music.start(0, 50);
}
eArr = [];
depth = 0;
eDepth = 0;
currCount = 0;
if (level.curr == 2) {
oldChars = (nNArr[0] + " and the ") + nNArr[1];
newChar = nNArr[2];
level.chars.prevE = cArr[0][0];
level.chars.currE = cArr[1][0];
level.chars.nextE = cArr[2][0];
level.chars.prevEnumGuns = cArr[0][1];
level.chars.prevEbulletScale = cArr[0][2];
level.chars.currEnumGuns = cArr[1][1];
level.chars.currEbulletScale = cArr[1][2];
level.chars.nextEnumGuns = cArr[2][1];
level.chars.nextEbulletScale = cArr[2][2];
} else {
oldChars = (nNArr[level.curr - 2] + " and the ") + nNArr[level.curr - 1];
newChar = nNArr[level.curr];
level.chars.prevE = cArr[level.curr - 2][0];
level.chars.currE = cArr[level.curr - 1][0];
level.chars.nextE = cArr[level.curr][0];
level.chars.prevEnumGuns = cArr[level.curr - 2][1];
level.chars.prevEbulletScale = cArr[level.curr - 2][2];
level.chars.currEnumGuns = cArr[level.curr - 1][1];
level.chars.currEbulletScale = cArr[level.curr - 1][2];
level.chars.nextEnumGuns = cArr[level.curr][1];
level.chars.nextEbulletScale = cArr[level.curr][2];
}
oldLevel = Number(level.curr - 1);
level.finished = false;
levelMsg_txt.htmlText = ((("You've made it past level " + oldLevel) + ". Click the play button to go to the next level but watch out for the ") + newChar) + "!";
_root.attachMovie(_root.cArr[level.curr][0], "nextEnemy", _root.getNextHighestDepth(), {_x:300, _y:200, _yscale:75, _xscale:75});
Instance of Symbol 121 MovieClip [TimeScore] "Timer" in Frame 17
//component parameters
onClipEvent (construct) {
maxScore = 300000 /* 0x0493E0 */;
tCurve = 1;
starter = false;
useScore = false;
}
Frame 23
stop();
stopAllSounds();
_global.played_once = true;
_global.playing_again = true;
if (_global.loopPlaying == 1) {
loop_1.stop();
}
if (_global.loopPlaying == 2) {
loop_2.stop();
}
inbetween.start(0, 50);
eArr = [];
depth = 0;
eDepth = 0;
currCount = 0;
Instance of Symbol 121 MovieClip [TimeScore] "Timer" in Frame 23
//component parameters
onClipEvent (construct) {
maxScore = 300000 /* 0x0493E0 */;
tCurve = 1;
starter = false;
useScore = false;
}
Frame 27
stop();
stopAllSounds();
_global.played_once = true;
_global.playing_again = true;
if (_global.loopPlaying == 1) {
loop_1.stop();
}
if (_global.loopPlaying == 2) {
loop_2.stop();
}
inbetween.start(0, 50);
eArr = [];
depth = 0;
eDepth = 0;
currCount = 0;
trace("_root.score: " + _root.score);
trace("score: " + score);
playerHealth = 100;
shieldPower = 100;
statusBar.health_txt.htmlText = playerHealth + "%";
statusBar.shield_txt.htmlText = shieldPower + "%";
numBullets = 100;
statusBar.ammoClip_txt.htmlText = numBullets;
statusBar.health_status._width = 50;
statusBar.shield_status._width = 50;
statusBar.ammo_status._width = 50;
level.curr = 1;
level.chars = {prevE:cArr[0][0], prevEnumGuns:cArr[0][1], prevEbulletScale:cArr[0][2], currE:cArr[0][0], currEnumGuns:cArr[0][1], currEbulletScale:cArr[0][2], nextE:cArr[1][0], nextEnumGuns:cArr[1][1], nextEbulletScale:cArr[1][2]};
Symbol 18 MovieClip Frame 1
stop();
Symbol 26 MovieClip [Destroyer] Frame 1
#initclip 18
Object.registerClass("Destroyer", Enemy);
#endinitclip
Symbol 26 MovieClip [Destroyer] Frame 3
gotoAndPlay (1);
Symbol 26 MovieClip [Destroyer] Frame 8
gotoAndPlay (1);
Symbol 28 MovieClip Frame 1
stop();
Symbol 36 MovieClip [smallPlane] Frame 1
#initclip 5
Object.registerClass("smallPlane", Enemy);
#endinitclip
Symbol 47 MovieClip [duneRover] Frame 1
#initclip 6
Object.registerClass("duneRover", Enemy);
#endinitclip
Symbol 47 MovieClip [duneRover] Frame 3
gotoAndPlay (1);
Symbol 47 MovieClip [duneRover] Frame 4
i = 1;
while (i <= 3) {
this["rTire" + i].stop();
this["lTire" + i].stop();
i++;
}
Symbol 53 MovieClip [SquareMobile] Frame 1
#initclip 7
Object.registerClass("SquareMobile", Enemy);
#endinitclip
stop();
Symbol 53 MovieClip [SquareMobile] Frame 3
lTire.stop();
rTire.stop();
Symbol 53 MovieClip [SquareMobile] Frame 10
gotoAndPlay (1);
Symbol 58 MovieClip [RollnShoot] Frame 1
#initclip 8
Object.registerClass("RollnShoot", Enemy);
#endinitclip
Symbol 58 MovieClip [RollnShoot] Frame 8
gotoAndPlay (1);
Symbol 60 MovieClip Frame 1
stop();
Symbol 62 MovieClip [bugMobile] Frame 1
#initclip 9
Object.registerClass("bugMobile", Enemy);
#endinitclip
Symbol 62 MovieClip [bugMobile] Frame 6
gotoAndPlay (1);
Symbol 62 MovieClip [bugMobile] Frame 7
this.lTire.stop();
this.rTire.stop();
Symbol 70 MovieClip [BigTank] Frame 1
#initclip 10
Object.registerClass("BigTank", Enemy);
#endinitclip
Symbol 70 MovieClip [BigTank] Frame 3
gotoAndPlay (1);
Symbol 70 MovieClip [BigTank] Frame 4
tires.lTire1.stop();
tires.lTire2.stop();
tires.rTire1.stop();
tires.rTire2.stop();
Symbol 78 MovieClip [Helicopter] Frame 1
#initclip 11
Object.registerClass("Helicopter", Enemy);
#endinitclip
Symbol 81 MovieClip [fighterJet] Frame 1
#initclip 12
Object.registerClass("fighterJet", Enemy);
#endinitclip
Symbol 81 MovieClip [fighterJet] Frame 2
gotoAndPlay (1);
Symbol 81 MovieClip [fighterJet] Frame 10
gotoAndPlay (1);
Symbol 85 MovieClip [SmallTank] Frame 1
#initclip 13
Object.registerClass("SmallTank", Enemy);
#endinitclip
Symbol 85 MovieClip [SmallTank] Frame 6
gotoAndPlay (1);
Symbol 85 MovieClip [SmallTank] Frame 7
rTire.stop();
lTire.stop();
bTire.stop();
Symbol 97 MovieClip [explosion] Frame 17
stop();
this.removeMovieClip();
Symbol 100 MovieClip [eBullet] Frame 28
stop();
this.removeMovieClip();
Symbol 102 MovieClip [bullet] Frame 1
Symbol 102 MovieClip [bullet] Frame 15
stop();
this.removeMovieClip();
Symbol 115 MovieClip [forceField] Frame 8
gotoAndPlay (100);
Symbol 115 MovieClip [forceField] Frame 20
gotoAndPlay (75);
Symbol 115 MovieClip [forceField] Frame 36
gotoAndPlay (50);
Symbol 115 MovieClip [forceField] Frame 55
gotoAndPlay (25);
Symbol 121 MovieClip [TimeScore] Frame 1
function readOut() {
currTime = getTimer();
eTime = Math.floor(currTime - startTime);
if (useScore == true) {
_root.score = (-(tCurve * eTime)) + maxScore;
}
score_txt.htmlText = thouSep(_root.score);
eHours = Math.floor(eTime / 3600000);
leftOvr = eTime - (eHours * 3600000);
eMin = Math.floor(leftOvr / 60000);
leftOvr = leftOvr - (eMin * 60000);
eSec = Math.floor(leftOvr / 1000);
leftOvr = leftOvr - (eSec * 1000);
elapsedH = Math.floor(leftOvr / 10);
if (ehrs < 10) {
hrs = "0" + ehrs.toString();
} else {
hrs = eHours.toString();
}
if (eMin < 10) {
mins = "0" + eMin.toString();
} else {
mins = eMin.toString();
}
if (eSec < 10) {
secs = "0" + eSec.toString();
} else {
secs = eSec.toString();
}
if (elapsedH < 10) {
hunds = "0" + elapsedH.toString();
} else {
hunds = elapsedH.toString();
}
_root.theTime = (((((hrs + ":") + mins) + ":") + secs) + ":") + hunds;
timer_txt.htmlText = _root.theTime;
}
function thouSep(num) {
thouNum = num.toString();
lngth = thouNum.length;
numPlaces = Math.ceil(lngth / 3);
leftOvr = lngth % 3;
if (leftOvr > 0) {
bigNum = thouNum.substr(0, leftOvr);
thouNumSep = bigNum;
counter = leftOvr;
} else {
bigNum = thouNum.substr(0, 3);
thouNumSep = bigNum;
counter = 3;
}
i = 1;
while (i < numPlaces) {
thisPart = "," + thouNum.substr(counter, 3);
thouNumSep = thouNumSep + thisPart;
counter = counter + 3;
i++;
}
_global.finalScore = thouNumSep;
return(thouNumSep);
}
if (starter == true) {
timer_txt.htmlText = "00:00:00:00";
if (useScore == true) {
_root.score = 0;
}
startTime = getTimer();
startIt = setInterval(readOut, 10);
} else {
clearInterval(this.startIt);
if (useScore == true) {
_root.score = _global.finalScore;
}
score_txt.htmlText = _root.score;
timer_txt.htmlText = _root.theTime;
}
Symbol 137 MovieClip Frame 1
stop();
this.music = "on";
Symbol 137 MovieClip Frame 2
stop();
this.music = "off";
Symbol 147 MovieClip [smartBomb] Frame 1
#initclip 14
Object.registerClass("smartBomb", Bonus);
#endinitclip
Symbol 149 MovieClip [shield] Frame 1
#initclip 15
Object.registerClass("shield", Bonus);
#endinitclip
Symbol 151 MovieClip [health] Frame 1
#initclip 16
Object.registerClass("health", Bonus);
#endinitclip
Symbol 153 MovieClip [ammunition] Frame 1
#initclip 17
Object.registerClass("ammunition", Bonus);
#endinitclip
Symbol 172 MovieClip Frame 1
stop();
Instance of Symbol 171 MovieClip "swfloader" in Symbol 172 MovieClip Frame 1
onClipEvent (load) {
function strip_spaces(str) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < str.length) {
if ((str.charAt(_local1) != " ") && (str.charAt(_local1) != ";")) {
_local3 = _local3 + str.charAt(_local1);
}
_local1++;
}
return(_local3);
}
function simple_script(action, timeline) {
action = strip_spaces(action);
if ((action.length > 0) && ((action.indexOf(")") != -1) && (action.indexOf("(") != -1))) {
var _local3 = action.split(".");
var _local5 = _local3.pop();
var _local7 = _local5.indexOf("(");
var _local9 = _local5.indexOf(")");
var _local8 = _local5.substr(0, _local7);
var _local4 = _local5.substr(_local7 + 1, _local9 - (_local7 + 1));
var _local2 = timeline;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local2[_local3[_local1]];
_local1++;
}
if (_local4.indexOf("\"") != -1) {
_local4 = _local4.substr(1, _local4.length - 2);
}
_local2[_local8](_local4);
}
}
function execute_action() {
unloaded = true;
_parent._visible = false;
simple_script(_parent.play_action_val, _parent);
}
_parent.anim.gotoAndStop(1);
simple_script(_parent.init_action_val, _parent);
var done = false;
var unloaded = false;
var orig_x = _parent._x;
var orig_y = _parent._y;
var dist_x = (_parent._x + ((_parent._width * 2) / 3));
var dist_y = (_parent._y + ((_parent._height * 2) / 3));
var orig_a = _parent._alpha;
var accel_jump = 0.75;
var slow_factor = _parent.slow_factor_val;
var speed_factor = (1 + (slow_factor / (1 - slow_factor)));
var ready = false;
var perc_fadeout = 0;
_parent.perc._x = _parent.anim._x - (_parent.perc._width / 2);
_parent.perc._y = _parent.anim._y - (_parent.perc._height / 2);
if (slow_factor < 1) {
switch (_parent.xin_motion_val) {
case "Up" :
_parent._y = orig_y + (dist_y * 2);
break;
case "Down" :
_parent._y = orig_y - (dist_y * 2);
break;
case "Left" :
_parent._x = orig_x + (dist_x * 2);
break;
case "Right" :
_parent._x = orig_x - (dist_x * 2);
break;
case "Toward" :
_parent._xscale = (_parent._yscale = 1);
break;
case "None" :
_parent._alpha = 0;
}
} else {
ready = true;
}
}
onClipEvent (enterFrame) {
if (unloaded) {
return(undefined);
}
if (!ready) {
switch (_parent.xin_motion_val) {
case "Toward" :
_parent._xscale = _parent._xscale + ((100 - _parent._xscale) * slow_factor);
_parent._yscale = _parent._xscale;
if (_parent.xin_alphatype_val == "Yes") {
_parent._alpha = Math.round((orig_a / 100) * Math.max(0, Math.min(_parent._xscale, 100)));
}
if (Math.abs(100 - _parent._xscale) < 0.5) {
_parent._xscale = (_parent._yscale = 100);
_parent._alpha = orig_a;
ready = true;
}
break;
default :
_parent._x = _parent._x + ((orig_x - _parent._x) * slow_factor);
_parent._y = _parent._y + ((orig_y - _parent._y) * slow_factor);
if (_parent.xin_alphatype_val == "Yes") {
if (_parent.xin_motion_val == "None") {
_parent._alpha = _parent._alpha + ((orig_a - _parent._alpha) * slow_factor);
} else if (Math.abs(orig_x - _parent._x) > Math.abs(orig_y - _parent._y)) {
_parent._alpha = 100 - Math.round(((orig_a / 100) * (Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x)) * 100);
} else {
_parent._alpha = 100 - Math.round(((orig_a / 100) * (Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y)) * 100);
}
}
if (!(((_parent.xin_motion_val == "None") && (Math.abs(_parent._alpha - orig_a) <= 1)) || (((_parent.xin_motion_val != "None") && (Math.abs(_parent._y - orig_y) < 0.5)) && (Math.abs(_parent._x - orig_x) < 0.5)))) {
break;
}
_parent._x = orig_x;
_parent._y = orig_y;
_parent._alpha = orig_a;
ready = true;
}
} else if (!done) {
var rl = _root.getBytesLoaded();
var rt = (_root.getBytesTotal() * (_parent.perc_req_val / 100));
if ((rl > 10) && (rt > 10)) {
rl = Math.min(rl, rt);
var new_frame = (_parent.anim._currentframe + Math.ceil(((_parent.anim._totalframes * (rl / rt)) - _parent.anim._currentframe) / 4));
new_frame = Math.max(1, new_frame);
if (_parent.show_perc_val == "Yes") {
_parent.perc.text = Math.round(((new_frame - 1) / (_parent.anim._totalframes - 1)) * 100) + " %";
}
if (new_frame != _parent.anim._currentframe) {
_parent.anim.gotoAndStop(new_frame);
}
if ((_parent.anim._totalframes == _parent.anim._currentframe) && (rl >= rt)) {
done = true;
}
}
} else if (slow_factor < 1) {
switch (_parent.xout_motion_val) {
case "Down" :
if (_parent._y <= orig_y) {
_parent._y = orig_y + accel_jump;
}
_parent._y = orig_y + (Math.abs(_parent._y - orig_y) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y > (orig_y + (dist_y * 2))) {
execute_action();
}
break;
case "Up" :
if (_parent._y >= orig_y) {
_parent._y = orig_y - accel_jump;
}
_parent._y = orig_y - (Math.abs(_parent._y - orig_y) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_y, Math.abs(_parent._y - orig_y)) / dist_y) * 100);
if (_parent._y < (orig_y - (dist_y * 2))) {
execute_action();
}
break;
case "Right" :
if (_parent._x <= orig_x) {
_parent._x = orig_x + accel_jump;
}
_parent._x = orig_x + (Math.abs(_parent._x - orig_x) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x > (orig_x + (dist_x * 2))) {
execute_action();
}
break;
case "Left" :
if (_parent._x >= orig_x) {
_parent._x = orig_x - accel_jump;
}
_parent._x = orig_x - (Math.abs(_parent._x - orig_x) * speed_factor);
perc_fadeout = Math.round((Math.min(dist_x, Math.abs(_parent._x - orig_x)) / dist_x) * 100);
if (_parent._x < (orig_x - (dist_x * 2))) {
execute_action();
}
break;
case "Away" :
if ((_parent._xscale >= 100) || (_parent._yscale >= 100)) {
_parent._xscale = (_parent._yscale = 100 - accel_jump);
}
_parent._xscale = (_parent._yscale = Math.max(0.5, 100 - ((100 - _parent._yscale) * speed_factor)));
perc_fadeout = 100 - Math.round(Math.max(0, Math.min(_parent._xscale, 100)));
if (_parent._xscale < 1) {
execute_action();
}
break;
default :
perc_fadeout = perc_fadeout + ((100 - perc_fadeout) * slow_factor);
if (Math.abs(perc_fadeout - 100) > 1) {
break;
}
execute_action();
}
if (!(_parent.xout_alphatype_val === "Yes")) {
} else {
_parent._alpha = (orig_a / 100) * (100 - perc_fadeout);
}
} else {
execute_action();
}
}
Instance of Symbol 174 MovieClip "script" in Symbol 175 MovieClip Frame 1
onClipEvent (load) {
_root.eyeland_hs_highscore_url = _parent.highscore_url;
_root.eyeland_hs_game_id = _parent.game_id;
_root.eyeland_hs_score_variable = _parent.score_variable;
_root.eyeland_hs_button_label = _parent.button_label;
}
Symbol 354 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
var lowNum, highNum, theInt, follower;
function Enemy () {
function onEnterFrame() {
if (_root.level.finished == true) {
clearInterval(this.follower);
this.removeMovieClip();
}
}
super();
if (_root.level.difficulty == "novice") {
lowNum = 7;
highNum = 12;
} else if (_root.level.difficulty == "experienced") {
lowNum = 4;
highNum = 9;
} else {
lowNum = 1;
highNum = 6;
}
theInt = _root.randi(lowNum, highNum) * 1000;
follower = setInterval(_root.followPlayer, theInt, this);
}
var shooting = false;
}
Symbol 355 MovieClip [__Packages.Bonus] Frame 0
class Bonus extends MovieClip
{
var showTime, hitName, _name, startX, _x, startY, _y;
function Bonus () {
function onEnterFrame() {
if (this.showing == true) {
if (getTimer() >= (this.ds + this.showTime)) {
this.showing = false;
this._x = this.startX;
this._y = this.startY;
}
}
}
super();
if (_root.level.difficulty == "novice") {
showTime = 12000;
} else if (_root.level.difficulty == "experienced") {
showTime = 10000;
} else {
showTime = 8000;
}
hitName = _name;
startX = _x;
startY = _y;
trace(showTime);
}
var showing = false;
}
Symbol 356 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 357 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 197 Button
on (release, keyPress "<Enter>") {
this.play();
}
Symbol 218 MovieClip Frame 1
stop();
Symbol 224 Button
on (release) {
bg_music.stop();
if (_global.loopPlaying == 1) {
bg_music = loop_2;
_global.loopPlaying = 2;
} else {
bg_music = loop_1;
_global.loopPlaying = 1;
}
nextEnemy.removeMovieClip();
if (statusBar.music_btn.music == "on") {
bg_music.start(0, 999);
}
gotoAndStop ("game");
}
Symbol 231 MovieClip Frame 40
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 2
stop();
Symbol 248 MovieClip Frame 12
stop();
Symbol 248 MovieClip Frame 22
stop();
Symbol 255 Button
on (press) {
_parent.field.scroll = Math.max(1, _parent.field.scroll - 1);
}
Symbol 258 Button
on (press) {
_parent.field.scroll = Math.min(_parent.field.maxscroll, _parent.field.scroll + 1);
}
Instance of Symbol 174 MovieClip in Symbol 261 MovieClip Frame 1
onClipEvent (load) {
_parent.field.text = _root[_parent.root_var_name];
if (_parent.field.maxscroll > 1) {
_parent.up._visible = true;
_parent.down._visible = true;
} else {
_parent.up._visible = false;
_parent.down._visible = false;
}
}
onClipEvent (enterFrame) {
}
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 2
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 2
stop();
Instance of Symbol 261 MovieClip in Symbol 266 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
root_var_name = "eyeland_hs_currentmessage";
}
Symbol 266 MovieClip Frame 10
stop();
Symbol 266 MovieClip Frame 21
stop();
Symbol 266 MovieClip Frame 34
stop();
Symbol 266 MovieClip Frame 47
stop();
Instance of Symbol 261 MovieClip in Symbol 266 MovieClip Frame 47
//component parameters
onClipEvent (construct) {
root_var_name = "eyeland_hs_currentmessage";
}
Symbol 275 Button
on (release) {
_root.eyeland_hs_p = (_root.eyeland_hs_e = "");
_root.eyeland_hs_p = _parent.enter_screens.field_name.holder.name;
_root.eyeland_hs_e = _parent.enter_screens.field_email.holder.email;
_parent.gotoAndPlay("save");
}
Symbol 278 Button
on (release) {
_parent.gotoAndPlay("load");
}
Symbol 283 Button
on (release) {
btn_press();
}
Symbol 286 Button
on (release) {
_root._quality = _root.eyeland_hs_quality;
_parent._parent.play();
}
Symbol 289 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 2
stop();
Symbol 289 MovieClip Frame 3
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 25
stop();
Symbol 320 MovieClip Frame 47
stop();
Symbol 320 MovieClip Frame 66
stop();
Symbol 320 MovieClip Frame 82
stop();
Symbol 320 MovieClip Frame 102
stop();
Instance of Symbol 320 MovieClip "line" in Symbol 321 MovieClip Frame 1
onClipEvent (load) {
if (this._name == "line") {
this._visible = false;
}
}
Symbol 325 Button
on (press) {
if (!_parent._parent.script.draggable) {
return(undefined);
}
this.startDrag(false, _parent._parent.script.dragx, _parent._parent.script.topdragy, _parent._parent.script.dragx, _parent._parent.script.topdragy + _parent._parent.script.dragheight);
_parent._parent.script.drag = true;
}
on (release, releaseOutside) {
if (!_parent._parent.script.draggable) {
return(undefined);
}
this.stopDrag();
_parent._parent.script.drag = false;
}
Symbol 329 Button
on (press) {
_parent._parent.script.pressup = (_parent._parent.script.moveup = true);
}
on (release, releaseOutside) {
_parent._parent.script.pressup = false;
}
Symbol 332 Button
on (press) {
_parent._parent.script.pressdown = (_parent._parent.script.movedown = true);
}
on (release, releaseOutside) {
_parent._parent.script.pressdown = false;
}
Symbol 340 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
function rand_str() {
var _local3 = "";
var _local4 = 10;
var _local2 = "abcdefghijklmnopqrstuvwxyz";
var _local1 = 0;
while (_local1 < _local4) {
_local3 = _local3 + _local2.charAt(Math.floor(Math.random() * _local2.length));
_local1++;
}
return(_local3);
}
function rhex(num) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt((num >> ((j * 8) + 4)) & 15) + hex_chr.charAt((num >> (j * 8)) & 15));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((i % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((i % 4) * 8));
blks[(nblk * 16) - 2] = str.length * 8;
return(blks);
}
function add2(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(add2(rol(add2(add2(a, q), add2(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn((b ^ c) ^ d, a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = add2(a, olda);
b = add2(b, oldb);
c = add2(c, oldc);
d = add2(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
var hex_chr = "0123456789abcdef";
_root.eyeland_hs_quality = _root._quality;
_root._quality = "HIGH";
var challenged = false;
_root.eyeland_hs_players = new Array();
_parent.stop();
stop();
Instance of Symbol 174 MovieClip "loader" in Symbol 351 MovieClip Frame 1
onClipEvent (load) {
if ((((_root.eyeland_hs_highscore_url == undefined) || (_root.eyeland_hs_game_id == undefined)) || (_root.eyeland_hs_score_variable == undefined)) || (_root.eyeland_hs_button_label == undefined)) {
trace("== GIAF HS ERROR == Highscore variables not found. Use the \"giaf hs settings\" component on a scene prior to this one to set the highscore variables correctly.");
}
if (_root[_root.eyeland_hs_score_variable] == undefined) {
trace(("== GIAF HS ERROR == Highscore variable \"_root." + _root.eyeland_hs_score_variable) + "\" not set. Please adjust your game's code to make sure this score variable is set before attempting to save it to the server. Use the \"giaf hs settings\" component to set the name of the score variable.");
}
_parent.highscore_url = _root.eyeland_hs_highscore_url;
_parent.game_id = _root.eyeland_hs_game_id;
_parent.score_variable = _root.eyeland_hs_score_variable;
_parent.button_label = _root.eyeland_hs_button_label;
var score = _root[_parent.score_variable];
loadVariables ((((((_parent.highscore_url + "?action=check&id=") + _parent.game_id) + "&score=") + score) + "&rand=") + Math.round(Math.random() * 999999999), this);
}
onClipEvent (data) {
_root.eyeland_hs_result = result;
_root.eyeland_hs_lowscore = lowscore;
_root.eyeland_hs_recordplayeremail = recordplayeremail;
_root.eyeland_hs_harvest_all_emails = harvest_all_emails;
_root.eyeland_hs_emailpromptmessage = unescape(emailpromptmessage);
_root.eyeland_hs_lowscoremessage = lowscoremessage;
_root.eyeland_hs_maxchars = Number(maxchars);
_parent.gotoAndPlay("enter");
}
Symbol 351 MovieClip Frame 12
function show_prompt(high) {
btn_submit._visible = true;
btn_skip._visible = true;
if (high) {
_root.eyeland_hs_currentmessage = _root.eyeland_hs_emailpromptmessage;
} else {
_root.eyeland_hs_currentmessage = _root.eyeland_hs_lowscoremessage.split("%").join(_root.eyeland_hs_lowscore);
}
if (_root.eyeland_hs_maxchars > 0) {
if ((_root.eyeland_hs_recordplayeremail == "yes") || (_root.eyeland_hs_harvest_all_emails == "yes")) {
enter_screens.gotoAndPlay("enter_email");
enter_screens.field_email.holder.gotoAndPlay("field");
} else {
enter_screens.gotoAndPlay("enter");
}
if (_root.eyeland_hs_maxchars == 3) {
enter_screens.name_label.gotoAndStop(2);
}
enter_screens.field_name.holder.gotoAndPlay("name" + _root.eyeland_hs_maxchars);
} else if ((_root.eyeland_hs_recordplayeremail == "yes") || (_root.eyeland_hs_harvest_all_emails == "yes")) {
enter_screens.gotoAndPlay("enter_email_only");
enter_screens.field_email.holder.gotoAndPlay("field");
} else {
if (high) {
_root.eyeland_hs_currentmessage = _root.eyeland_hs_nonamemessage;
}
enter_screens.gotoAndPlay("message_only");
}
}
_root.eyeland_hs_nonamemessage = "You got a high score!\nClick Submit to record your score anonymously.";
btn_submit._visible = false;
btn_skip._visible = false;
btn_scores._visible = false;
btn_scores._y = btn_submit._y;
btn_playagain._visible = false;
btn_playagain._y = btn_skip._y;
btn_challenge._visible = false;
btn_challenge._y = btn_skip._y;
if (_root.eyeland_hs_result == "yes") {
show_prompt(true);
} else if (_root.eyeland_hs_harvest_all_emails == "yes") {
show_prompt(false);
} else {
btn_scores._visible = true;
btn_playagain._visible = true;
if (_root.eyeland_hs_emailtofriend != "no") {
btn_challenge._visible = true;
} else {
btn_scores._x = btn_scores._x + 50;
btn_playagain._x = btn_playagain._x - 50;
}
_root.eyeland_hs_currentmessage = _root.eyeland_hs_lowscoremessage.split("%").join(_root.eyeland_hs_lowscore);
enter_screens.gotoAndPlay("message_only");
}
stop();
Instance of Symbol 285 MovieClip "btn_challenge" in Symbol 351 MovieClip Frame 12
onClipEvent (load) {
function btn_press() {
_parent.gotoAndPlay("chform");
}
}
Instance of Symbol 289 MovieClip "btn_playagain" in Symbol 351 MovieClip Frame 12
onClipEvent (load) {
if (_parent.button_label == "Play Again") {
gotoAndPlay (2);
} else if (_parent.button_label == "Continue") {
gotoAndPlay (3);
}
}
Instance of Symbol 174 MovieClip in Symbol 351 MovieClip Frame 12
onClipEvent (load) {
_parent.score1 = (_parent.score2 = _root[_parent.score_variable]);
}
Symbol 351 MovieClip Frame 22
stop();
Instance of Symbol 174 MovieClip "copy_to_root" in Symbol 351 MovieClip Frame 22
onClipEvent (data) {
_root.eyeland_hs_players = new Array();
_root.eyeland_hs_scores = new Array();
_root.eyeland_hs_dates = new Array();
_root.eyeland_hs_maxscores = this.maxscores;
_root.eyeland_hs_current = this.current;
_root.eyeland_hs_showdate = this.showdate;
_root.eyeland_hs_cleardate = this.cleardate;
_root.eyeland_hs_emailtofriend = this.emailtofriend;
var n = 0;
while (n < numscores) {
_root.eyeland_hs_players.push(unescape(this["p" + n]));
_root.eyeland_hs_scores.push(this["s" + n]);
_root.eyeland_hs_dates.push(unescape(this["d" + n]));
n++;
}
_parent.gotoAndPlay("show");
}
Instance of Symbol 174 MovieClip in Symbol 351 MovieClip Frame 22
onClipEvent (load) {
var score = _root[_parent.score_variable];
var url = ((((_parent.highscore_url + "?action=get&id=") + _parent.game_id) + "&rand=") + Math.round(Math.random() * 999999999));
loadVariables (url, _parent.copy_to_root);
}
Symbol 351 MovieClip Frame 31
stop();
Instance of Symbol 174 MovieClip in Symbol 351 MovieClip Frame 31
onClipEvent (load) {
var score = _root[_parent.score_variable];
var rand = _parent.rand_str();
var url = ((((((((((((_parent.highscore_url + "?action=set&id=") + _parent.game_id) + "&player=") + escape(_root.eyeland_hs_p)) + "&score=") + score) + "&email=") + escape(_root.eyeland_hs_e)) + "&rand=") + rand) + "&rand2=") + _parent.calcMD5(((((_parent.game_id + "-") + score) + "-") + rand) + "...you shall not pass"));
loadVariables (url, _parent.copy_to_root);
}
Symbol 351 MovieClip Frame 40
if (_root.eyeland_hs_emailtofriend == "no") {
chbutton._visible = false;
}
stop();
Instance of Symbol 289 MovieClip "playagain" in Symbol 351 MovieClip Frame 40
onClipEvent (load) {
if (_parent.button_label == "Play Again") {
this.gotoAndPlay(2);
} else {
this.gotoAndPlay(3);
}
}
Instance of Symbol 285 MovieClip "chbutton" in Symbol 351 MovieClip Frame 40
onClipEvent (load) {
function btn_press() {
_parent.gotoAndPlay("chform");
}
}
Instance of Symbol 174 MovieClip "script" in Symbol 351 MovieClip Frame 40
onClipEvent (load) {
var topliney = _parent.showbg.list.line._y;
var topdragy = _parent.showbg.dragger._y;
var dragx = _parent.showbg.dragger._x;
var dragheight = 73;
var fieldheight = 167.2;
var maxdragamount = (-fieldheight);
var drag = ((dragonce = false));
var pressup = ((moveup = (pressdown = (movedown = false))));
var linedist = 0;
var curr_dist = 0;
var draggable = false;
_parent.showbg.dragger._alpha = 30;
_parent.showbg.up._alpha = 30;
_parent.showbg.down._alpha = 30;
_parent.clearedmsg = "Your score: " + _root[_parent.score_variable];
if (_root.eyeland_hs_cleardate != "00/00/00") {
_parent.clearedmsg = _parent.clearedmsg + ("\nScore table cleared " + _root.eyeland_hs_cleardate);
}
var n = 0;
while (n < _root.eyeland_hs_maxscores) {
_parent.showbg.list.line.duplicateMovieClip("l" + n, n);
var obj = _parent.showbg.list["l" + n];
if (n != _root.eyeland_hs_current) {
obj.flashbox._visible = false;
}
if (_root.eyeland_hs_showdate == "yes") {
if (_root.eyeland_hs_maxchars > 0) {
obj.gotoAndPlay("name_score_date");
} else {
obj.gotoAndPlay("score_date");
}
} else if (_root.eyeland_hs_maxchars == 0) {
obj.gotoAndPlay("score_only");
}
obj._y = obj._y + curr_dist;
obj.number = (n + 1) + ".";
if (n < _root.eyeland_hs_players.length) {
obj.player = ((_root.eyeland_hs_players[n] == "") ? "anonymous" : (_root.eyeland_hs_players[n]));
obj.score = _root.eyeland_hs_scores[n];
obj.date = _root.eyeland_hs_dates[n];
if (obj.player.maxscroll > 1) {
if (_root.eyeland_hs_showdate == "yes") {
obj.gotoAndPlay("name_score_date_tall");
} else {
obj.gotoAndPlay("name_score_tall");
}
}
} else {
obj.anonymous._visible = false;
obj.player = "";
obj.score = "0";
obj.date = "";
}
curr_dist = curr_dist + obj.flashbox._height;
maxdragamount = maxdragamount + obj.flashbox._height;
if (n == (_root.eyeland_hs_maxscores - 1)) {
obj.hline._visible = false;
}
n++;
}
var bobj = _parent.showbg.list["l" + (_root.eyeland_hs_players.length - 1)];
if (maxdragamount > 0) {
var draggable = true;
_parent.showbg.dragger._alpha = 100;
_parent.showbg.up._alpha = 100;
_parent.showbg.down._alpha = 100;
} else {
var draggable = false;
}
_parent.playagain._alpha = 100;
if (_parent.challenged) {
_parent.challenged_message.play();
_parent.challenged = false;
}
}
onClipEvent (enterFrame) {
if (moveup && (draggable)) {
_parent.showbg.dragger._y = Math.max(_parent.showbg.dragger._y - 2, topdragy);
dragonce = true;
}
if (!pressup) {
moveup = false;
}
if (movedown && (draggable)) {
_parent.showbg.dragger._y = Math.min(_parent.showbg.dragger._y + 2, topdragy + dragheight);
dragonce = true;
}
if (!pressdown) {
movedown = false;
}
if (drag || (dragonce)) {
linedist = ((_parent.showbg.dragger._y - topdragy) / dragheight) * maxdragamount;
if ((_parent.showbg.dragger._y - topdragy) < 1) {
linedist = 0;
}
if ((_parent.showbg.dragger._y - topdragy) > (dragheight - 1)) {
linedist = maxdragamount;
}
_parent.showbg.list.l0._y = topliney - linedist;
var n = 1;
while (n < _root.eyeland_hs_maxscores) {
_parent.showbg.list["l" + n]._y = _parent.showbg.list["l" + (n - 1)]._y + _parent.showbg.list["l" + (n - 1)].flashbox._height;
n++;
}
dragonce = false;
}
}
Symbol 351 MovieClip Frame 49
message = ("You scored " + _root[score_variable]) + " points! To challenge a friend to beat your score, enter their email address in the field below and click CHALLENGE!";
yourname = _root.eyeland_hs_p;
stop();
Instance of Symbol 348 MovieClip in Symbol 351 MovieClip Frame 49
onClipEvent (load) {
function btn_press() {
if (_root.eyeland_hs_players.length > 0) {
_parent.gotoAndPlay("show");
} else {
_parent.gotoAndPlay("load");
}
}
}
Instance of Symbol 350 MovieClip in Symbol 351 MovieClip Frame 49
onClipEvent (load) {
function btn_press() {
_root.eyeland_hs_friendemail = _parent.friendemail;
_root.eyeland_hs_yourname = _parent.yourname;
_parent.gotoAndPlay("challenge");
}
}
Symbol 351 MovieClip Frame 60
stop();
Instance of Symbol 174 MovieClip "challenge_handler" in Symbol 351 MovieClip Frame 60
onClipEvent (data) {
if (_root.eyeland_hs_players.length > 0) {
_parent.gotoAndPlay("show");
} else {
_parent.gotoAndPlay("load");
}
}
Instance of Symbol 174 MovieClip in Symbol 351 MovieClip Frame 60
onClipEvent (load) {
_parent.challenged = true;
var score = _root[_parent.score_variable];
var id = _parent.game_id;
var friend = escape(_root.eyeland_hs_friendemail);
var yourname = escape(_root.eyeland_hs_yourname);
var url = ((((((((((_parent.highscore_url + "?action=challenge&id=") + id) + "&friend=") + friend) + "&yourname=") + yourname) + "&score=") + score) + "&rand=") + Math.round(Math.random() * 999999999));
loadVariables (url, _parent.challenge_handler);
}