Frame 1
copyright1 = "2005 4T2 Multimedia Ltd";
copyright2 = "www.4T2.co.uk";
copyright3 = "Enjoy the code ripper boy - let us know how you get on with it!";
gotoAndPlay (200);
Frame 201
var percent = 0;
var frame = 1;
var k = 0;
fscommand ("allowscale", false);
fscommand ("showmenu", false);
stop();
onEnterFrame = function () {
if (percent < 100) {
_level1._visible = false;
percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (_root.getBytesLoaded() == undefined) {
percent = 0;
}
frame = Math.ceil(percent);
if (frame < 1) {
frame = 1;
}
if (frame > 100) {
frame = 100;
}
loader_bar.gotoAndStop(frame);
} else {
_root.gotoAndStop("loaded");
}
};
Frame 205
i = -16734;
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:238, td:"238.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_mc.kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", i - 1);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
function rand(Rstart, Rfinish) {
return(random((Rfinish - Rstart) + 1) + Rstart);
}
function encrypter(original, seed) {
var _local4 = 0;
var _local3 = 0;
while (_local3 <= original.length) {
if (!isNaN(original.substr(_local3, 1))) {
_local4 = _local4 + parseInt(original.substr(_local3, 1), 10);
}
_local3++;
}
if (_local4 < 10) {
_local4 = String("0000" + _local4);
} else if (_local4 < 100) {
_local4 = String("000" + _local4);
} else if (_local4 < 1000) {
_local4 = String("00" + _local4);
} else if (_local4 < 10000) {
_local4 = String("0" + _local4);
}
var _local1 = String((("ROB" + seed) + original) + _local4);
var _local2 = rand(5, (_local1.length / 2) - 1);
var _local5 = rand(8, (_local1.length / 2) - 1);
if ((_local5 == _local2) || (_local5 == (_local2 * 3))) {
_local5--;
}
if (_local2 > 99) {
_local2 = 99;
}
if (_local5 > 99) {
_local5 = 99;
}
var _local7 = rand(10, 99);
_local3 = 0;
while (_local3 < _local7) {
_local1 = (String(_local1.substr(_local2, _local5)) + String(_local1.substr(0, _local2))) + String(_local1.substr(_local5 + _local2, _local1.length));
_local1 = String(_local1.substr(_local2, _local1.length)) + String(_local1.substring(0, _local2));
_local3++;
}
var _local9 = _local2;
if (_local9 < 10) {
_local9 = String("0" + _local9);
}
var _local8 = _local5;
if (_local8 < 10) {
_local8 = String("0" + _local8);
}
_local1 = ((String(_local1) + String(_local9)) + String(_local8)) + String(_local7);
return(_local1);
}
function encrypt(original, seed) {
if (original.length < 20) {
original = ("ZQa" + original) + "EQZXT0123456789";
}
return(encrypter(encrypter(original, seed) + encrypter(original, seed), seed));
}
function decrypter(original, seed) {
var _local3 = Number(original.substr(original.length - 6, 2));
var _local4 = Number(original.substr(original.length - 4, 2));
var _local6 = Number(original.substr(original.length - 2, 2));
original = String(original.substr(0, original.length - 6));
var _local2 = 0;
while (_local2 < _local6) {
original = original.substr(original.length - _local3) + original.substr(0, original.length - _local3);
original = (original.substr(_local4, _local3) + original.substring(0, _local4)) + original.substr(_local4 + _local3, original.length);
_local2++;
}
var _local7 = parseInt(original.substr(-5, 5), 10);
var _local5 = 0;
_local2 = 4;
while (_local2 <= (original.length - 5)) {
if (!isNaN(original.substr(_local2, 1))) {
_local5 = _local5 + parseInt(original.substr(_local2, 1), 10);
}
_local2++;
}
if (((original.substr(0, 3) == "ROB") && (original.substr(3, 1) == seed)) && (_local7 == _local5)) {
return(original.substr(4, original.length - 9));
}
return(false);
}
function decrypt(original, seed) {
var _local2 = decrypter(original, seed);
var _local3 = decrypter(_local2.substr(0, _local2.length / 2), seed);
var _local4 = decrypter(_local2.substr(_local2.length / 2), seed);
if (_local3 == _local4) {
var _local1 = _local3;
if (_local1.substr(0, 3) == "ZQa") {
_local1 = _local1.substr(3, _local1.length - 18);
}
return(_local1);
}
return(false);
}
function initiateTrig() {
ALLTHETRIG = new Array();
var _local1 = 0;
while (_local1 <= 360) {
ALLTHETRIG[_local1] = trigstore(_local1);
_local1++;
}
}
function Float(x, y) {
this.x = x;
this.y = y;
}
function distance(x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function trig(angle) {
var _local2 = Math.floor(angle / 360);
angle = angle - (_local2 * 360);
return(ALLTHETRIG[Math.round(angle)]);
}
function trigstore(angle) {
var _local4 = Math.floor(angle / 360);
angle = angle - (_local4 * 360);
var _local3;
var _local2;
if ((angle >= 0) && (angle <= 90)) {
_local3 = Math.cos(rad * (90 - angle));
_local2 = Math.sin(rad * (90 - angle));
} else if ((angle > 90) and (angle <= 180)) {
_local3 = Math.cos(rad * (angle - 90));
_local2 = -Math.sin(rad * (angle - 90));
} else if ((angle > 180) and (angle <= 270)) {
_local3 = -Math.sin(rad * (angle - 180));
_local2 = -Math.cos(rad * (angle - 180));
} else if ((angle > 270) and (angle <= 360)) {
_local3 = -Math.cos(rad * (angle - 270));
_local2 = Math.sin(rad * (angle - 270));
}
if (Math.abs(_local3) < 1E-5) {
_local3 = 0;
}
if (Math.abs(_local2) < 1E-5) {
_local2 = 0;
}
return(new Float(_local3, _local2));
}
function limit(value, minimum, maximum) {
if (value > maximum) {
value = maximum;
}
if (value < minimum) {
value = minimum;
}
return(value);
}
function reverseTrig(x, y) {
var _local1 = Math.atan(y / x) * 57.2957795130823;
if (x >= 0) {
_local1 = 90 - _local1;
} else {
_local1 = 270 - _local1;
}
if (isNaN(_local1)) {
_local1 = 0;
}
return(_local1);
}
function MIN(a, b) {
if (a < b) {
return(a);
}
return(b);
}
function MAX(a, b) {
if (a > b) {
return(a);
}
return(b);
}
function SGN(a) {
if (a > 0) {
return(1);
}
if (a == 0) {
return(0);
}
if (a < 0) {
return(-1);
}
}
function exchangeEnergy(a, b) {
var _local12 = a.posX - b.posX;
var _local11 = a.posY - b.posY;
var _local17 = Math.sqrt((_local12 * _local12) + (_local11 * _local11));
var _local6 = _local12 / _local17;
var _local5 = _local11 / _local17;
var _local9 = -_local5;
var _local7 = _local6;
var _local22 = (a.dx * _local9) + (a.dy * _local7);
var _local13 = (a.dx * _local6) + (a.dy * _local5);
var _local23 = (b.dx * _local9) + (b.dy * _local7);
var _local15 = (b.dx * _local6) + (b.dy * _local5);
var _local4 = (a.radius * a.radius) * a.elastic;
var _local3 = (b.radius * b.radius) * b.elastic;
if ((!_local4) && (!_local3)) {
_local4 = 1;
_local3 = 1;
}
var _local8 = 1;
var _local14 = (((_local3 * _local15) * (_local8 + 1)) + (_local13 * (_local4 - (_local8 * _local3)))) / (_local4 + _local3);
var _local16 = (((_local4 * _local13) * (_local8 + 1)) - (_local15 * (_local4 - (_local8 * _local3)))) / (_local4 + _local3);
var _local24 = _local22;
var _local10 = _local23;
var _local21 = (_local14 * _local6) + (_local24 * _local9);
var _local19 = (_local14 * _local5) + (_local10 * _local7);
var _local20 = (_local16 * _local6) + (_local10 * _local9);
var _local18 = (_local16 * _local5) + (_local10 * _local7);
a.dx = limit(_local21, -a.maxD, a.maxD);
a.dy = limit(_local19, -a.maxD, a.maxD);
b.dx = limit(_local20, -b.maxD, b.maxD);
b.dy = limit(_local18, -b.maxD, b.maxD);
a.collide = (b.collide = true);
}
resetColorTransform = new Object();
resetColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
hiliteColorTransform = new Object();
hiliteColorTransform = {ra:"100", rb:"255", ga:"100", gb:"255", ba:"100", bb:"255", aa:"100", ab:"0"};
loliteColorTransform = new Object();
loliteColorTransform = {ra:"100", rb:"-255", ga:"100", gb:"-255", ba:"100", bb:"-255", aa:"100", ab:"0"};
Array.prototype.shuffle = function () {
var _local5 = this.length;
var _local3 = _local5;
while (_local3--) {
var _local2 = random(_local5);
var _local4 = this[_local3];
this[_local3] = this[_local2];
this[_local2] = _local4;
}
};
function Radar(parent) {
this.parent = parent;
this.blips = new Array();
this.MC = this.parent.MC.blank.attachMovie("radar", "radar", 1);
this.width = 300;
this.height = 50;
this.width2 = this.width / 2;
this.height2 = this.height / 2;
this.MC._x = (SCREENX - this.width) / 2;
this.MC._y = 30;
this.mask = this.MC.attachMovie("blank", "mask", 2);
this.mask._width = this.width;
this.mask._height = this.height;
this.MC.setMask(this.mask);
}
Radar.prototype.handle = function () {
if (!this.parent.parent.level.terrain) {
this.MC._visible = false;
return(undefined);
}
if (!this.scaleX) {
this.scaleX = this.width / this.parent.parent.level.terrain.width;
this.scaleY = this.height / this.parent.parent.level.terrain.height;
this.MC.window._xscale = SCREENX * this.scaleX;
this.MC.window._yscale = SCREENY * this.scaleY;
this.MC.window.swapDepths(1000);
}
this.draw();
};
Radar.prototype.draw = function () {
this.MC._visible = true;
this.MC.blips = this.MC.createEmptyMovieClip("blips", 1);
for (var _local3 in this.blips) {
var _local2 = this.MC.blips.attachMovie("blip", "blip" + _local3, _local3);
_local2.gotoAndStop(this.blips[_local3].class);
_local2._x = this.blips[_local3].posX * this.scaleX;
_local2._y = this.height2 + (this.blips[_local3].posY * this.scaleY);
if (this.blips[_local3].class == "ball") {
_local2._y = _local2._y + ((this.blips[_local3].radius * this.scaleY) + 5);
}
if (this.blips[_local3].type == "H") {
_local2.gotoAndStop("friend");
}
}
this.blips = new Array();
this.MC.window._x = this.parent.parent.level.terrain.posX * this.scaleX;
this.MC.window._y = ((this.parent.parent.level.terrain.posY + SCREENY) + SCREENY2) * this.scaleY;
};
function Catapult(parent) {
this.parent = parent;
this.MC = this.parent.MCgrfx.attachMovie("catapult", "catapult", 499);
this.posX = 300;
this.posY = 55;
this.armAngle = -90;
this.twang = 0;
this.MC.aimer._visible = false;
this.MC.aimer.message = dialogue("prompt_aimerHelp");
this.MC.arm.gotoAndStop(TEAM);
this.MC.arm.pointer.arrow.gotoAndStop(TEAM);
this.MC.base.gotoAndStop(TEAM);
this.timer = 0;
}
Catapult.prototype.handle = function () {
if (this.twang) {
this.twang--;
this.armAngle = 10;
this.timer = 0;
} else if (this.parent.isDraggingWeapon) {
this.armAngle = this.parent.isDraggingWeapon.angle;
} else if (this.armAngle >= -90) {
this.armAngle = (this.armAngle * 0.9) + -9;
this.timer++;
}
this.draw();
};
Catapult.prototype.draw = function () {
this.MC._x = this.posX;
this.MC._y = this.posY + 600;
this.MC.line._visible = false;
this.MC.arm._rotation = this.armAngle;
this.MC.arm.pointer._visible = false;
this.MC.aimer._visible = false;
if (this.parent.isDraggingWeapon) {
if ((this.MC.line._xscale < 300) && (this.MC.line._yscale < 300)) {
this.MC.line._visible = true;
}
this.MC.arm.pointer._visible = true;
this.MC.arm.pointer._x = this.parent.isDraggingWeapon.launchSpeed;
if ((this.parent.parent.helpMode && (this.armAngle > 275)) && (this.armAngle < 355)) {
cursorState = "aim";
this.MC.aimer._visible = true;
}
}
};
Catapult.prototype.updateElastic = function (dx, dy) {
this.MC.line._xscale = dx;
this.MC.line._yscale = dy;
};
function Enemy(parent, number, type, progress) {
this.class = "enemy";
this.active = true;
this.parent = parent;
this.number = number;
this.type = type;
this.progress = progress;
this.frames = 500;
this.pain = 0;
this.lastHitBy = false;
this.missileFrequency = 0;
this.originalLife = 10;
this.potentials = 1;
this.blood = false;
this.animated = false;
if (this.type == "A") {
this.potentials = 3;
this.speed = 2;
this.originalLife = 10;
this.brutality = 15;
this.score = 5;
}
if (this.type == "B") {
this.speed = 4;
this.originalLife = 30;
this.brutality = 20;
this.score = 10;
this.missileFrequency = 10;
this.missileType = "arrow";
}
if (this.type == "C") {
this.speed = 15;
this.originalLife = 20;
this.brutality = 30;
this.score = 20;
this.animated = true;
}
if (this.type == "D") {
this.speed = 6;
this.originalLife = 30;
this.brutality = 30;
this.score = 40;
this.animated = true;
}
if (this.type == "E") {
this.speed = 2;
this.originalLife = 100;
this.brutality = 100;
this.score = 100;
this.missileFrequency = 10;
this.missileType = "bolt";
}
if (this.type == "F") {
this.speed = 2;
this.originalLife = 100;
this.brutality = 100;
this.score = 100;
this.missileFrequency = 20;
this.missileType = "fire";
}
if (this.type == "G") {
this.speed = 4;
this.originalLife = 200;
this.brutality = 75;
this.score = 50;
this.missileFrequency = 15;
this.missileType = "energy";
this.animated = true;
}
if (this.type == "H") {
this.speed = 50;
this.originalLife = 0;
this.brutality = 30;
this.score = 0;
this.inprisoned = true;
}
this.life = this.originalLife;
var _local2 = 1 + ((this.parent.parent.level - 1) / 10);
if (this.type == "blank") {
this.originalLife = 10000;
this.speed = 100 * _local2;
this.brutality = 0;
}
this.speed = this.speed / (10000 / _local2);
if (((this.parent.parent.level == 1) && (this.type != "blank")) && (this.type != "H")) {
this.speed = 0;
}
this.MC = this.parent.MCgrfx.attachMovie("enemy", "enemy" + this.number, this.number + 200);
this.MC._y = 875 + random(5);
this.MC.stop();
if (this.originalLife <= 1000) {
this.MChealth = this.parent.MCgrfx.attachMovie("health", "health" + this.number, this.number + 800);
this.MChealth._width = this.originalLife;
this.MChealth._alpha = 50;
}
this.MC.sprite.gotoAndStop((OPPO + "_") + this.type);
this.MC.sprite.type.gotoAndStop(random(this.potentials) + 1);
if (this.animated) {
this.MC.sprite.type.play();
}
this.MC.sprite.hitZone._visible = false;
this.height = this.MC.sprite._height;
}
Enemy.prototype.handle = function () {
if (!this.active) {
return(undefined);
}
this.move();
this.draw();
if (this.pain) {
this.pain--;
this.life--;
if (this.life <= 0) {
this.die();
}
}
};
Enemy.prototype.move = function () {
if (this.progress < 0.95) {
if ((this.parent.parent.timer > 100) || (this.type == "blank")) {
if (this.type == "H") {
if (!this.inprisoned) {
this.progress = this.progress + this.speed;
for (var _local3 in this.parent.enemies) {
var _local2 = this.parent.enemies[_local3];
if (_local2.type != "H") {
_local2.collision(this);
}
}
}
} else {
this.progress = this.progress + this.speed;
}
}
} else {
if (this.type == "blank") {
this.progress = 1;
return(undefined);
}
this.progress = 0;
if (((this.life >= 10) && (!this.pain)) && (this.type != "H")) {
this.parent.castleHit(Math.ceil((this.brutality * this.life) / this.originalLife));
}
this.destroy();
}
};
Enemy.prototype.collision = function (item) {
if (this.pain) {
return(undefined);
}
if (!this.parent.parent.stillInPlay) {
return(undefined);
}
if ((!this.MC.sprite.hitZone.hitTest(item.MC.hitZone)) && (!this.MC.sprite.hitZone.hitTest(item.MC.sprite.hitZone))) {
return(undefined);
}
if (this.type == "H") {
this.inprisoned = false;
this.MC.sprite.type.play();
this.MC.sprite.type.prison._visible = false;
this.spitBlood();
this.parent.focus = this;
this.parent.parent.parent.sfx.play("F_good_1");
this.parent.parent.parent.sfx.play("H");
return(undefined);
}
var _local3 = this.blood;
this.life = this.life - item.brutality;
if (this.life < 10) {
this.life = 10;
}
this.parent.parent.parent.sfx.play((((this.type + "_") + OPPO) + "_") + (random(2) + 1));
if (item.type == "H") {
this.parent.parent.parent.sfx.play((("Q_" + TEAM) + "_") + (random(2) + 1));
}
this.pain = 10;
this.lastHitBy = item;
if (item.launched) {
item.impact = true;
}
this.spitBlood();
};
Enemy.prototype.draw = function () {
this.MC.gotoAndStop(Math.ceil(this.progress * this.frames));
this.p = new Float(0, 0);
this.MC.sprite.localToGlobal(this.p);
this.MC.sprite.type._rotation = 0.8 * (-this.MC.sprite._rotation);
this.posX = this.p.x + this.parent.posX;
this.posY = this.p.y + this.parent.posY;
this.MChealth._x = this.posX;
this.MChealth._y = (this.p.y + 620) + this.parent.posY;
this.MChealth.gotoAndStop(Math.ceil((100 * this.life) / this.originalLife));
if (this.type == "B") {
var _local2 = 4 - Math.ceil(this.life / 10);
if (_local2) {
this.MC.sprite.type.gotoAndStop(_local2);
}
}
if (((this.parent.parent.stillInPlay && (this.parent.parent.timer > 100)) && (random(1000) < this.missileFrequency)) || (((this.parent.parent.timer == 20) && ((((this.parent.parent.level == 2) || (this.parent.parent.level == 4)) || (this.parent.parent.level == 6)) || (this.parent.parent.level == 9))) && (this.missileFrequency > 0))) {
this.parent.missiles.push(new Missile(this.parent, this.parent.missiles.length + 1, this.missileType, this.posX, this.posY - (this.MC.sprite._height * 0.25)));
}
if (this.type != "blank") {
this.parent.parent.parent.hud.radar.blips.push(this);
}
var _local3 = new Color(this.MC);
if (this.pain) {
_local3.setTransform(hiliteColorTransform);
} else {
_local3.setTransform(resetColorTransform);
}
};
Enemy.prototype.destroy = function () {
this.active = false;
this.MC.removeMovieClip();
this.MChealth.removeMovieClip();
this.MCthrow.removeMovieClip();
};
Enemy.prototype.die = function () {
this.lastHitBy.frag(this);
this.destroy();
var _local2 = 1;
if (this.parent.parent.level >= 10) {
return(undefined);
}
if (this.lastHitBy.kills > 1) {
_local2 = this.lastHitBy.kills;
this.MC = this.parent.MCgrfx.attachMovie("scoreUp", "scoreUp" + this.number, this.number + 800);
this.MC.message.message = "x" + _local2;
this.MC._x = this.p.x + this.parent.posX;
this.MC._y = (this.p.y + 550) + this.parent.posY;
}
this.parent.parent.parent.score = this.parent.parent.parent.score + (_local2 * this.score);
};
Enemy.prototype.spitBlood = function () {
var _local4 = random(5);
var _local3 = 0;
while (_local3 <= _local4) {
this.parent.blood++;
var _local2 = this.parent.MCgrfx.attachMovie("blood", "blood" + this.parent.blood, this.parent.blood + 900);
_local2.blooddrop.gotoAndStop(random(6) + 1);
_local2._x = (this.posX + random(10)) - 5;
_local2._y = ((((this.p.y + 600) + this.parent.posY) - (this.MC.sprite._height * 0.5)) + random(20)) - 10;
_local2._xscale = (_local2._yscale = random(50) + 50);
_local2._rotation = random(360);
if (this.parent.blood > 100) {
this.parent.blood = 0;
}
_local3++;
}
};
function Weapon(parent, number, x, y, type) {
this.ox = x;
this.oy = y;
this.class = "weapon";
this.active = true;
this.parent = parent;
this.number = number;
this.posX = (this.prevX = x);
this.posY = (this.prevY = y);
this.type = type;
this.lastDidSound = 0;
this.kills = 0;
this.launchSpeed = 0;
this.launched = false;
this.impact = false;
this.band = true;
if (this.type == "M") {
this.elastic = 0.4;
this.radius = 22;
this.life = 50;
this.reincarnate = false;
this.brutality = 0;
}
if (this.type == "N") {
this.elastic = 0.6;
this.radius = 15;
this.life = 75;
this.reincarnate = false;
this.brutality = 0;
}
if (this.type == "O") {
this.elastic = 0.25;
this.radius = 24;
this.life = 100;
this.reincarnate = false;
this.brutality = 100;
}
if (this.type == "P") {
this.elastic = 0.6;
this.radius = 25;
this.life = 40;
this.reincarnate = false;
this.brutality = 0;
}
if (this.type == "W") {
this.elastic = 1;
this.radius = 20;
this.life = 300;
this.reincarnate = false;
if (this.parent.parent.parent.parent.unlock_W) {
this.reincarnate = true;
}
this.brutality = 50;
this.animated = true;
}
if (this.type == "X") {
this.elastic = 0;
this.radius = 18;
this.life = 30;
this.reincarnate = false;
if (this.parent.parent.parent.parent.unlock_X) {
this.reincarnate = true;
}
this.brutality = 1000;
this.animated = true;
}
this.dx = 0;
this.dy = 0;
this.da = 0;
this.angle = 0;
this.maxD = 40;
this.diameter = this.radius * 2;
this.circumference = this.diameter * Math.PI;
this.collide = false;
this.bungy = 0.95;
this.mx = (this.my = 0);
this.isDragging = false;
this.MC = this.parent.MCgrfx.attachMovie("weapon", "weapon" + this.number, 600 + this.number);
this.MC.gotoAndStop((TEAM + "_") + this.type);
this.MC.sprite.gotoAndStop(random(this.MC.sprite._totalFrames) + 1);
if (this.band) {
this.bandMC = this.parent.MCgrfx.createEmptyMovieClip("band" + this.number, 100 + this.number);
this.bandMC.lineStyle(1, "0xFFFFFF");
this.bandMC._y = 600;
}
this.MC.parent = this;
this.MC.hitZone._visible = false;
if (random(2) == 1) {
this.MC._xscale = -100;
}
this.draw();
}
Weapon.prototype.handle = function () {
if (!this.active) {
if (this.bandMC._alpha > 1) {
this.bandMC._alpha = this.bandMC._alpha * 0.999;
} else {
this.bandMC._visible = false;
}
return(undefined);
}
if (this.impact) {
this.life--;
if (!this.life) {
this.destroy();
return(undefined);
}
}
if (this.launched) {
this.collision();
} else if (((!this.parent.catapult.twang) && (this.parent.parent.stillInPlay)) && (this.parent.parent.timer > 100)) {
this.drag();
}
this.move();
this.draw();
};
Weapon.prototype.drag = function () {
var _local4 = (_xmouse - this.posX) + this.parent.posX;
var _local3 = (_ymouse - this.posY) + this.parent.posY;
var _local5 = (_local4 * _local4) + (_local3 * _local3);
var _local2 = false;
if (_local5 < (this.radius * this.radius)) {
cursorState = "drag";
if (this.parent.parent.helpMode) {
cursorState = "dragHelp";
}
_local2 = true;
}
if (MOUSEDOWN) {
if ((!this.parent.isDraggingWeapon) && (this.parent.parent.timer > 100)) {
if (_local2) {
this.isDragging = true;
}
if (this.isDragging) {
this.MC.shadow._visible = false;
if (this.type != "X") {
this.parent.parent.parent.sfx.play((((this.type + "_") + TEAM) + "_") + (random(2) + 1));
}
if (this.type == "W") {
this.MC._xscale = 100;
}
this.parent.parent.parent.sfx.play("catapult_grab" + (random(5) + 1));
this.parent.isDraggingWeapon = this;
this.parent.focus = this;
this.parent.catapult.MC.arm.pointer.gotoAndPlay(1);
}
}
} else {
if (this.isDragging) {
this.launch();
this.parent.catapult.twang = 10;
}
this.isDragging = false;
}
};
Weapon.prototype.launch = function () {
this.dx = this.mx / (this.radius * 0.2);
this.dy = this.my / (this.radius * 0.2);
this.da = ((this.dx / this.circumference) * 360) * 1;
this.launched = true;
this.MC.swapDepths(300 + this.number);
this.parent.isDraggingWeapon = false;
if (this.band) {
this.bandMC.moveTo(this.posX, this.posY);
var _local2 = this.bandMC.attachMovie("pointerhole", "pointer", 1);
_local2._x = _xmouse + this.parent.posX;
_local2._y = _ymouse + this.parent.posY;
}
this.parent.parent.parent.sfx.play((("launch_" + TEAM) + "_") + (random(3) + 1));
if (this.animated) {
this.MC.sprite.play();
}
};
Weapon.prototype.collision = function () {
var _local6 = 0;
while (_local6 < this.parent.weapons.length) {
var _local2 = this.parent.weapons[_local6];
if (((((_local2.number == this.number) || (_local2.collide)) || (!_local2.launched)) || (!_local2.active)) || (_local2.type == "spam")) {
} else if (!this.MC.hitZone.hitTest(_local2.MC.hitZone)) {
this.parent.savings++;
} else {
var _local5 = _local2.posX - this.posX;
var _local4 = _local2.posY - this.posY;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local3 < (this.radius + _local2.radius)) {
_local5 = _local5 / _local3;
_local4 = _local4 / _local3;
_local3 = _local3 - (this.radius + _local2.radius);
_local2.posX = _local2.posX - (_local5 * _local3);
_local2.posY = _local2.posY - (_local4 * _local3);
exchangeEnergy(this, _local2);
_local2.collision();
}
}
_local6++;
}
for (_local6 in this.parent.shapes.elements) {
this.parent.shapes.elements[_local6].collision(this);
}
for (_local6 in this.parent.enemies) {
this.parent.enemies[_local6].collision(this);
}
};
Weapon.prototype.move = function () {
if (this.launched) {
this.dy = this.dy + GRAVITY;
if (this.type == "W") {
this.dy = this.dy + (GRAVITY * 2);
}
}
this.prevX = this.posX;
this.prevY = this.posY;
if (this.isDragging) {
if (this.parent.parent.stillInPlay) {
cursorState = "aim";
if (this.parent.parent.helpMode) {
cursorState = "aimHelp";
}
}
this.dx = (this.dy = 0);
var dx = ((_xmouse + this.parent.posX) - this.parent.catapult.posX);
var dy = ((_ymouse + this.parent.posY) - this.parent.catapult.posY);
this.parent.catapult.updateElastic(dx, dy);
this.launchSpeed = Math.sqrt((dx * dx) + (dy * dy));
this.launchSpeed = limit(this.launchSpeed, 50, 150);
this.angle = reverseTrig(dx, -dy);
if (this.angle < 180) {
this.angle = 0;
}
if (this.angle < 135) {
this.angle = this.angle + 1000;
}
this.angle = limit(this.angle, 275, 355);
var _local2 = trig(this.angle);
dx = _local2.x * 70;
dy = (-_local2.y) * 70;
this.posX = this.parent.catapult.posX + dx;
this.posY = this.parent.catapult.posY + dy;
_local2 = trig(this.angle - 85);
this.mx = (-_local2.x) * this.launchSpeed;
this.my = _local2.y * this.launchSpeed;
}
this.dx = limit(this.dx, -this.maxD, this.maxD);
this.dy = limit(this.dy, -this.maxD, this.maxD);
this.posX = this.posX + this.dx;
this.posY = this.posY + this.dy;
this.speed = Math.sqrt((this.dx * this.dx) + (this.dy * this.dy));
if (this.onShape) {
if (this.type != "W") {
this.dx = this.dx * this.onShape.friction;
}
if (this.elastic == 0) {
this.dx = this.dx * 0.5;
this.dy = this.dy * 0.5;
}
}
};
Weapon.prototype.draw = function () {
if (this.launched) {
this.parent.parent.parent.hud.radar.blips.push(this);
this.bandMC.lineTo(this.posX, this.posY);
}
if (this.lastDidSound) {
this.lastDidSound--;
}
if ((((this.onShape && (!this.lastDidSound)) && (this.type != "W")) && (this.speed > 2.5)) && (this.parent.parent.stillInPlay)) {
if (this.type != "X") {
this.parent.parent.parent.sfx.play((((this.type + "_") + TEAM) + "_") + (random(2) + 1));
}
this.parent.parent.parent.sfx.play("hit" + (random(5) + 1));
this.lastDidSound = 5;
}
if (this.onShape || (this.collide)) {
this.da = (this.dx / this.circumference) * 360;
if (this.type == "W") {
this.da = 0;
this.angle = 0;
this.MC._xscale = SGN(this.dx) * 100;
}
} else {
this.da = this.da * 0.9;
}
this.angle = this.angle + this.da;
this.MC._x = this.posX;
this.MC._y = this.posY + 600;
this.MC._rotation = this.angle;
if (this.life < 10) {
if (this.type == "X") {
if (this.life == 9) {
this.parent.parent.parent.sfx.play("X");
}
this.MC = this.parent.MCgrfx.attachMovie("explosion", "explosion" + this.number, 300 + this.number);
this.MC.hitZone = this.MC;
this.MC._x = this.posX;
this.MC._y = this.posY + 600;
this.MC.gotoAndStop(11 - this.life);
} else {
var _local2 = new Color(this.MC);
if (FRAMECOUNTER % 2) {
_local2.setTransform(resetColorTransform);
} else {
_local2.setTransform(loliteColorTransform);
}
}
}
};
Weapon.prototype.destroy = function () {
this.MC.removeMovieClip();
this.active = false;
if (this.reincarnate) {
this.rebirth();
}
};
Weapon.prototype.reset = function () {
this.collide = false;
this.onShape = false;
};
Weapon.prototype.rebirth = function () {
this.parent.weapons[this.number - 1] = new Weapon(this.parent, this.number, this.ox, this.oy, this.type);
};
Weapon.prototype.frag = function (corpse) {
this.kills++;
this.parent.parent.parent.totalKills++;
var _local2 = this.kills;
if (_local2 > 5) {
_local2 = 5;
}
};
function Shapes(parent) {
this.parent = parent;
this.MC = this.parent.MC.createEmptyMovieClip("shapes", 100);
this.elements = new Array();
this.elements.push(new Line(this, 1, false, 0, 0, this.parent.width, 0, 1, 1));
this.elements.push(new Line(this, 2, false, this.parent.width, 0, this.parent.width, this.parent.height + 500, 1, 1));
this.elements.push(new Line(this, 3, false, this.parent.width, this.parent.height + 500, 0, this.parent.height + 500, 1, 1));
this.elements.push(new Line(this, 4, false, 0, this.parent.height + 500, 0, 0, 1, 1));
this.elements.push(new Line(this, 8, false, 540, 140, 720, 140, 1, 1));
this.elements.push(new Circle(this, 1, 50, 150, 150, 1, 1));
this.elements.push(new Circle(this, 2, 100, 150, 150, 1, 1));
this.elements.push(new Circle(this, 3, 150, 150, 150, 1, 1));
this.elements.push(new Circle(this, 4, 200, 150, 150, 1, 1));
this.elements.push(new Circle(this, 5, 250, 150, 150, 1, 1));
this.elements.push(new Circle(this, 6, 300, 150, 150, 1, 1));
this.elements.push(new Circle(this, 7, 350, 150, 150, 1, 1));
this.elements.push(new Circle(this, 8, 400, 150, 150, 1, 1));
this.elements.push(new Circle(this, 9, 475, 175, 125, 1, 1));
this.elements.push(new Circle(this, 10, 560, 130, 110, 1, 1));
this.elements.push(new Circle(this, 11, 687, 13, 175, 1, 1));
this.elements.push(new Circle(this, 12, 750, 150, 50, 1, 1));
this.elements.push(new Circle(this, 13, 768, 167, 50, 1, 1));
this.elements.push(new Circle(this, 14, 800, 211, 30, 1, 1));
this.elements.push(new Circle(this, 15, 828, 250, 32, 1, 1));
this.elements.push(new Circle(this, 16, 872, 208, 40, 1, 1));
this.elements.push(new Circle(this, 17, 917, 185, 40, 1, 1));
this.elements.push(new Circle(this, 18, 960, 140, 50, 1, 1));
this.elements.push(new Circle(this, 19, 1030, 100, 100, 1, 1));
this.elements.push(new Circle(this, 20, 1100, 90, 100, 1, 1));
this.elements.push(new Circle(this, 21, 1168, 165, 40, 1, 1));
this.elements.push(new Circle(this, 22, 1175, 198, 30, 1, 1));
this.elements.push(new Circle(this, 23, 1200, 205, 15, 1, 1));
this.elements.push(new Circle(this, 24, 1213, 226, 15, 1, 1));
this.elements.push(new Circle(this, 25, 1220, 226, 15, 1, 1));
this.elements.push(new Circle(this, 26, 1230, 226, 15, 1, 1));
this.elements.push(new Circle(this, 27, 1240, 226, 15, 1, 1));
this.elements.push(new Circle(this, 28, 1250, 226, 15, 1, 1));
this.elements.push(new Circle(this, 29, 1260, 226, 15, 1, 1));
this.elements.push(new Circle(this, 30, 1307, 235, 40, 1, 1));
this.elements.push(new Circle(this, 31, 1345, 270, 50, 1, 1));
this.elements.push(new Circle(this, 32, 1395, 235, 40, 1, 1));
this.elements.push(new Circle(this, 33, 1460, 206, 40, 1, 1));
this.elements.push(new Circle(this, 34, 1500, 197, 40, 1, 1));
this.elements.push(new Circle(this, 35, 1512, 197, 40, 1, 1));
this.elements.push(new Circle(this, 36, 1534, 170, 40, 1, 1));
this.elements.push(new Circle(this, 37, 1690, 100, 150, 1, 1));
this.elements.push(new Circle(this, 38, 1760, 150, 150, 1, 1));
this.elements.push(new Circle(this, 39, 1830, 200, 150, 1, 1));
this.elements.push(new Circle(this, 40, 1900, 250, 150, 1, 1));
this.elements.push(new Circle(this, 41, 1930, 273, 150, 1, 1));
this.elements.push(new Circle(this, 42, 1980, 273, 150, 1, 1));
}
Line = function (parent, number, twosided, x0, y0, x1, y1, elastic, friction) {
this.parent = parent;
this.number = number;
this.twosided = twosided;
this.x0 = x0;
this.y0 = SCREENY - y0;
this.x1 = x1;
this.y1 = SCREENY - y1;
this.elastic = elastic;
this.friction = 1 - ((1 - friction) / 10);
this.dx = this.x1 - this.x0;
this.dy = this.y1 - this.y0;
this.length = Math.sqrt((this.dx * this.dx) + (this.dy * this.dy));
this.nx = (-this.dy) / this.length;
this.ny = this.dx / this.length;
if (this.twosided) {
this.dx2 = this.x0 - this.x1;
this.dy2 = this.y0 - this.y1;
this.nx2 = (-this.dy2) / this.length;
this.ny2 = this.dx2 / this.length;
}
this.MC = this.parent.MC.createEmptyMovieClip("line" + this.number, 200 + this.number);
this.draw();
};
Line.prototype.collision = function (item) {
var _local6 = item.posX - this.x0;
var _local4 = item.posY - this.y0;
var _local5 = ((_local6 * this.dx) + (_local4 * this.dy)) / (this.length * this.length);
if ((_local5 >= 0) && (_local5 <= 1)) {
var _local12 = Math.abs(((this.dy * _local6) - (this.dx * _local4)) / this.length);
var _local7 = MAX(item.speed, item.radius);
var _local3 = _local12 - _local7;
if ((_local3 <= 0) && (_local3 >= (-_local7))) {
_local3 = _local12 - item.radius;
item.posX = item.posX + (this.nx * _local3);
item.posY = item.posY + (this.ny * _local3);
var _local11 = (item.elastic + this.elastic) * ((this.nx * item.dx) + (this.ny * item.dy));
item.dx = item.dx - (this.nx * _local11);
item.dy = item.dy - (this.ny * _local11);
item.onShape = this;
item.impact = true;
}
}
if (!this.twosided) {
return(undefined);
}
var _local10 = item.posX - this.x1;
var _local9 = item.posY - this.y1;
var _local8 = ((_local10 * this.dx2) + (_local9 * this.dy2)) / (this.length * this.length);
if ((_local8 >= 0) && (_local8 <= 1)) {
var _local12 = Math.abs(((this.dy2 * _local10) - (this.dx2 * _local9)) / this.length2);
var _local7 = MAX(item.speed, item.radius);
var _local3 = _local12 - _local7;
if ((_local3 <= 0) && (_local3 >= (-_local7))) {
_local3 = _local12 - item.radius;
item.posX = item.posX + (this.nx2 * _local3);
item.posY = item.posY + (this.ny2 * _local3);
var _local11 = (item.elastic + this.elastic) * ((this.nx2 * item.dx) + (this.ny2 * item.dy));
item.dx = item.dx - (this.nx2 * _local11);
item.dy = item.dy - (this.ny2 * _local11);
item.onShape = this;
item.impact = true;
}
}
};
Line.prototype.intersect = function (what) {
var _local2 = what;
var _local8 = this.x0;
var _local7 = this.y0;
var _local20 = this.x1;
var _local18 = this.y1;
var _local15 = _local2.prevX;
var _local14 = _local2.prevY;
var _local17 = _local2.posX;
var _local16 = _local2.posY;
var _local6 = _local20 - _local8;
var _local5 = _local18 - _local7;
var _local10 = _local17 - _local15;
var _local9 = _local16 - _local14;
var _local13 = ((-_local10) * _local5) + (_local6 * _local9);
var _local12 = _local8 - _local15;
var _local11 = _local7 - _local14;
var _local4 = (((-_local5) * _local12) + (_local6 * _local11)) / _local13;
var _local3 = ((_local10 * _local11) - (_local9 * _local12)) / _local13;
if ((((_local4 >= 0) && (_local4 <= 1)) && (_local3 >= 0)) && (_local3 <= 1)) {
var _local21 = _local8 + (_local3 * _local6);
var _local19 = _local7 + (_local3 * _local5);
_local2.posX = _local21;
_local2.posY = _local19;
_local2.dx = _local2.dx - (this.nx * _local4);
_local2.dy = _local2.dy - (this.ny * _local4);
}
};
Line.prototype.draw = function () {
};
Circle = function (parent, number, x, y, radius, elastic, friction) {
this.parent = parent;
this.number = number;
this.posX = x;
this.posY = SCREENY - y;
this.radius = radius;
this.elastic = elastic;
this.friction = 1 - ((1 - friction) / 10);
this.diameter = this.radius * 2;
this.MC = this.parent.MC.attachMovie("circle", "circle" + this.number, 100 + this.number);
this.draw();
};
Circle.prototype.collision = function (item) {
if (!this.MC.hitTest(item.MC.hitZone)) {
this.parent.parent.savings++;
return(undefined);
}
var _local5 = item.posX - this.posX;
var _local4 = item.posY - this.posY;
var _local3 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local3 < (this.radius + item.radius)) {
_local5 = _local5 / _local3;
_local4 = _local4 / _local3;
_local3 = _local3 - (this.radius + item.radius);
item.posX = item.posX - (_local5 * _local3);
item.posY = item.posY - (_local4 * _local3);
var _local7 = (item.elastic + this.elastic) * ((_local5 * item.dx) + (_local4 * item.dy));
var _local6 = 0;
if (_local6 < 20) {
_local6 = 0;
}
this.parent.parent.shake = this.parent.parent.shake + _local6;
item.dx = item.dx - (_local5 * _local7);
item.dy = item.dy - (_local4 * _local7);
item.onShape = this;
if (item.launched) {
item.impact = true;
}
}
};
Circle.prototype.draw = function (g) {
this.MC._x = this.posX;
this.MC._y = this.posY;
this.MC._xscale = (this.MC._yscale = this.diameter);
};
function Missile(parent, number, type, x, y) {
this.parent = parent;
this.number = number;
this.type = type;
this.posX = x;
this.posY = y;
this.active = true;
if (this.type == "fire") {
this.speed = 2;
}
if (this.type == "arrow") {
this.speed = 1;
}
if (this.type == "bolt") {
this.speed = 2;
}
if (this.type == "energy") {
this.speed = 15;
}
this.frame = 1;
this.fireNumber = 1;
this.MCtrajectory = this.parent.MCgrfx.attachMovie("trajectory", "trajectory" + this.number, this.number + 1100);
this.MCtrajectory._x = this.posX;
this.MCtrajectory._y = this.posY + 600;
var _local3 = this.posX - 350;
var _local2 = this.posY - 50;
this.distance = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var _local4 = reverseTrig(_local3, -_local2);
this.MCtrajectory._rotation = _local4 - 90;
this.MCtrajectory._xscale = (this.MCtrajectory._yscale = this.distance - 100);
this.MCmissile = this.parent.MCgrfx.attachMovie("missile_" + this.type, "missile" + this.number, this.number + 1200);
this.MCmissile.gotoAndStop(OPPO);
this.MCtrajectory.energy._visible = false;
if (this.type == "energy") {
this.MCtrajectory.energy._visible = true;
this.MCtrajectory.energy.gotoAndStop(OPPO);
this.parent.parent.parent.sfx.play((("energy_" + TEAM) + "_") + (random(2) + 1));
} else {
this.parent.parent.parent.sfx.play("whoosh" + (random(3) + 1));
}
}
Missile.prototype.handle = function () {
if (!this.active) {
return(undefined);
}
this.move();
this.draw();
};
Missile.prototype.move = function () {
this.frame = this.frame + ((5000 / this.distance) * this.speed);
if (this.frame >= 500) {
this.parent.castleHit(2);
this.destroy();
}
};
Missile.prototype.draw = function () {
this.MCtrajectory.gotoAndStop(Math.ceil(this.frame));
if (this.type == "energy") {
this.MCtrajectory.energy._x = this.MCtrajectory.energy._x + ((random(20) - 10) * 0.025);
this.MCtrajectory.energy._y = this.MCtrajectory.energy._y + ((random(20) - 10) * 0.025);
return(undefined);
}
this.p = new Float(0, 0);
this.MCtrajectory.position.localToGlobal(this.p);
this.MCmissile._x = this.p.x + this.parent.posX;
this.MCmissile._y = (this.p.y + this.parent.posY) + 600;
if (this.type == "fire") {
this.fireNumber++;
if (this.fireNumber > 20) {
this.fireNumber = 1;
}
var _local2 = this.MCmissile.attachMovie("spit", "spit" + this.fireNumber, this.fireNumber);
_local2._rotation = (random(100) - this.MCmissile._rotation) - 50;
_local2._x = random(20) - 10;
_local2._y = random(20) - 10;
_local2._alpha = random(50) + 50;
_local2._xscale = random(50) + 75;
_local2._yscale = random(50) + 75;
this.MCmissile._rotation = this.MCmissile._rotation + (random(2) + 3);
} else {
this.MCmissile._rotation = this.MCtrajectory.position._rotation;
}
};
Missile.prototype.destroy = function () {
this.MCtrajectory.removeMovieClip();
this.MCmissile.removeMovieClip();
this.active = false;
};
function Terrain(parent) {
this.parent = parent;
this.control = new Control(this, 37, 39, 38, 40, 32);
this.width = 2000;
this.height = 1000;
this.ratio1X = 0.66666666;
this.ratio1Y = 0.83333333;
this.ratio2X = 0.33333333;
this.ratio2Y = 0.41666666;
this.mistX = 0;
this.isDraggingWeapon = false;
this.blood = 0;
this.keyDisp = 10;
this.resetX = 50;
this.resetY = -100;
this.posX = 2000;
this.posY = -240;
this.dx = (this.dy = 0);
this.shake = 0;
this.castleLife = this.parent.parent.castleLifeLeft;
this.castlePain = 0;
this.castleBiggestPain = 0;
this.MC = this.parent.MC.createEmptyMovieClip("terrain", 2);
this.MCgrfx = this.MC.attachMovie("terrain", "grfx", 1);
this.MCgrfx.parent = this;
this.MCgrfx._y = SCREENY - this.height;
this.MCgrfx.terrain_3.spam._visible = false;
this.MCgrfx.terrain_3.swapDepths(500);
this.MCgrfx.castle_bg.gotoAndStop(TEAM);
this.MCgrfx.castle.stop();
this.MCgrfx.castle.castle.gotoAndStop(TEAM);
this.MCgrfx.castle.flag.gotoAndStop(TEAM);
this.MCgrfx.terrain_1.gotoAndStop(TEAM);
this.MCgrfx.terrain_2.gotoAndStop(TEAM);
this.MChealth = this.MCgrfx.attachMovie("health", "health" + this.number, 800);
this.MChealth._width = 100;
this.MChealth._alpha = 50;
this.MChealth._x = 402;
this.MChealth._y = 725;
this.missiles = new Array();
var _local8 = 0;
var _local5 = 0;
var _local7 = 0;
var _local6 = 0;
this.enemies = new Array();
this.enemies.push(new Enemy(this, this.enemies.length + 1, "blank", 0.1));
var _local9 = this.parent.parent.parent.unlock_Q;
var _local10 = this.parent.parent.parent.unlock_W;
var _local11 = this.parent.parent.parent.unlock_X;
if (this.parent.level == 1) {
_local8 = 10;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "blank", 0.1));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.5));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.25));
}
if (this.parent.level == 2) {
_local6 = 5;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "B", 0.5));
}
if (this.parent.level == 3) {
_local5 = 5;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.2));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.5));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.55));
}
if (this.parent.level == 4) {
_local7 = 4;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.25));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "E", 0.27));
}
if (this.parent.level == 5) {
_local8 = 2;
_local5 = 2;
_local6 = 2;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "D", 0.2));
}
if (this.parent.level == 6) {
_local6 = 10;
_local9 = true;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "F", 0.2));
}
if (this.parent.level == 7) {
_local5 = 5;
_local7 = 1;
_local10 = true;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.22));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.3));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.12));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "D", 0.2));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "D", 0.32));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "D", 0.1));
}
if (this.parent.level == 8) {
_local8 = 5;
_local5 = 5;
_local7 = 1;
_local6 = 2;
_local11 = true;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "E", 0.42));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.3));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.4));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.6));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.62));
}
if (this.parent.level == 9) {
_local8 = 5;
_local5 = 5;
_local7 = 1;
_local6 = 2;
_local9 = true;
_local10 = true;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "G", 0.2));
}
if (this.parent.level >= 10) {
_local8 = 5;
_local5 = 5;
_local7 = 1;
_local6 = 2;
_local9 = true;
_local10 = true;
_local11 = true;
this.enemies.push(new Enemy(this, this.enemies.length + 1, "C", 0.35));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "B", 0.65));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "E", 0.44));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.39));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "A", 0.41));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "D", 0.25));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "F", 0.2));
this.enemies.push(new Enemy(this, this.enemies.length + 1, "G", 0.1));
}
this.weapons = new Array();
var _local2 = new Array();
var _local4 = new Array();
var _local3 = 1;
while (_local3 <= _local8) {
_local2.push("M");
_local3++;
}
_local3 = 1;
while (_local3 <= _local5) {
_local2.push("N");
_local3++;
}
_local3 = 1;
while (_local3 <= _local7) {
_local2.push("O");
_local3++;
}
_local3 = 1;
while (_local3 <= _local6) {
_local2.push("P");
_local3++;
}
_local3 = 0;
while (_local3 < _local2.length) {
_local4.push(175 + random(150));
_local3++;
}
_local2.shuffle();
_local4.sort();
if (_local9) {
this.enemies.push(new Enemy(this, this.enemies.length + 1, "H", 0.15));
}
if (_local10) {
this.weapons.push(new Weapon(this, this.weapons.length + 1, 1250 + random(300), 105 + random(100), "W"));
}
if (_local11) {
this.weapons.push(new Weapon(this, this.weapons.length + 1, 130, 160, "X"));
}
_local3 = 0;
while (_local3 < _local2.length) {
this.weapons.push(new Weapon(this, this.weapons.length + 1, 50 + random(400), _local4[_local3], _local2[_local3]));
_local3++;
}
this.catapult = new Catapult(this);
this.shapes = new Shapes(this);
this.focus = this.enemies[1];
this.parent.parent.sfx.play((((this.focus.type + "_") + OPPO) + "_") + (random(2) + 1));
}
Terrain.prototype.handle = function () {
if (this.parent.stillInPlay && (this.parent.timer > 100)) {
this.control.handle();
}
cursorState = "select";
this.savings = 0;
this.mx = _xmouse - this.prevMouseX;
this.my = _ymouse - this.prevMouseY;
this.activeEnemies = 0;
this.activeWeapons = 0;
var _local9 = false;
var _local8 = false;
for (var _local2 in this.weapons) {
this.weapons[_local2].reset();
}
for (var _local2 in this.weapons) {
this.weapons[_local2].handle();
if (this.weapons[_local2].active) {
this.activeWeapons++;
}
}
for (var _local2 in this.enemies) {
this.enemies[_local2].handle();
if ((this.enemies[_local2].active && (this.enemies[_local2].type != "blank")) && (this.enemies[_local2].type != "H")) {
this.activeEnemies++;
}
}
this.castleHandle();
if (!this.activeEnemies) {
this.parent.win();
}
if (!this.activeWeapons) {
for (var _local2 in this.enemies) {
if (this.enemies[_local2].type != "holy") {
this.enemies[_local2].speed = 0.01;
}
}
}
for (var _local2 in this.missiles) {
this.missiles[_local2].handle();
}
if (this.missiles.length >= 100) {
this.missiles.shift();
}
this.catapult.handle();
if (this.focus) {
if (!this.focus.active) {
this.resetView();
} else {
var _local3 = 0.8;
var _local5 = 1 - _local3;
var _local4 = 0;
if (this.isDraggingWeapon) {
_local4 = 0;
}
this.dx = (-this.posX) + ((this.posX * _local3) + ((this.focus.posX - SCREENX2) * _local5));
this.dy = (-this.posY) + (((this.posY + _local4) * _local3) + ((this.focus.posY - SCREENY2) * _local5));
}
}
if (((MOUSEDOWN && (!this.isDraggingWeapon)) && (this.parent.stillInPlay)) && (this.parent.timer > 100)) {
this.focus = false;
this.dx = -this.mx;
this.dy = -this.my;
cursorState = "move";
if (DOUBLECLICK) {
this.instantResetView();
DOUBLECLICK = false;
}
}
if ((this.shake > 1) && (this.parent.stillInPlay)) {
this.shake = this.shake * 0.75;
} else {
this.shake = 0;
}
var _local7 = random(this.shake) - (this.shake / 2);
if (this.control.LEFT) {
this.dx = this.dx - this.keyDisp;
}
if (this.control.RIGHT) {
this.dx = this.dx + this.keyDisp;
}
if (this.control.UP) {
this.dy = this.dy - this.keyDisp;
}
if (this.control.DOWN) {
this.dy = this.dy + this.keyDisp;
}
this.posX = this.posX + this.dx;
this.posY = this.posY + this.dy;
if (this.posX < 0) {
this.posX = 0;
this.dx = 0;
}
if (this.posX > (this.width - SCREENX)) {
this.posX = this.width - SCREENX;
this.dx = 0;
}
if (this.posY > 0) {
this.posY = 0;
}
if (this.posY < (SCREENY - this.height)) {
this.posY = SCREENY - this.height;
}
this.posX = Math.round(this.posX);
this.posY = Math.round(this.posY);
this.mistX = (this.mistX - this.dx) + this.parent.level;
if (this.mistX < -500) {
this.mistX = 0;
}
if (this.mistX > 500) {
this.mistX = 0;
}
var _local6 = this.posY;
this.posY = limit(this.posY + _local7, SCREENY - this.height, 0);
this.dx = this.dx * 0.75;
this.dy = this.dy * 0.75;
this.MC._x = -this.posX;
this.MC._y = -this.posY;
this.MCgrfx.mist._x = this.mistX + this.posX;
this.MCgrfx.terrain_1._x = this.posX * this.ratio1X;
this.MCgrfx.terrain_1._y = 500 + (this.posY * this.ratio1Y);
this.MCgrfx.terrain_2._x = this.posX * this.ratio2X;
this.MCgrfx.terrain_2._y = 250 + (this.posY * this.ratio2Y);
this.posY = _local6;
this.prevMouseX = _xmouse;
this.prevMouseY = _ymouse;
};
Terrain.prototype.resetView = function () {
if (!this.parent.stillInPlay) {
this.focus = false;
}
var _local2 = 0.9;
var _local3 = 1 - _local2;
this.dx = (-this.posX) + ((this.posX * _local2) + (this.resetX * _local3));
this.dy = (-this.posY) + ((this.posY * _local2) + (this.resetY * _local3));
};
Terrain.prototype.instantResetView = function () {
this.dx = (this.dy = 0);
this.posX = this.resetX;
this.posY = this.resetY;
this.focus = false;
};
Terrain.prototype.instantResetView2 = function () {
this.dx = (this.dy = 0);
this.posX = this.resetX;
this.posY = this.resetY - 100;
this.focus = false;
};
Terrain.prototype.castleHit = function (pain) {
if (!this.parent.stillInPlay) {
return(undefined);
}
this.castleLife = this.castleLife - pain;
this.parent.parent.castleLifeLeft = this.castleLife;
this.castlePain = 10;
if (pain > this.castleBiggestPain) {
this.castleBiggestPain = pain;
var _local3 = limit(Math.ceil(pain / 10), 1, 3);
this.parent.parent.sfx.play("castle" + _local3);
}
};
Terrain.prototype.castleHandle = function () {
this.MChealth.gotoAndStop(Math.ceil((100 * this.castleLife) / 100) + 1);
if (this.castleLife <= 0) {
this.castleLife = 0;
this.parent.lose();
}
var _local2 = 6 - Math.ceil((5 * (this.castleLife - 1)) / 100);
trace((this.castleLife + ":") + _local2);
this.MCgrfx.castle.castle.damage.gotoAndStop(_local2);
var _local3 = new Color(this.MCgrfx.castle);
if (!this.castlePain) {
_local3.setTransform(resetColorTransform);
this.castleBiggestPain = 0;
return(undefined);
}
_local3.setTransform(hiliteColorTransform);
this.castlePain--;
this.MCgrfx.castle.dust.play();
this.shake = this.shake + (pain * 5);
};
Terrain.prototype.doFootStomp = function () {
if (!this.parent.stillInPlay) {
return(undefined);
}
this.castleHit(10);
this.shake = this.shake + 150;
};
function Level(parent, level) {
this.parent = parent;
this.parent.control.active = true;
this.MC = this.parent.MC.createEmptyMovieClip("mc", 10);
this.level = level;
this.timer = 0;
this.levelUpCounter = 0;
this.stillInPlay = true;
this.victory = false;
this.levelUpCounterMax = 50;
this.parent.logger("level" + this.level);
this.helpMode = false;
if (this.level == 1) {
this.helpMode = true;
}
this.terrain = new Terrain(this);
this.parent.hud.radar = new Radar(this.parent.hud);
this.parent.flash();
this.parent.sfx.play(("music_ingame_" + TEAM) + "_start");
this.parent.hud.showMessage(dialogue(((TEAM + "_") + this.level) + "_intro"));
}
Level.prototype.handle = function () {
this.timer++;
if ((this.timer == 80) || ((this.terrain.catapult.timer > 100) && ((this.timer % 360) == 0))) {
this.parent.hud.showMessage(dialogue(((TEAM + "_") + this.level) + "_primer"));
}
if (this.timer == 100) {
this.terrain.focus = this.terrain.enemies[0];
}
this.terrain.handle();
if (!this.stillInPlay) {
this.outtro();
if (!this.terrain.focus) {
this.terrain.resetView();
}
}
};
Level.prototype.outtro = function () {
this.levelUpCounter++;
if (this.levelUpCounter == 1) {
this.parent.flash(true);
if (this.victory) {
this.parent.hud.showMessage(dialogue(((TEAM + "_") + this.level) + "_complete"));
} else {
this.parent.hud.showMessage(dialogue(TEAM + "_castledestroyed"));
}
}
if (this.levelUpCounter > 1) {
if (this.victory) {
}
}
if (this.levelUpCounter == this.levelUpCounterMax) {
if (this.victory) {
this.parent.levelUp();
} else {
this.parent.gameOver();
}
}
};
Level.prototype.win = function () {
if (!this.stillInPlay) {
return(undefined);
}
this.victory = true;
this.stillInPlay = false;
if (this.level < 10) {
this.parent.score = this.parent.score + (this.level * 100);
}
this.parent.sfx.play(("music_ingame_" + TEAM) + "_stop");
this.parent.sfx.play("levelup");
};
Level.prototype.lose = function () {
if (!this.stillInPlay) {
return(undefined);
}
this.victory = false;
this.stillInPlay = false;
this.parent.sfx.play(("music_ingame_" + TEAM) + "_stop");
this.parent.sfx.play("thunder");
};
function Control(parent, left, right, up, down, fire) {
this.parent = parent;
this.keyLEFT = left;
this.keyRIGHT = right;
this.keyUP = up;
this.keyDOWN = down;
this.keyFIRE = fire;
this.active = true;
this.LEFT = false;
this.RIGHT = false;
this.UP = false;
this.DOWN = false;
this.FIRE = false;
}
Control.prototype.handle = function () {
this.LEFT = false;
this.RIGHT = false;
this.UP = false;
this.DOWN = false;
this.FIRE = false;
if (!this.active) {
return(undefined);
}
if (Key.isDown(this.keyLEFT)) {
this.LEFT = true;
}
if (Key.isDown(this.keyRIGHT)) {
this.RIGHT = true;
}
if (Key.isDown(this.keyUP)) {
this.UP = true;
}
if (Key.isDown(this.keyDOWN)) {
this.DOWN = true;
}
if (Key.isDown(this.keyFIRE)) {
this.FIRE = true;
}
if (((this.LEFT || (this.RIGHT)) || (this.UP)) || (this.DOWN)) {
this.parent.focus = false;
}
};
function Hud(parent) {
this.parent = parent;
this.MC = this.parent.MC.attachMovie("hud", "hud", 9996);
trace(this.MC._width);
this.MC.messageUp.stop();
this.displayScore = 0;
}
Hud.prototype.handle = function () {
this.radar.handle();
if (this.parent.score < this.displayScore) {
this.displayScore = 0;
}
if (this.displayScore < this.parent.score) {
if (this.displayScore < (this.parent.score - 10)) {
this.displayScore = this.displayScore + 10;
} else {
this.displayScore++;
}
if (this.parent.parent.state == "hidden") {
this.parent.parent.sfx.play("scoreup");
}
}
this.MC.readout = this.parent.fps;
this.MC.score = this.displayScore;
this.MC.level = this.parent.currentLevel;
this.MC.timer.countdown.gotoAndStop(Math.ceil(this.parent.level.timerPercent));
};
Hud.prototype.showMessage = function (message) {
this.MC.messageUp.gotoAndPlay(2);
this.MC.messageUp.play();
this.MC.messageUp.message.message = message;
};
function SFX(parent) {
this.parent = parent;
this.MC = this.parent.MC.attachMovie("soundFX", "soundFX", 3);
this.buffer = new Array();
}
SFX.prototype.handle = function () {
var _local2 = this.buffer.shift();
if (_local2.length) {
this.fire(_local2);
}
};
SFX.prototype.play = function (what) {
this.buffer.push(String(what));
};
SFX.prototype.fire = function (what) {
this.MC.gotoAndPlay(what);
};
function Game(parent) {
this.parent = parent;
this.score = 0;
this.MC = _root.createEmptyMovieClip("Game", 1);
this.hud = new Hud(this);
this.flasher = this.hud.MC.flasher;
this.sfx = this.parent.sfx;
this.castleLifeOriginal = (this.castleLifeLeft = 100);
this.totalKills = 0;
this.comms = new LoadVars();
this.currentLevel = 0;
this.levelUp();
}
Game.prototype.handle = function () {
if (Key.isDown(52) && (Key.isDown(50))) {
if (!CHEATMODE) {
this.sfx.play("cheater", 100, 0);
}
CHEATMODE = true;
this.crackcount = 20;
}
if (CHEATMODE && (!this.crackcount)) {
if (Key.isDown(49)) {
this.sfx.play("cheater", 100, 0);
this.castleLifeLeft = (this.level.terrain.castleLife = this.castleLifeOriginal);
this.crackcount = 20;
}
if (Key.isDown(187)) {
this.sfx.play("cheater", 100, 0);
this.level.win();
this.crackcount = 20;
}
if (Key.isDown(189)) {
this.sfx.play("cheater", 100, 0);
this.level.lose();
this.crackcount = 20;
}
}
if (this.crackcount) {
this.crackcount--;
}
this.fps = this.calcFPS();
this.hud.handle();
this.level.handle();
};
Game.prototype.calcFPS = function () {
this.currentTime = getTimer();
this.frameDuration = this.currentTime - this.previousTime;
this.previousTime = this.currentTime;
return(int(1000 / this.frameDuration));
};
Game.prototype.commsSync = function (write) {
trace("PING");
var _local2 = (((("http://" + HTTP_HOST) + "/flashcomms.php?vid=") + VID) + "&dc=") + random(100000);
if (write) {
_local2 = _local2 + ("&input=" + escape(encrypt(this.comms.toString(), SEED)));
}
this.comms.load(_local2);
};
Game.prototype.flash = function (inout) {
if (!inout) {
this.flasher.gotoAndPlay(1);
} else {
this.flasher.gotoAndPlay("in");
}
};
Game.prototype.gameOver = function () {
cursorState = "select";
this.parent.state = "gameover";
this.sfx.play("panel_gameover");
};
Game.prototype.levelUp = function () {
this.currentLevel++;
if (this.currentLevel > 10) {
this.gameOver();
} else {
this.level = new Level(this, this.currentLevel);
}
};
Game.prototype.logger = function (what) {
trace("logger was called?");
return(undefined);
};
function Panel() {
this.unlocked = 0;
this.activeTeam = "";
this.MC = _root.attachMovie("panel", "panel", 2);
this.MC.parent = this;
this.counter = 0;
this.state = "intro";
this.instructionsPage = 1;
this.instructionsPages = 6;
this.message = "";
this.sfx = new SFX(this);
this.sfx.play("music_intro_start");
this.movieName = "";
this.unlock_Q = (this.unlock_W = (this.unlock_X = false));
}
Panel.prototype.handle = function () {
this.draw();
this.game.handle();
this.sfx.handle();
};
Panel.prototype.draw = function () {
this.MC._visible = true;
_quality = "medium";
if (this.state == "hidden") {
this.MC._visible = false;
}
if (this.state == "gameover") {
this.MC.score = this.game.score + " points";
}
if (this.state == "movie") {
delete this.game;
}
if (this.state == "intro") {
var _local4 = random(20) + 20;
var _local3 = random(10) + 10;
var _local5 = random(10) + 10;
var _local2 = 13421823 /* 0xCCCCFF */;
if (this.activeTeam == "good") {
_local2 = 16755370 /* 0xFFAAAA */;
}
this.filterGO = new flash.filters.GlowFilter(_local2, 1, _local4, _local4);
this.filterGM = new flash.filters.GlowFilter(16777215, 1, _local5, _local5);
this.filterGI = new flash.filters.GlowFilter(_local2, 1, _local3, _local3, 2, 1, true);
this.MC.splash.hero_good.gotoAndStop("off");
this.MC.splash.hero_evil.gotoAndStop("off");
this.MC.splash.overlay.swapDepths(101);
this.MC.splash.slideon_good.swapDepths(102);
this.MC.splash.slideon_evil.swapDepths(103);
this.MC.splash.selectteam.swapDepths(110);
this.MC.splash.hero_good.filters = (this.MC.splash.hero_evil.filters = new Array());
if (this.MC.splash.slideon_good._x > -250) {
this.MC.splash.slideon_good._x = this.MC.splash.slideon_good._x - 10;
}
if (this.MC.splash.slideon_evil._x < 500) {
this.MC.splash.slideon_evil._x = this.MC.splash.slideon_evil._x + 10;
}
this.MC.splash.selectteam._visible = false;
if (this.activeTeam == "good") {
if (this.MC.splash.slideon_good._x < 0) {
this.MC.splash.slideon_good._x = this.MC.splash.slideon_good._x + 50;
}
this.MC.splash.hero_good.gotoAndStop("over");
this.MC.splash.hero_good.swapDepths(100);
this.MC.splash.hero_good.filters = new Array(this.filterGI, this.filterGM, this.filterGO);
} else if (this.activeTeam == "evil") {
if (this.MC.splash.slideon_evil._x > 250) {
this.MC.splash.slideon_evil._x = this.MC.splash.slideon_evil._x - 50;
}
this.MC.splash.hero_evil.gotoAndStop("over");
this.MC.splash.hero_evil.swapDepths(100);
this.MC.splash.hero_evil.filters = new Array(this.filterGI, this.filterGM, this.filterGO);
} else {
this.MC.splash.selectteam._visible = true;
}
this.MC.splash.slideon_good._x = MIN(this.MC.splash.slideon_good._x, 0);
this.MC.splash.slideon_evil._x = MAX(this.MC.splash.slideon_evil._x, 250);
}
if (this.state == "unlock") {
this.doUnlock();
}
if (this.state == "gameover") {
this.MC.gotoAndStop((this.state + "_") + TEAM);
} else {
this.MC.gotoAndStop(this.state);
}
if (this.state == "instructions") {
this.MC.gotoAndStop(this.state + this.instructionsPage);
}
this.MC.message = this.message;
};
Panel.prototype.startGame = function () {
this.state = "movie";
this.movieName = TEAM + "Intro";
this.sfx.play("music_intro_stop");
this.movieEnd = function () {
this.sfx.play(("music_ingame_" + TEAM) + "_stop");
this.reallyStartGame();
};
};
Panel.prototype.reallyStartGame = function () {
this.state = "hidden";
this.sfx.play("music_intro_stop");
this.game = new Game(this);
};
Panel.prototype.pressPlay = function (choice) {
TEAM = choice;
OPPO = "evil";
if (TEAM == "evil") {
OPPO = "good";
}
this.startGame();
};
Panel.prototype.pressInstructions = function () {
this.sfx.play("music_intro_stop");
this.state = "instructions";
this.instructionsPage = 1;
};
Panel.prototype.pressUnlock = function () {
this.sfx.play("music_intro_stop");
this.state = "unlock";
};
Panel.prototype.pressNext = function () {
this.sfx.play("whoosh" + (random(3) + 1));
if (this.instructionsPage < this.instructionsPages) {
this.instructionsPage++;
}
};
Panel.prototype.pressPrevious = function () {
this.sfx.play("whoosh" + (random(3) + 1));
if (this.instructionsPage > 1) {
this.instructionsPage--;
}
};
Panel.prototype.pressRefer = function () {
getURL (dialogue("products_url"), "_blank");
};
Panel.prototype.pressScores = function () {
trace(("pressScore http://" + HTTP_HOST) + "/go/scores/");
getURL (("http://" + HTTP_HOST) + "/go/scores/");
};
Panel.prototype.pressContinue = function () {
if (this.state == "submitting") {
return(undefined);
}
this.state = "submitting";
trace("I submit score!");
var _local3 = _root.createEmptyMovieClip("poster", 1000);
_local3.blob = encrypt((((("(score)" + this.game.score) + "(unlocked)") + this.unlocked) + "(team)") + TEAM, 1);
_local3.act = "parseblob";
_local3.getURL(("http://" + HTTP_HOST) + "/submit.php", "_self", "post");
};
Panel.prototype.doUnlock = function () {
var _local2 = this.MC.unlock.Q;
var _local4 = this.MC.unlock.W;
var _local3 = this.MC.unlock.X;
if (_local2.getLength() == undefined) {
return(undefined);
}
if (_local2.getSelectedIndex()) {
this.unlock_Q = _local2.getSelectedItem().label == "Pineapple";
}
if (_local4.getSelectedIndex()) {
this.unlock_W = _local4.getSelectedItem().label == "Car";
}
if (_local3.getSelectedIndex()) {
this.unlock_X = _local3.getSelectedItem().label == "Monkey";
}
Mouse.show();
cursorState = "";
if (this.unlock_Q && (_local2.getSelectedIndex() == 0)) {
_local2.setSelectedIndex(3);
}
if (this.unlock_W && (_local4.getSelectedIndex() == 0)) {
_local4.setSelectedIndex(2);
}
if (this.unlock_X && (_local3.getSelectedIndex() == 0)) {
_local3.setSelectedIndex(2);
}
if (_local2.getLength()) {
return(undefined);
}
_local2.addItem(dialogue("int_pulldown"));
_local4.addItem(dialogue("int_pulldown"));
_local3.addItem(dialogue("int_pulldown"));
_local2.addItem("Apple");
_local2.addItem("Banana");
_local2.addItem("Pineapple");
_local4.addItem("Car");
_local4.addItem("Bus");
_local4.addItem("Bike");
_local3.addItem("Cat");
_local3.addItem("Monkey");
_local3.addItem("Elephant");
_local2.setStyleProperty("popUpFade", 10);
_local4.setStyleProperty("popUpFade", 10);
_local3.setStyleProperty("popUpFade", 10);
_local2.setRowCount(5);
_local4.setRowCount(5);
_local3.setRowCount(5);
};
function dialogue(id) {
return(this.dialogueStore[id]);
}
validCodes = new Array("037600209571", "037600104029", "037600403221", "037600181716");
usedCodes = new Array(false, false, false, false);
fscommand ("allowscale", false);
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
_quality = "medium";
HTTP_HOST = _level0.http_host;
if (!HTTP_HOST.length) {
HTTP_HOST = "www.boysvsgirls.co.uk";
}
VID = _level0.vid;
if (!VID.length) {
VID = "madeupvid";
}
if (!_level0.xmlurl.length) {
_level0.xmlurl = "http://www.boysvsgirls.co.uk/dialogue.xml";
}
GAMEID = "stink";
SEED = VID.substr(VID.length - 1, 1);
RAD = (rad = (Math.PI/180));
initiateTrig();
SCREENX = 500;
SCREENY = 400;
SCREENX2 = SCREENX / 2;
SCREENY2 = SCREENY / 2;
CHEATMODE = false;
MOUSEDOWN = false;
FRAMECOUNTER = 0;
DOUBLECLICK = false;
MOUSEUPCOUNTER = 0;
GRAVITY = 0.9;
SO = SharedObject.getLocal(GAMEID);
UNLOCKEDLEVEL = SO.data.UNLOCKEDLEVEL;
if (UNLOCKEDLEVEL == undefined) {
UNLOCKEDLEVEL = 0;
}
cursor = _root.attachMovie("cursor", "cursor", 100);
cursorState = "select";
this.dialogueStore = {url:_level0.xmlurl, length:0};
this.myXML = new XML();
this.myXML.parent = this;
this.myXML.ignoreWhite = true;
this.myXML.onLoad = function (status) {
for (var _local4 in this.firstChild.childNodes) {
var _local2 = String(this.firstChild.childNodes[_local4].nodeName);
var _local3 = String(this.firstChild.childNodes[_local4].firstChild.nodeValue);
this.parent.dialogueStore[_local2] = _local3;
this.parent.dialogueStore.length++;
}
this.parent.panel = new Panel();
delete this.parent.myXML;
};
this.myXML.load(this.dialogueStore.url);
onEnterFrame = function () {
FRAMECOUNTER++;
panel.handle();
if (((((!cursorState.length) || (_xmouse < 0)) || (_xmouse > SCREENX)) || (_ymouse < 0)) || (_ymouse > SCREENY)) {
cursor._visible = false;
Mouse.show();
} else {
cursor._visible = true;
Mouse.hide();
cursor.gotoAndStop(cursorState);
if (cursorState.substr(-4, 4) == "Help") {
cursor.message = dialogue("prompt_" + cursorState);
}
}
};
onMouseMove = function () {
cursor._x = _xmouse;
cursor._y = _ymouse;
};
onMouseDown = function () {
MOUSEDOWN = true;
DOUBLECLICK = false;
if ((FRAMECOUNTER - MOUSEUPCOUNTER) < 3) {
DOUBLECLICK = true;
}
};
onMouseUp = function () {
MOUSEDOWN = false;
MOUSEUPCOUNTER = FRAMECOUNTER;
};
stop();
Symbol 3 MovieClip [FLabelSymbol] Frame 1
#initclip 3
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var _local2 = this.hostComponent.styleTable.embedFonts.value;
if (_local2 != undefined) {
this.labelField.embedFonts = _local2;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var _local2 = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
this.setColor(_local2);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 6 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 6 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 6 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 7 MovieClip [FUIComponentSymbol] Frame 1
#initclip 1
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local3 in this.styleFormat_prm) {
this.setStyleProperty(_local3, this.styleFormat_prm[_local3]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var _local2 in this.methodTable) {
this[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local4 = this.styleTable.focusRectInner.value;
var _local5 = this.styleTable.focusRectOuter.value;
if (_local4 == undefined) {
_local4 = 16777215 /* 0xFFFFFF */;
}
if (_local5 == undefined) {
_local5 = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, _local5);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, _local4);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var _local17 = parseInt(value);
if (!isNaN(_local17)) {
value = _local17;
}
var _local16 = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!_local16)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var _local18 = propName.subString(4, propName.length);
this.textStyle[_local18] = value;
this.invalidate("setSize");
} else {
for (var _local15 in this.styleTable[propName].coloredMCs) {
var _local4 = new Color(this.styleTable[propName].coloredMCs[_local15]);
if (this.styleTable[propName].value == undefined) {
var _local5 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local4.setTransform(_local5);
} else {
_local4.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = _local16;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var _local4 = new Color(skinMCRef);
_local4.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var _local3 in arguments[0]) {
this[_local3] = arguments[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local3 = 0;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
this.listeners[arguments[_local3]] = _local4;
for (var _local5 in this) {
if (this.isAStyle(_local5)) {
_local4.updateStyleProperty(this, _local5.toString());
}
}
_local3++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
if (component.styleTable[_local4].useGlobal == this.isGlobal) {
component.styleTable[_local4].useGlobal = true;
var _local3 = (this.isGlobal ? undefined : (globalStyleFormat[_local4]));
component.setStyleProperty(_local4, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local6 = 0;
for (var _local5 in this.listeners) {
var _local3 = this.listeners[_local5];
if (arguments.length > 0) {
var _local4 = 0;
while (_local4 < arguments.length) {
if (this.isAStyle(arguments[_local4])) {
_local3.updateStyleProperty(this, arguments[_local4]);
}
_local4++;
}
} else {
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
_local3.updateStyleProperty(this, _local4.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 20 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 30 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 39 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 40 MovieClip [UpArrow] Frame 1
stop();
Symbol 40 MovieClip [UpArrow] Frame 2
stop();
Symbol 40 MovieClip [UpArrow] Frame 3
stop();
Symbol 47 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 54 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 59 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 60 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 68 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 76 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 84 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 85 MovieClip [DownArrow] Frame 1
stop();
Symbol 85 MovieClip [DownArrow] Frame 2
stop();
Symbol 85 MovieClip [DownArrow] Frame 3
stop();
Symbol 88 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 89 MovieClip [FScrollBarSymbol] Frame 1
#initclip 5
FScrollBarClass = function () {
if (this._height == 4) {
return(undefined);
}
this.init();
this.minPos = (this.maxPos = (this.pageSize = (this.largeScroll = 0)));
this.smallScroll = 1;
this.width = (this.horizontal ? (this._width) : (this._height));
this._xscale = (this._yscale = 100);
this.setScrollPosition(0);
this.tabEnabled = false;
if (this._targetInstanceName.length > 0) {
this.setScrollTarget(this._parent[this._targetInstanceName]);
}
this.tabChildren = false;
this.setSize(this.width);
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
if (this.horizontal && (!flag)) {
this._xscale = 100;
this._rotation = 0;
} else if (flag && (!this.horizontal)) {
this._xscale = -100;
this._rotation = -90;
}
this.horizontal = flag;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
if (!this.enable) {
return(undefined);
}
this.pageSize = pSize;
this.minPos = Math.max(mnPos, 0);
this.maxPos = Math.max(mxPos, 0);
this.scrollPosition = Math.max(this.minPos, this.scrollPosition);
this.scrollPosition = Math.min(this.maxPos, this.scrollPosition);
if ((this.maxPos - this.minPos) <= 0) {
this.scrollThumb_mc.removeMovieClip();
this.upArrow_mc.gotoAndStop(3);
this.downArrow_mc.gotoAndStop(3);
this.downArrow_mc.onPress = (this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = null));
this.upArrow_mc.onPress = (this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = null));
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onRelease = null);
this.scrollTrack_mc.onDragOut = (this.scrollTrack_mc.onRollOut = null);
this.scrollTrack_mc.useHandCursor = false;
} else {
var _local2 = this.getScrollPosition();
this.upArrow_mc.gotoAndStop(1);
this.downArrow_mc.gotoAndStop(1);
this.upArrow_mc.onPress = (this.upArrow_mc.onDragOver = this.startUpScroller);
this.upArrow_mc.onRelease = (this.upArrow_mc.onDragOut = this.stopScrolling);
this.downArrow_mc.onPress = (this.downArrow_mc.onDragOver = this.startDownScroller);
this.downArrow_mc.onRelease = (this.downArrow_mc.onDragOut = this.stopScrolling);
this.scrollTrack_mc.onPress = (this.scrollTrack_mc.onDragOver = this.startTrackScroller);
this.scrollTrack_mc.onRelease = this.stopScrolling;
this.scrollTrack_mc.onDragOut = this.stopScrolling;
this.scrollTrack_mc.onRollOut = this.stopScrolling;
this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = (this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb);
this.scrollThumb_mc.useHandCursor = false;
this.thumbHeight = (this.pageSize / ((this.maxPos - this.minPos) + this.pageSize)) * this.trackSize;
this.thumbMid_mc = this.scrollThumb_mc.mc_sliderMid;
this.thumbTop_mc = this.scrollThumb_mc.mc_sliderTop;
this.thumbBot_mc = this.scrollThumb_mc.mc_sliderBot;
this.thumbHeight = Math.max(this.thumbHeight, 6);
this.midHeight = (this.thumbHeight - this.thumbTop_mc._height) - this.thumbBot_mc._height;
this.thumbMid_mc._yScale = (this.midHeight * 100) / this.thumbMid_mc._height;
this.thumbMid_mc._y = this.thumbTop_mc._height;
this.thumbBot_mc._y = this.thumbTop_mc._height + this.midHeight;
this.scrollTop = this.scrollThumb_mc._y;
this.trackHeight = this.trackSize - this.thumbHeight;
this.scrollBot = this.trackHeight + this.scrollTop;
_local2 = Math.min(_local2, this.maxPos);
this.setScrollPosition(Math.max(_local2, this.minPos));
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
this.scrollPosition = pos;
if (this.scrollThumb_mc != undefined) {
pos = Math.min(pos, this.maxPos);
pos = Math.max(pos, this.minPos);
}
this.scrollThumb_mc._y = (((pos - this.minPos) * this.trackHeight) / (this.maxPos - this.minPos)) + this.scrollTop;
this.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var _local3 = this.enable;
if (enabledFlag && (!_local3)) {
this.enable = enabledFlag;
if (this.textField != undefined) {
this.setScrollTarget(this.textField);
} else {
this.setScrollProperties(this.pageSize, this.cachedMinPos, this.cachedMaxPos);
this.setScrollPosition(this.cachedPos);
}
this.clickFilter = undefined;
} else if ((!enabledFlag) && (_local3)) {
this.textField.removeListener(this);
this.cachedPos = this.getScrollPosition();
this.cachedMinPos = this.minPos;
this.cachedMaxPos = this.maxPos;
if (this.clickFilter == undefined) {
this.setScrollProperties(this.pageSize, 0, 0);
} else {
this.clickFilter = true;
}
this.enable = enabledFlag;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
if (this._height == 1) {
return(undefined);
}
this.width = hgt;
this.scrollTrack_mc._yscale = 100;
this.scrollTrack_mc._yscale = (100 * this.width) / this.scrollTrack_mc._height;
if (this.upArrow_mc == undefined) {
this.attachMovie("UpArrow", "upArrow_mc", 1);
this.attachMovie("DownArrow", "downArrow_mc", 2);
this.downArrow_mc.controller = (this.upArrow_mc.controller = this);
this.upArrow_mc.useHandCursor = (this.downArrow_mc.useHandCursor = false);
this.upArrow_mc._x = (this.upArrow_mc._y = 0);
this.downArrow_mc._x = 0;
}
this.scrollTrack_mc.controller = this;
this.downArrow_mc._y = this.width - this.downArrow_mc._height;
this.trackSize = this.width - (2 * this.downArrow_mc._height);
if (this.textField != undefined) {
this.onTextChanged();
} else {
this.setScrollProperties(this.pageSize, this.minPos, this.maxPos);
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var _local3 = this.smallScroll;
if (inc != "one") {
_local3 = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var _local2 = this.getScrollPosition() + (mode * _local3);
if (_local2 > this.maxPos) {
_local2 = this.maxPos;
} else if (_local2 < this.minPos) {
_local2 = this.minPos;
}
this.setScrollPosition(_local2);
};
FScrollBarClass.prototype.startDragThumb = function () {
this.lastY = this._ymouse;
this.onMouseMove = this.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
this.scrollMove = this._ymouse - this.lastY;
this.scrollMove = this.scrollMove + this._y;
if (this.scrollMove < this.controller.scrollTop) {
this.scrollMove = this.controller.scrollTop;
} else if (this.scrollMove > this.controller.scrollBot) {
this.scrollMove = this.controller.scrollBot;
}
this._y = this.scrollMove;
var _local2 = this.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (this._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.minPos;
this.controller.isScrolling = true;
updateAfterEvent();
this.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
this.controller.trackScroller();
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
clearInterval(this.scrolling);
if (inc == "page") {
this.trackScroller();
} else {
this.scrollIt(inc, mode);
}
this.scrolling = setInterval(this, "scrollInterval", 35, inc, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
if ((this.scrollThumb_mc._y + this.thumbHeight) < this._ymouse) {
this.scrollIt("page", 1);
} else if (this.scrollThumb_mc._y > this._ymouse) {
this.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
this.controller.downArrow_mc.gotoAndStop(1);
this.controller.upArrow_mc.gotoAndStop(1);
clearInterval(this.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", -1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
this.controller.downArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one", 1);
this.controller.scrolling = setInterval(this.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
if (tF == undefined) {
this.textField.removeListener(this);
delete this.textField[(this.horizontal ? "hScroller" : "vScroller")];
if ((this.textField.hScroller != undefined) && (this.textField.vScroller != undefined)) {
this.textField.unwatch("text");
this.textField.unwatch("htmltext");
}
}
this.textField = undefined;
if (!(tF instanceof TextField)) {
return(undefined);
}
this.textField = tF;
this.textField[(this.horizontal ? "hScroller" : "vScroller")] = this;
this.onTextChanged();
this.onChanged = function () {
this.onTextChanged();
};
this.onScroller = function () {
if (!this.isScrolling) {
if (!this.horizontal) {
this.setScrollPosition(this.textField.scroll);
} else {
this.setScrollPosition(this.textField.hscroll);
}
}
};
this.textField.addListener(this);
this.textField.watch("text", this.callback);
this.textField.watch("htmlText", this.callback);
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
clearInterval(this.hScroller.synchScroll);
clearInterval(this.vScroller.synchScroll);
this.hScroller.synchScroll = setInterval(this.hScroller, "onTextChanged", 50);
this.vScroller.synchScroll = setInterval(this.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
if ((!this.enable) || (this.textField == undefined)) {
return(undefined);
}
clearInterval(this.synchScroll);
if (this.horizontal) {
var _local3 = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxhscroll));
} else {
var _local3 = this.textField.scroll;
var _local2 = this.textField.bottomScroll - this.textField.scroll;
this.setScrollProperties(_local2, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(_local3, this.textField.maxscroll));
}
};
FScrollBarClass.prototype.executeCallBack = function () {
if (this.textField == undefined) {
super.executeCallBack();
} else if (this.horizontal) {
this.textField.hscroll = this.getScrollPosition();
} else {
this.textField.scroll = this.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 90 MovieClip [DataProviderSymbol] Frame 1
#initclip 2
_global.DataProviderClass = function () {
this.init();
};
DataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
};
DataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var _local2 = {event:"updateAll"};
viewRef.modelChanged(_local2);
};
DataProviderClass.prototype.addItemAt = function (index, value) {
if (index < this.getLength()) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
} else {
this.items[index].label = value;
}
this.items[index].__ID__ = this.uniqueID++;
var _local4 = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(_local4);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var _local4 = this.items[index];
this.items.splice(index, 1);
var _local3 = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(_local3);
return(_local4);
};
DataProviderClass.prototype.removeAll = function () {
this.items = new Array();
this.updateViews({event:"deleteRows", firstRow:0, lastRow:this.getLength() - 1});
};
DataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if ((index < 0) || (index >= this.getLength())) {
return(undefined);
}
var _local4 = this.getItemID(index);
if (typeof(itemObj) == "object") {
this.items[index] = itemObj;
} else {
this.items[index].label = itemObj;
}
this.items[index].__ID__ = _local4;
this.updateViews({event:"updateRows", firstRow:index, lastRow:index});
};
DataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
DataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
DataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
DataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({event:"sort"});
};
DataProviderClass.prototype.updateViews = function (eventObj) {
var _local2 = 0;
while (_local2 < this.views.length) {
this.views[_local2].modelChanged(eventObj);
_local2++;
}
};
#endinitclip
Symbol 91 MovieClip [FSelectableItemSymbol] Frame 1
#initclip 7
function FSelectableItemClass() {
this.init();
}
FSelectableItemClass.prototype = new FUIComponentClass();
FSelectableItemClass.prototype.init = function () {
if (this._name != "itemAsset") {
this.highlighted = false;
this.layoutContent(100);
}
};
FSelectableItemClass.prototype.drawItem = function (itmObj, selected) {
this.displayContent(itmObj, selected);
if ((this.highlighted != selected) || ((this.controller.focused != this.oldFocus) && (selected))) {
this.setHighlighted(selected);
}
this.oldFocus = this.controller.focused;
};
FSelectableItemClass.prototype.setSize = function (width, height) {
var _local2 = -16384;
this.width = width;
this.layoutContent(width);
this.attachMovie("FHighlightSymbol", "highlight_mc", _local2);
this.highlight_mc._x = 0.5;
this.highlight_mc._width = width - 0.5;
this.highlight_mc._height = height;
this.highlight_mc.controller = this;
this.highlight_mc._alpha = 0;
this.highlight_mc.trackAsMenu = true;
this.highlight_mc.onPress = function () {
if (this.controller.enable) {
this.controller.controller.clickHandler(this.controller.itemNum);
}
};
this.highlight_mc.onDragOver = function () {
if (this.controller.controller.focused) {
this.onPress();
}
};
this.highlight_mc.useHandCursor = false;
this.highlight_mc.trackAsMenu = true;
};
FSelectableItemClass.prototype.setEnabled = function (enabledFlag) {
this.enable = enabledFlag;
this.fLabel_mc.setEnabled(enabledFlag);
this.highlight_mc.gotoAndStop((enabledFlag ? "unfocused" : "disabled"));
};
FSelectableItemClass.prototype.layoutContent = function (width) {
this.attachMovie("FLabelSymbol", "fLabel_mc", 2, {hostComponent:this.controller});
this.fLabel_mc._x = 2;
this.fLabel_mc._y = 0;
this.fLabel_mc.setSize(width - 2);
this.fLabel_mc.labelField.selectable = false;
};
FSelectableItemClass.prototype.displayContent = function (itmObj, selected) {
var _local2 = "";
if (itmObj.label != undefined) {
_local2 = itmObj.label;
} else if (typeof(itmObj) == "object") {
for (var _local4 in itmObj) {
if (_local4 != "__ID__") {
_local2 = (itmObj[_local4] + ", ") + _local2;
}
}
_local2 = _local2.substring(0, _local2.length - 2);
} else {
_local2 = itmObj;
}
if (this.fLabel_mc.labelField.text != _local2) {
this.fLabel_mc.setLabel(_local2);
}
var _local5 = (selected ? (this.controller.styleTable.textSelected.value) : (this.controller.styleTable.textColor.value));
if (_local5 == undefined) {
_local5 = (selected ? 16777215 : 0);
}
this.fLabel_mc.setColor(_local5);
};
FSelectableItemClass.prototype.getItemIndex = function () {
return(this.controller.getScrollPosition() + this.itemNum);
};
FSelectableItemClass.prototype.getItemModel = function () {
return(this.controller.getItemAt(this.getItemIndex()));
};
FSelectableItemClass.prototype.getHostDataProvider = function () {
return(this.controller.dataProvider);
};
FSelectableItemClass.prototype.setHighlighted = function (flag) {
fade = this.controller.styleTable.fadeRate.value;
if (((fade == undefined) || (fade == 0)) || (!flag)) {
this.highlight_mc._alpha = (flag ? 100 : 0);
delete this.onEnterFrame;
} else {
this.fadeN = fade;
this.fadeX = 1;
this.highLight_mc._alpha = 20;
this.onEnterFrame = function () {
this.highLight_mc._alpha = (60 * Math.sqrt((this.fadeX++) / this.fadeN)) + 40;
if (this.fadeX > this.fadeN) {
delete this.onEnterFrame;
}
};
}
this.highlighted = flag;
};
#endinitclip
Symbol 92 MovieClip [FSelectableListSymbol] Frame 1
#initclip 4
function FSelectableListClass() {
this.init();
}
FSelectableListClass.prototype = new FUIComponentClass();
FSelectableListClass.prototype.init = function () {
super.init();
this.enable = true;
this.selected = new Array();
this.topDisplayed = (this.numDisplayed = 0);
this.lastSelected = 0;
this.tabChildren = false;
if (this._name != undefined) {
this.dataProvider = new DataProviderClass();
this.dataProvider.addView(this);
}
};
FSelectableListClass.prototype.addItemAt = function (index, label, data) {
if ((index < 0) || (!this.enable)) {
return(undefined);
}
this.dataProvider.addItemAt(index, {label:label, data:data});
};
FSelectableListClass.prototype.addItem = function (label, data) {
if (!this.enable) {
return(undefined);
}
this.dataProvider.addItem({label:label, data:data});
};
FSelectableListClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndex();
var _local2 = this.getItemAt(index);
this.dataProvider.removeItemAt(index);
return(_local2);
};
FSelectableListClass.prototype.removeAll = function () {
this.dataProvider.removeAll();
};
FSelectableListClass.prototype.replaceItemAt = function (index, newLabel, newData) {
this.dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
};
FSelectableListClass.prototype.sortItemsBy = function (fieldName, order) {
this.lastSelID = this.dataProvider.getItemID(this.lastSelected);
this.dataProvider.sortItemsBy(fieldName, order);
};
FSelectableListClass.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
FSelectableListClass.prototype.getSelectedIndex = function () {
for (var _local3 in this.selected) {
var _local2 = this.selected[_local3].sIndex;
if (_local2 != undefined) {
return(_local2);
}
}
};
FSelectableListClass.prototype.getSelectedItem = function () {
return(this.getItemAt(this.getSelectedIndex()));
};
FSelectableListClass.prototype.getItemAt = function (index) {
return(this.dataProvider.getItemAt(index));
};
FSelectableListClass.prototype.getEnabled = function () {
return(this.enable);
};
FSelectableListClass.prototype.getValue = function () {
var _local2 = this.getSelectedItem();
return(((_local2.data == undefined) ? (_local2.label) : (_local2.data)));
};
FSelectableListClass.prototype.setSelectedIndex = function (index, flag) {
if (((index >= 0) && (index < this.getLength())) && (this.enable)) {
this.clearSelected();
this.selectItem(index, true);
this.lastSelected = index;
this.invalidate("updateControl");
if (flag != false) {
this.executeCallBack();
}
}
};
FSelectableListClass.prototype.setDataProvider = function (obj) {
this.setScrollPosition(0);
this.clearSelected();
if (obj instanceof Array) {
this.dataProvider = new DataProviderClass();
var _local2 = 0;
while (_local2 < obj.length) {
var _local4 = ((typeof(obj[_local2]) == "string") ? ({label:obj[_local2]}) : (obj[_local2]));
this.dataProvider.addItem(_local4);
_local2++;
}
} else {
this.dataProvider = obj;
}
this.dataProvider.addView(this);
};
FSelectableListClass.prototype.setItemSymbol = function (linkID) {
this.tmpPos = this.getScrollPosition();
this.itemSymbol = linkID;
this.invalidate("setSize");
this.setScrollPosition(this.tmpPos);
};
FSelectableListClass.prototype.setEnabled = function (enabledFlag) {
this.cleanUI();
super.setEnabled(enabledFlag);
this.enable = enabledFlag;
this.boundingBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
var _local4 = Math.min(this.numDisplayed, this.getLength());
var _local3 = 0;
while (_local3 < _local4) {
this.container_mc[("fListItem" + _local3) + "_mc"].setEnabled(this.enable);
_local3++;
}
if (this.enable) {
this.invalidate("updateControl");
}
};
FSelectableListClass.prototype.updateControl = function () {
var _local2 = 0;
while (_local2 < this.numDisplayed) {
this.container_mc[("fListItem" + _local2) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + _local2), this.isSelected(this.topDisplayed + _local2));
_local2++;
}
};
FSelectableListClass.prototype.setSize = function (w, h) {
super.setSize(w, h);
this.boundingBox_mc._xscale = (this.boundingBox_mc._yscale = 100);
this.boundingBox_mc._xscale = (this.width * 100) / this.boundingBox_mc._width;
this.boundingBox_mc._yscale = (this.height * 100) / this.boundingBox_mc._height;
var _local3 = 0;
while (_local3 < this.numDisplayed) {
this.container_mc.attachMovie(this.itemSymbol, ("fListItem" + _local3) + "_mc", 10 + _local3, {controller:this, itemNum:_local3});
var _local4 = this.container_mc[("fListItem" + _local3) + "_mc"];
var _local5 = ((this.scrollOffset == undefined) ? 0 : (this.scrollOffset));
_local4.setSize(this.width - _local5, this.itmHgt);
_local4._y = (this.itmHgt - 2) * _local3;
_local3++;
}
this.updateControl();
};
FSelectableListClass.prototype.modelChanged = function (eventObj) {
var _local4 = eventObj.firstRow;
var _local6 = eventObj.lastRow;
var _local8 = eventObj.event;
if (_local8 == "addRows") {
for (var _local2 in this.selected) {
if ((this.selected[_local2].sIndex != undefined) && (this.selected[_local2].sIndex >= _local4)) {
this.selected[_local2].sIndex = this.selected[_local2].sIndex + ((_local6 - _local4) + 1);
this.setSelectedIndex(this.selected[_local2].sIndex, false);
}
}
} else if (_local8 == "deleteRows") {
if (_local4 == _local6) {
var _local5 = _local4;
if (this.selectHolder == _local5) {
this.selectionDeleted = true;
}
if (((this.topDisplayed + this.numDisplayed) >= this.getLength()) && (this.topDisplayed > 0)) {
this.topDisplayed--;
if (this.selectionDeleted && ((_local5 - 1) >= 0)) {
this.setSelectedIndex(_local5 - 1, false);
}
} else if (this.selectionDeleted) {
var _local7 = this.getLength();
if (((_local5 == (_local7 - 1)) && (_local7 > 1)) || (_local5 > (_local7 / 2))) {
this.setSelectedIndex(_local5 - 1, false);
} else {
this.setSelectedIndex(_local5, false);
}
}
for (var _local2 in this.selected) {
if (this.selected[_local2].sIndex > _local4) {
this.selected[_local2].sIndex--;
}
}
} else {
this.clearSelected();
this.topDisplayed = 0;
}
} else if (_local8 == "sort") {
var _local7 = this.getLength();
var _local2 = 0;
while (_local2 < _local7) {
if (this.isSelected(_local2)) {
var _local3 = this.dataProvider.getItemID(_local2);
if (_local3 == this.lastSelID) {
this.lastSelected = _local2;
}
this.selected[String(_local3)].sIndex = _local2;
}
_local2++;
}
}
this.invalidate("updateControl");
};
FSelectableListClass.prototype.measureItmHgt = function () {
this.attachMovie(this.itemSymbol, "tmpItem_mc", 0, {controller:this});
this.tmpItem_mc.drawItem({label:"Sizer: PjtTopg"}, false);
this.itmHgt = this.tmpItem_mc._height;
this.tmpItem_mc.removeMovieClip();
};
FSelectableListClass.prototype.selectItem = function (index, selectedFlag) {
if (selectedFlag && (!this.isSelected(index))) {
this.selected[String(this.dataProvider.getItemID(index))] = {sIndex:index};
} else if (!selectedFlag) {
delete this.selected[String(this.dataProvider.getItemID(index))];
}
};
FSelectableListClass.prototype.isSelected = function (index) {
return(this.selected[String(this.dataProvider.getItemID(index))].sIndex != undefined);
};
FSelectableListClass.prototype.clearSelected = function () {
for (var _local3 in this.selected) {
var _local2 = this.selected[_local3].sIndex;
if (((_local2 != undefined) && (this.topDisplayed <= _local2)) && (_local2 < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (_local2 - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(_local2), false);
}
}
delete this.selected;
this.selected = new Array();
};
FSelectableListClass.prototype.selectionHandler = function (itemNum) {
var _local2 = this.topDisplayed + itemNum;
if (this.getItemAt(_local2 == undefined)) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
this.clearSelected();
this.selectItem(_local2, true);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(_local2), this.isSelected(_local2));
};
FSelectableListClass.prototype.moveSelBy = function (incr) {
var _local3 = this.getSelectedIndex();
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(this.getLength() - 1, _local2);
if (_local2 == _local3) {
return(undefined);
}
if ((_local3 < this.topDisplayed) || (_local3 >= (this.topDisplayed + this.numDisplayed))) {
this.setScrollPosition(_local3);
}
if ((_local2 >= (this.topDisplayed + this.numDisplayed)) || (_local2 < this.topDisplayed)) {
this.setScrollPosition(this.topDisplayed + incr);
}
this.selectionHandler(_local2 - this.topDisplayed);
};
FSelectableListClass.prototype.clickHandler = function (itmNum) {
this.focusRect.removeMovieClip();
if (!this.focused) {
this.pressFocus();
}
this.selectionHandler(itmNum);
this.onMouseUp = this.releaseHandler;
};
FSelectableListClass.prototype.releaseHandler = function () {
if (this.changeFlag) {
this.executeCallBack();
}
this.changeFlag = false;
this.onMouseUp = undefined;
};
FSelectableListClass.prototype.myOnSetFocus = function () {
super.myOnSetFocus();
var _local3 = 0;
while (_local3 < this.numDisplayed) {
this.container_mc[("fListItem" + _local3) + "_mc"].highlight_mc.gotoAndStop("enabled");
_local3++;
}
};
FSelectableListClass.prototype.myOnKillFocus = function () {
super.myOnKillFocus();
var _local3 = 0;
while (_local3 < this.numDisplayed) {
this.container_mc[("fListItem" + _local3) + "_mc"].highlight_mc.gotoAndStop("unfocused");
_local3++;
}
};
#endinitclip
Instance of Symbol 90 MovieClip [DataProviderSymbol] "dPAsset" in Symbol 92 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (construct) {
}
Instance of Symbol 91 MovieClip [FSelectableItemSymbol] "ItemAsset" in Symbol 92 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 93 MovieClip [FScrollSelectListSymbol] Frame 1
#initclip 6
function FScrollSelectListClass() {
this.init();
}
FScrollSelectListClass.prototype = new FSelectableListClass();
FScrollSelectListClass.prototype.getScrollPosition = function () {
return(this.topDisplayed);
};
FScrollSelectListClass.prototype.setScrollPosition = function (pos) {
if (this.enable) {
pos = Math.min(pos, this.getLength() - this.numDisplayed);
pos = Math.max(pos, 0);
this.scrollBar_mc.setScrollPosition(pos);
}
};
FScrollSelectListClass.prototype.setAutoHideScrollBar = function (flag) {
this.permaScrollBar = !flag;
this.setSize(this.width, this.height);
};
FScrollSelectListClass.prototype.setEnabled = function (enabledFlag) {
super.setEnabled(enabledFlag);
this.scrollBar_mc.setEnabled(this.enable);
};
FScrollSelectListClass.prototype.setSize = function (w, h) {
var _local3 = this.getScrollPosition();
super.setSize(w, h);
if (this.scrollBar_mc != undefined) {
this.removed = true;
}
this.scrollBar_mc = undefined;
this.initScrollBar();
this.setScrollPosition(_local3);
};
FScrollSelectListClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
this.invalidate("initScrollBar");
};
FScrollSelectListClass.prototype.initScrollBar = function () {
if ((!this.permaScrollBar) && (this.getLength() <= this.numDisplayed)) {
if (this.removed) {
this.scrollBar_mc.removeMovieClip();
this.scrollBar_mc = undefined;
this.scrollOffset = undefined;
this.invalidate("setSize");
}
} else {
if (this.scrollBar_mc == undefined) {
this.container_mc.attachMovie("FScrollBarSymbol", "scrollBar_mc", 3000, {hostStyle:this.styleTable});
this.scrollBar_mc = this.container_mc.scrollBar_mc;
this.scrollBar_mc.setChangeHandler("scrollHandler", this);
this.scrollBar_mc.setSize(this.height);
this.scrollBar_mc._x = this.width - this.scrollBar_mc._width;
this.scrollBar_mc._y = 0;
this.scrollBar_mc.setLargeScroll(this.numDisplayed - 1);
this.scrollOffset = this.scrollBar_mc._width;
this.invalidate("setSize");
}
this.scrollBar_mc.setScrollProperties(this.numDisplayed, 0, this.getLength() - this.numDisplayed);
}
};
FScrollSelectListClass.prototype.scrollHandler = function (scrollBar) {
var _local2 = scrollBar.getScrollPosition();
this.topDisplayed = _local2;
if (this.lastPosition != _local2) {
this.updateControl();
}
this.lastPosition = _local2;
};
FScrollSelectListClass.prototype.clickHandler = function (itmNum) {
super.clickHandler(itmNum);
if ((this.dragScrolling == undefined) && (this.scrollBar_mc != undefined)) {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.releaseHandler = function () {
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
super.releaseHandler();
};
FScrollSelectListClass.prototype.dragScroll = function () {
clearInterval(this.dragScrolling);
if (this.container_mc._ymouse < 0) {
this.setScrollPosition(this.getScrollPosition() - 1);
this.selectionHandler(0);
this.scrollInterval = Math.max(25, (-23.8 * (-this.container_mc._ymouse)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else if (this.container_mc._ymouse > ((this.itmHgt - 2) * this.numDisplayed)) {
this.setScrollPosition(this.getScrollPosition() + 1);
this.selectionHandler(this.numDisplayed - 1);
this.scrollInterval = Math.max(25, (-23.8 * Math.abs((this.container_mc._ymouse - ((this.itmHgt - 2) * this.numDisplayed)) - 2)) + 500);
this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
} else {
this.dragScrolling = setInterval(this, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.myOnKeyDown = function () {
if (this.focused) {
this.keyCodes = new Array(40, 38, 34, 33, 36, 35);
this.keyIncrs = new Array(1, -1, this.numDisplayed - 1, -(this.numDisplayed - 1), -this.getLength(), this.getLength());
var _local2 = 0;
while (_local2 < this.keyCodes.length) {
if (Key.isDown(this.keyCodes[_local2])) {
this.moveSelBy(this.keyIncrs[_local2]);
return(undefined);
}
_local2++;
}
this.findInputText();
}
};
FScrollSelectListClass.prototype.findInputText = function () {
var _local2 = Key.getAscii();
if ((_local2 >= 33) && (_local2 <= 126)) {
this.findString(String.fromCharCode(_local2));
}
};
FScrollSelectListClass.prototype.findString = function (str) {
if (this.getLength() == 0) {
return(undefined);
}
var _local4 = this.getSelectedIndex();
var _local6 = 0;
var _local2 = _local4 + 1;
while (_local2 != _local4) {
var _local3 = this.getItemAt(_local2).label.substring(0, str.length);
if ((str == _local3) || (str.toUpperCase() == _local3.toUpperCase())) {
_local6 = _local2 - _local4;
break;
}
if (_local2 >= (this.getLength() - 1)) {
_local2 = -1;
}
_local2++;
}
if (_local6 != 0) {
this.moveSelBy(_local6);
}
};
#endinitclip
Instance of Symbol 89 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 93 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (construct) {
_targetInstanceName = "";
horizontal = false;
}
onClipEvent (load) {
this._width = (this._height = 1);
}
Instance of Symbol 92 MovieClip [FSelectableListSymbol] "superClassAsset" in Symbol 93 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 94 MovieClip [FComboBoxItemSymbol] Frame 1
#initclip 9
function FComboBoxItemClass() {
this.init();
}
FComboBoxItemClass.prototype = new FSelectableItemClass();
Object.registerClass("FComboBoxItemSymbol", FComboBoxItemClass);
FComboBoxItemClass.prototype.setSize = function (w, h) {
super.setSize(w, h);
this.highlight_mc.onRollOver = function () {
this.controller.controller.selectionHandler(this.controller.itemNum);
};
};
#endinitclip
Symbol 98 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 98 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 101 MovieClip [FComboBoxSymbol] Frame 1
#initclip 8
function FComboBoxClass() {
_global._popUpLevel = ((_global._popUpLevel == undefined) ? 20000 : (_global._popUpLevel + 1));
this.superHolder = _root.createEmptyMovieClip("superHolder" + _popUpLevel, _popUpLevel);
var _local5 = this.superHolder.createEmptyMovieClip("testCont", 20000);
var _local6 = _local5.attachMovie("FBoundingBoxSymbol", "boundingBox_mc", 0);
if (_local6._name == undefined) {
this.superHolder.removeMovieClip();
this.superHolder = this._parent.createEmptyMovieClip("superHolder" + _popUpLevel, _popUpLevel);
} else {
_local5.removeMovieClip();
}
if (this.rowCount == undefined) {
this.rowCount = 8;
this.editable = false;
}
this.itemSymbol = "FComboBoxItemSymbol";
this.init();
this.permaScrollBar = false;
this.proxyBox_mc.gotoAndStop(1);
this.width = this._width;
this.height = (this.proxyBox_mc._height * this._yscale) / 100;
var _local4 = 0;
while (_local4 < this.labels.length) {
this.addItem(this.labels[_local4], this.data[_local4]);
_local4++;
}
this.lastSelected = 0;
this.selectItem(0);
this._xscale = (this._yscale = 100);
this.opened = false;
this.setSize(this.width);
this.highlightTop(false);
if (this.changeHandler.length > 0) {
this.setChangeHandler(this.changeHandler);
}
this.onUnload = function () {
this.superHolder.removeMovieClip();
};
this.setSelectedIndex(0, false);
this.value = "";
this.focusEnabled = true;
this.changeFlag = false;
}
FComboBoxClass.prototype = new FScrollSelectListClass();
Object.registerClass("FComboBoxSymbol", FComboBoxClass);
FComboBoxClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
var _local3 = eventObj.event;
if ((_local3 == "addRows") || (_local3 == "deleteRows")) {
var _local6 = (eventObj.lastRow - eventObj.firstRow) + 1;
var _local7 = ((_local3 == "addRows") ? 1 : -1);
var _local4 = this.getLength();
var _local8 = _local4 - (_local7 * _local6);
if ((this.rowCount > _local8) || (this.rowCount > _local4)) {
this.invalidate("setSize");
}
if (this.getSelectedIndex() == undefined) {
this.setSelectedIndex(0, false);
}
} else if (_local3 == "updateAll") {
this.invalidate("setSize");
}
};
FComboBoxClass.prototype.removeAll = function () {
if (!this.enable) {
return(undefined);
}
super.removeAll();
if (this.editable) {
this.value = "";
}
this.invalidate("setSize");
};
FComboBoxClass.prototype.setSize = function (w) {
if ((((w == undefined) || (typeof(w) != "number")) || (w <= 0)) || (!this.enable)) {
return(undefined);
}
this.proxyBox_mc._width = w;
this.container_mc.removeMovieClip();
this.measureItmHgt();
this.container_mc = this.superHolder.createEmptyMovieClip("container", 3);
this.container_mc.tabChildren = false;
this.setPopUpLocation(this.container_mc);
this.container_mc.attachMovie("FBoundingBoxSymbol", "boundingBox_mc", 0);
this.boundingBox_mc = this.container_mc.boundingBox_mc;
this.boundingBox_mc.component = this;
this.registerSkinElement(this.boundingBox_mc.boundingBox, "background");
this.proxyBox_mc._height = this.itmHgt;
this.numDisplayed = Math.min(this.rowCount, this.getLength());
if (this.numDisplayed < 3) {
this.numDisplayed = Math.min(3, this.getLength());
}
this.height = (this.numDisplayed * (this.itmHgt - 2)) + 2;
super.setSize(w, this.height);
this.attachMovie("DownArrow", "downArrow", 10);
this.downArrow._y = 0;
this.downArrow._width = this.itmHgt;
this.downArrow._height = this.itmHgt;
this.downArrow._x = this.proxyBox_mc._width - this.downArrow._width;
this.setEditable(this.editable);
this.container_mc._visible = this.opened;
this.highlightTop(false);
this.fader = this.superHolder.attachMovie("FBoundingBoxSymbol", "faderX", 4);
this.registerSkinElement(this.fader.boundingBox, "background");
this.fader._width = this.width;
this.fader._height = this.height;
this.fader._visible = false;
};
FComboBoxClass.prototype.setDataProvider = function (dp) {
super.setDataProvider(dp);
this.invalidate("setSize");
this.setSelectedIndex(0);
};
FComboBoxClass.prototype.getValue = function () {
if (this.editable) {
return(this.fLabel_mc.getLabel());
}
return(super.getValue());
};
FComboBoxClass.prototype.getRowCount = function () {
return(this.rowCount);
};
FComboBoxClass.prototype.setRowCount = function (count) {
this.rowCount = ((this.getLength() > count) ? (Math.max(count, 3)) : (count));
this.setSize(this.width);
var _local2 = this.getLength();
if ((_local2 - this.getScrollPosition()) < this.rowCount) {
this.setScrollPosition(_local2 - Math.min(this.rowCount, _local2));
this.invalidate("updateControl");
}
};
FComboBoxClass.prototype.setEditable = function (editableFlag) {
if (!this.enable) {
return(undefined);
}
this.editable = editableFlag;
if (!this.editable) {
this.onPress = this.pressHandler;
this.useHandCursor = false;
this.trackAsMenu = true;
this.attachMovie("FComboBoxItemSymbol", "fLabel_mc", 5, {controller:this, itemNum:-1});
this.fLabel_mc.onRollOver = undefined;
this.fLabel_mc.setSize((this.width - this.itmHgt) + 1, this.itmHgt);
this.topLabel = this.getSelectedItem();
this.fLabel_mc.drawItem(this.topLabel, false);
this.highlightTop(false);
} else {
this.attachMovie("FLabelSymbol", "fLabel_mc", 5);
this.fLabel_txt = this.fLabel_mc.labelField;
this.fLabel_txt.type = "input";
this.fLabel_txt._x = 4;
this.fLabel_txt.onSetFocus = this.onLabelFocus;
this.fLabel_mc.setSize((this.width - this.itmHgt) - 3);
delete this.onPress;
this.fLabel_txt.onKillFocus = function () {
this._parent._parent.myOnKillFocus();
};
this.fLabel_mc.setLabel(this.value);
this.fLabel_txt.onChanged = function () {
this._parent._parent.findInputText();
};
this.downArrow.onPress = this.buttonPressHandler;
this.downArrow.useHandCursor = false;
this.downArrow.trackAsMenu = true;
}
};
FComboBoxClass.prototype.setEnabled = function (enabledFlag) {
enabledFlag = (((enabledFlag == undefined) || (typeof(enabledFlag) != "boolean")) ? true : (enabledFlag));
super.setEnabled(enabledFlag);
this.registerSkinElement(this.boundingBox_mc.boundingBox, "background");
this.proxyBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
this.downArrow.gotoAndStop((this.enable ? 1 : 3));
if (this.editable) {
this.fLabel_txt.type = (enabledFlag ? "input" : "dynamic");
this.fLabel_txt.selectable = enabledFlag;
} else if (enabledFlag) {
this.fLabel_mc.drawItem(this.topLabel, false);
this.setSelectedIndex(this.getSelectedIndex(), false);
}
this.fLabel_mc.setEnabled(this.enable);
this.fLabel_txt.onSetFocus = (enabledFlag ? (this.onLabelFocus) : undefined);
};
FComboBoxClass.prototype.setSelectedIndex = function (index, flag) {
super.setSelectedIndex(index, flag);
if (!this.editable) {
this.topLabel = this.getSelectedItem();
this.fLabel_mc.drawItem(this.topLabel, false);
} else {
this.value = ((flag != undefined) ? "" : (this.getSelectedItem().label));
this.fLabel_mc.setLabel(this.value);
}
this.invalidate("updateControl");
};
FComboBoxClass.prototype.setValue = function (value) {
if (this.editable) {
this.fLabel_mc.setLabel(value);
this.value = value;
}
};
FComboBoxClass.prototype.pressHandler = function () {
this.focusRect.removeMovieClip();
if (this.enable) {
if (!this.opened) {
this.onMouseUp = this.releaseHandler;
} else {
this.onMouseUp = undefined;
}
this.changeFlag = false;
if (!this.focused) {
this.pressFocus();
this.clickFilter = (this.editable ? false : true);
}
if (!this.clickFilter) {
this.openOrClose(!this.opened);
} else {
this.clickFilter = false;
}
}
};
FComboBoxClass.prototype.clickHandler = function (itmNum) {
if (!this.focused) {
if (this.editable) {
this.fLabel_txt.onKillFocus = undefined;
}
this.pressFocus();
}
super.clickHandler(itmNum);
this.selectionHandler(itmNum);
this.onMouseUp = this.releaseHandler;
};
FComboBoxClass.prototype.highlightTop = function (flag) {
if (!this.editable) {
this.fLabel_mc.drawItem(this.topLabel, flag);
}
};
FComboBoxClass.prototype.myOnSetFocus = function () {
super.myOnSetFocus();
this.fLabel_mc.highlight_mc.gotoAndStop("enabled");
this.highlightTop(true);
};
FComboBoxClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this._height + 4);
};
FComboBoxClass.prototype.myOnKillFocus = function () {
if (Selection.getFocus().indexOf("labelField") != -1) {
return(undefined);
}
super.myOnKillFocus();
delete this.fLabel_txt.onKeyDown;
this.openOrClose(false);
this.highlightTop(false);
};
FComboBoxClass.prototype.setPopUpLocation = function (mcRef) {
mcRef._x = this._x;
var _local2 = {x:this._x, y:this._y + this.proxyBox_mc._height};
this._parent.localToGlobal(_local2);
mcRef._parent.globalToLocal(_local2);
mcRef._x = _local2.x;
mcRef._y = _local2.y;
if ((this.height + mcRef._y) >= Stage.height) {
this.upward = true;
mcRef._y = (_local2.y - this.height) - this.proxyBox_mc._height;
} else {
this.upward = false;
}
};
FComboBoxClass.prototype.openOrClose = function (flag) {
if (this.getLength() == 0) {
return(undefined);
}
this.setPopUpLocation(this.container_mc);
if ((this.lastSelected != -1) && ((this.lastSelected < this.topDisplayed) || (this.lastSelected > (this.topDisplayed + this.numDisplayed)))) {
super.moveSelBy(this.lastSelected - this.getSelectedIndex());
}
if (!flag) {
(this.downArrow.gotoAndStop(1));// not popped
} else {
(this.downArrow.gotoAndStop(2));// not popped
}
if (flag == this.opened) {
return(undefined);
}
this.highlightTop(!flag);
this.fadeRate = this.styleTable.popUpFade.value;
if (((!flag) || (this.fadeRate == undefined)) || (this.fadeRate == 0)) {
this.opened = (this.container_mc._visible = flag);
return(undefined);
}
this.setPopUpLocation(this.fader);
this.time = 0;
this.const = 85 / Math.sqrt(this.fadeRate);
this.fader._alpha = 85;
this.container_mc._visible = (this.fader._visible = true);
this.onEnterFrame = function () {
this.fader._alpha = 100 - ((this.const * Math.sqrt(++this.time)) + 15);
if (this.time >= this.fadeRate) {
this.fader._visible = false;
delete this.onEnterFrame;
this.opened = true;
}
};
};
FComboBoxClass.prototype.fireChange = function () {
this.lastSelected = this.getSelectedIndex();
if (!this.editable) {
this.topLabel = this.getSelectedItem();
this.fLabel_mc.drawItem(this.topLabel, true);
} else {
this.value = this.getSelectedItem().label;
this.fLabel_mc.setLabel(this.value);
}
this.executeCallback();
};
FComboBoxClass.prototype.releaseHandler = function () {
var _local3 = this.boundingBox_mc.hitTest(_root._xmouse, _root._ymouse);
if (this.changeFlag) {
if (_local3) {
this.fireChange();
}
this.openOrClose(!this.opened);
} else if (_local3) {
this.openOrClose(false);
} else {
this.onMouseDown = function () {
if ((!this.boundingBox_mc.hitTest(_root._xmouse, _root._ymouse)) && (!this.hitTest(_root._xmouse, _root._ymouse))) {
this.onMouseDown = undefined;
this.openOrClose(false);
}
};
}
this.changeFlag = false;
this.onMouseUp = undefined;
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
};
FComboBoxClass.prototype.moveSelBy = function (itemNum) {
if (itemNum != 0) {
super.moveSelBy(itemNum);
if (this.editable) {
this.setValue(this.getSelectedItem().label);
}
if (!this.opened) {
if (this.changeFlag && (!this.isSelected(this.lastSelected))) {
this.fireChange();
}
}
}
};
FComboBoxClass.prototype.myOnKeyDown = function () {
if (!this.focused) {
return(undefined);
}
if (this.editable && (Key.isDown(13))) {
this.setValue(this.fLabel_mc.getLabel());
this.executeCallback();
this.openOrClose(false);
} else if ((Key.isDown(13) || (Key.isDown(32) && (!this.editable))) && (this.opened)) {
if (this.getSelectedIndex() != this.lastSelected) {
this.fireChange();
}
this.openOrClose(false);
this.fLabel_txt.hscroll = 0;
}
super.myOnKeyDown();
};
FComboBoxClass.prototype.findInputText = function () {
if (!this.editable) {
super.findInputText();
}
};
FComboBoxClass.prototype.onLabelFocus = function () {
this._parent._parent.tabFocused = false;
this._parent._parent.focused = true;
this.onKeyDown = function () {
this._parent._parent.myOnKeyDown();
};
Key.addListener(this);
};
FComboBoxClass.prototype.buttonPressHandler = function () {
this._parent.pressHandler();
};
#endinitclip
this.deadPreview._visible = false;
Instance of Symbol 93 MovieClip [FScrollSelectListSymbol] "superClassAsset" in Symbol 101 MovieClip [FComboBoxSymbol] Frame 1
//component parameters
onClipEvent (construct) {
}
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
stop();
Symbol 204 MovieClip [soundFX] Frame 1
stop();
Symbol 204 MovieClip [soundFX] Frame 10
play();
Symbol 204 MovieClip [soundFX] Frame 19
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 20
play();
Symbol 204 MovieClip [soundFX] Frame 29
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 35
play();
Symbol 204 MovieClip [soundFX] Frame 44
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 45
play();
Symbol 204 MovieClip [soundFX] Frame 54
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 55
play();
Symbol 204 MovieClip [soundFX] Frame 64
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 65
play();
Symbol 204 MovieClip [soundFX] Frame 74
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 75
play();
Symbol 204 MovieClip [soundFX] Frame 84
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 85
play();
Symbol 204 MovieClip [soundFX] Frame 94
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 95
play();
Symbol 204 MovieClip [soundFX] Frame 104
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 105
play();
Symbol 204 MovieClip [soundFX] Frame 114
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 115
play();
Symbol 204 MovieClip [soundFX] Frame 124
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 125
play();
Symbol 204 MovieClip [soundFX] Frame 134
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 135
play();
Symbol 204 MovieClip [soundFX] Frame 144
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 145
play();
Symbol 204 MovieClip [soundFX] Frame 154
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 155
play();
Symbol 204 MovieClip [soundFX] Frame 164
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 165
play();
Symbol 204 MovieClip [soundFX] Frame 174
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 175
play();
Symbol 204 MovieClip [soundFX] Frame 184
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 185
play();
Symbol 204 MovieClip [soundFX] Frame 194
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 195
play();
Symbol 204 MovieClip [soundFX] Frame 204
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 205
play();
Symbol 204 MovieClip [soundFX] Frame 214
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 215
play();
Symbol 204 MovieClip [soundFX] Frame 224
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 225
play();
Symbol 204 MovieClip [soundFX] Frame 234
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 235
play();
Symbol 204 MovieClip [soundFX] Frame 244
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 245
play();
Symbol 204 MovieClip [soundFX] Frame 254
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 255
play();
Symbol 204 MovieClip [soundFX] Frame 264
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 265
play();
Symbol 204 MovieClip [soundFX] Frame 274
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 275
play();
Symbol 204 MovieClip [soundFX] Frame 284
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 285
play();
Symbol 204 MovieClip [soundFX] Frame 294
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 295
play();
Symbol 204 MovieClip [soundFX] Frame 304
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 305
play();
Symbol 204 MovieClip [soundFX] Frame 314
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 315
play();
Symbol 204 MovieClip [soundFX] Frame 324
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 325
play();
Symbol 204 MovieClip [soundFX] Frame 334
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 335
play();
Symbol 204 MovieClip [soundFX] Frame 344
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 345
play();
Symbol 204 MovieClip [soundFX] Frame 353
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 354
play();
Symbol 204 MovieClip [soundFX] Frame 363
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 364
play();
Symbol 204 MovieClip [soundFX] Frame 373
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 374
play();
Symbol 204 MovieClip [soundFX] Frame 383
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 384
play();
Symbol 204 MovieClip [soundFX] Frame 393
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 394
play();
Symbol 204 MovieClip [soundFX] Frame 403
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 404
play();
Symbol 204 MovieClip [soundFX] Frame 413
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 414
play();
Symbol 204 MovieClip [soundFX] Frame 423
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 424
play();
Symbol 204 MovieClip [soundFX] Frame 433
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 434
play();
Symbol 204 MovieClip [soundFX] Frame 443
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 444
play();
Symbol 204 MovieClip [soundFX] Frame 453
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 454
play();
Symbol 204 MovieClip [soundFX] Frame 463
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 464
play();
Symbol 204 MovieClip [soundFX] Frame 473
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 474
play();
Symbol 204 MovieClip [soundFX] Frame 483
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 484
play();
Symbol 204 MovieClip [soundFX] Frame 493
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 494
play();
Symbol 204 MovieClip [soundFX] Frame 503
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 504
play();
Symbol 204 MovieClip [soundFX] Frame 513
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 514
play();
Symbol 204 MovieClip [soundFX] Frame 523
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 524
play();
Symbol 204 MovieClip [soundFX] Frame 533
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 534
play();
Symbol 204 MovieClip [soundFX] Frame 543
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 544
play();
Symbol 204 MovieClip [soundFX] Frame 553
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 554
play();
Symbol 204 MovieClip [soundFX] Frame 563
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 564
play();
Symbol 204 MovieClip [soundFX] Frame 573
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 574
play();
Symbol 204 MovieClip [soundFX] Frame 583
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 584
play();
Symbol 204 MovieClip [soundFX] Frame 593
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 594
play();
Symbol 204 MovieClip [soundFX] Frame 603
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 604
play();
Symbol 204 MovieClip [soundFX] Frame 613
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 614
play();
Symbol 204 MovieClip [soundFX] Frame 623
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 624
play();
Symbol 204 MovieClip [soundFX] Frame 633
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 634
play();
Symbol 204 MovieClip [soundFX] Frame 643
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 644
play();
Symbol 204 MovieClip [soundFX] Frame 653
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 654
play();
Symbol 204 MovieClip [soundFX] Frame 663
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 664
play();
Symbol 204 MovieClip [soundFX] Frame 673
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 674
play();
Symbol 204 MovieClip [soundFX] Frame 683
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 684
play();
Symbol 204 MovieClip [soundFX] Frame 693
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 694
play();
Symbol 204 MovieClip [soundFX] Frame 703
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 704
play();
Symbol 204 MovieClip [soundFX] Frame 713
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 714
play();
Symbol 204 MovieClip [soundFX] Frame 723
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 724
play();
Symbol 204 MovieClip [soundFX] Frame 733
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 734
play();
Symbol 204 MovieClip [soundFX] Frame 743
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 744
play();
Symbol 204 MovieClip [soundFX] Frame 753
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 754
play();
Symbol 204 MovieClip [soundFX] Frame 763
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 764
play();
Symbol 204 MovieClip [soundFX] Frame 773
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 774
play();
Symbol 204 MovieClip [soundFX] Frame 783
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 784
play();
Symbol 204 MovieClip [soundFX] Frame 793
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 794
play();
Symbol 204 MovieClip [soundFX] Frame 803
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 804
play();
Symbol 204 MovieClip [soundFX] Frame 813
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 814
play();
Symbol 204 MovieClip [soundFX] Frame 823
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 824
play();
Symbol 204 MovieClip [soundFX] Frame 833
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 834
play();
Symbol 204 MovieClip [soundFX] Frame 843
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 844
play();
Symbol 204 MovieClip [soundFX] Frame 853
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 854
play();
Symbol 204 MovieClip [soundFX] Frame 863
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 864
play();
Symbol 204 MovieClip [soundFX] Frame 873
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 874
play();
Symbol 204 MovieClip [soundFX] Frame 883
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 884
play();
Symbol 204 MovieClip [soundFX] Frame 893
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 894
play();
Symbol 204 MovieClip [soundFX] Frame 903
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 904
play();
Symbol 204 MovieClip [soundFX] Frame 913
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 914
play();
Symbol 204 MovieClip [soundFX] Frame 923
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 924
play();
Symbol 204 MovieClip [soundFX] Frame 933
gotoAndStop (1);
Symbol 204 MovieClip [soundFX] Frame 934
play();
Symbol 204 MovieClip [soundFX] Frame 943
gotoAndStop (1);
Symbol 237 MovieClip [spit] Frame 21
this.removeMovieClip();
Symbol 280 MovieClip [explosion] Frame 11
stop();
this.removeMovieClip();
Symbol 288 MovieClip [pointer] Frame 19
stop();
Symbol 315 MovieClip [blood] Frame 20
this.removeMovieClip();
Symbol 371 MovieClip Frame 1
stop();
Symbol 438 MovieClip [cursor] Frame 1
stop();
Symbol 454 MovieClip Frame 11
stop();
Symbol 466 Button
on (release, keyPress "h") {
_parent.parent.pressInstructions();
}
Symbol 469 Button
on (release, keyPress "u") {
_parent.parent.pressUnlock();
}
Symbol 472 Button
on (release, keyPress "h") {
_parent.parent.pressScores();
}
Symbol 476 Button
on (release, keyPress "<Space>") {
parent.pressPlay("good");
}
on (rollOver) {
this.parent.sfx.play("whoosh" + (random(3) + 1));
if (parent.activeTeam != "good") {
this.parent.sfx.play("energy_good_" + (random(2) + 1));
}
parent.activeTeam = "good";
}
on (rollOut) {
parent.activeTeam = "";
}
Symbol 477 Button
on (release, keyPress "e") {
parent.pressPlay("evil");
}
on (rollOver) {
this.parent.sfx.play("whoosh" + (random(3) + 1));
if (parent.activeTeam != "evil") {
this.parent.sfx.play("energy_evil_" + (random(2) + 1));
}
parent.activeTeam = "evil";
}
on (rollOut) {
parent.activeTeam = "";
}
Symbol 479 MovieClip Frame 10
stop();
Symbol 484 MovieClip Frame 1
stop();
Symbol 491 Button
on (release, keyPress "<Right>") {
parent.pressNext();
}
Symbol 497 MovieClip Frame 10
stop();
Symbol 501 Button
on (release, keyPress "<Left>") {
parent.pressPrevious();
}
Symbol 505 Button
on (release, keyPress "g") {
_parent.parent.pressPlay("good");
}
Symbol 508 MovieClip Frame 1
message = _root.dialogue("int_button_playGood");
Symbol 509 Button
on (release, keyPress "<Space>") {
_parent.parent.pressPlay("evil");
}
Symbol 512 MovieClip Frame 1
message = _root.dialogue("int_button_playEvil");
Symbol 515 MovieClip Frame 1
function doCombo() {
trace("local");
}
Instance of Symbol 101 MovieClip [FComboBoxSymbol] "Q" in Symbol 515 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 8;
changeHandler = "";
}
Instance of Symbol 101 MovieClip [FComboBoxSymbol] "W" in Symbol 515 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 8;
changeHandler = "";
}
Instance of Symbol 101 MovieClip [FComboBoxSymbol] "X" in Symbol 515 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
editable = false;
rowCount = 8;
changeHandler = "";
}
Symbol 518 Button
on (release) {
getURL ("http://www.toxicmag.co.uk", "new");
}
Symbol 519 Button
on (release) {
parent.pressContinue();
}
Symbol 523 Button
on (release) {
getURL ("http://www.gogirlmag.co.uk", "new");
}
Symbol 526 Button
on (release, keyPress "<Space>") {
_parent._parent.parent.movieEnd();
}
Symbol 570 MovieClip Frame 81
gotoAndStop (1);
Symbol 600 MovieClip [intro_good] Frame 6
function myfunction() {
gotoAndPlay (7);
clearInterval(interval);
}
messageUp.message.message = "Your magazine pile is under attack!";
stop();
interval = setInterval(this, "myfunction", 4000);
Symbol 600 MovieClip [intro_good] Frame 86
function myfunction() {
gotoAndPlay (87);
clearInterval(interval);
}
messageUp.message.message = "Fire at the girls to keep them away!";
stop();
interval = setInterval(this, "myfunction", 4000);
Symbol 600 MovieClip [intro_good] Frame 197
messageUp.message.message = "Now it's your turn";
Instance of Symbol 570 MovieClip "messageUp" in Symbol 600 MovieClip [intro_good] Frame 197
/* no clip actions */
Symbol 600 MovieClip [intro_good] Frame 231
_parent._parent.parent.movieEnd();
stop();
Symbol 634 MovieClip [intro_evil] Frame 6
function myfunction() {
gotoAndPlay (7);
clearInterval(interval);
}
messageUp.message.message = "Your magazine pile is under attack!";
stop();
interval = setInterval(this, "myfunction", 4000);
Symbol 634 MovieClip [intro_evil] Frame 86
function myfunction() {
gotoAndPlay (87);
clearInterval(interval);
}
messageUp.message.message = "Fire at the boys to keep them away!";
stop();
interval = setInterval(this, "myfunction", 4000);
Symbol 634 MovieClip [intro_evil] Frame 197
messageUp.message.message = "Now it's your turn";
Instance of Symbol 570 MovieClip "messageUp" in Symbol 634 MovieClip [intro_evil] Frame 197
/* no clip actions */
Symbol 634 MovieClip [intro_evil] Frame 240
_parent._parent.parent.movieEnd();
stop();
Symbol 635 MovieClip Frame 1
stop();
Symbol 636 MovieClip [panel] Frame 1
button_instructions.message = _root.dialogue("int_button_instructions");
button_scores.message = _root.dialogue("int_button_scores");
button_unlock.message = _root.dialogue("int_button_unlock");
splash.overlay.teamnameGood = _root.dialogue("int_teamnameGood");
splash.overlay.teamnameEvil = _root.dialogue("int_teamnameEvil");
splash.selectteam.message = _root.dialogue("int_selectteam");
Symbol 636 MovieClip [panel] Frame 10
title = _root.dialogue("int_title_instructions1");
instructions = _root.dialogue("int_prompt_instructions1");
Symbol 636 MovieClip [panel] Frame 11
title = _root.dialogue("int_title_instructions2");
instructions = _root.dialogue("int_prompt_instructions2");
Symbol 636 MovieClip [panel] Frame 12
title = _root.dialogue("int_title_instructions3");
instructions = _root.dialogue("int_prompt_instructions3");
Symbol 636 MovieClip [panel] Frame 13
title = _root.dialogue("int_title_instructions4");
instructions = _root.dialogue("int_prompt_instructions4");
Symbol 636 MovieClip [panel] Frame 14
title = _root.dialogue("int_title_instructions5");
instructions = _root.dialogue("int_prompt_instructions5");
Symbol 636 MovieClip [panel] Frame 15
title = _root.dialogue("int_title_instructions6");
instructions = _root.dialogue("int_prompt_instructions6");
Symbol 636 MovieClip [panel] Frame 19
title = _root.dialogue("int_title_unlock");
instructions = _root.dialogue("int_prompt_unlock");
Symbol 636 MovieClip [panel] Frame 22
title = _root.dialogue("int_title_gameover");
instructions = _root.dialogue("int_prompt_gameover");
Symbol 636 MovieClip [panel] Frame 27
title = _root.dialogue("int_title_gameover");
instructions = _root.dialogue("int_prompt_gameover");
Symbol 636 MovieClip [panel] Frame 32
movie.gotoAndStop(parent.movieName);
movie.movie.play();
movie.button_skip.message = _root.dialogue("int_button_skip");
Symbol 639 MovieClip [flash] Frame 20
stop();
Symbol 639 MovieClip [flash] Frame 70
stop();
Symbol 644 MovieClip [scoreUp] Frame 41
this.removeMovieClip();