Frame 1
stop();
Instance of Symbol 691 MovieClip in Frame 1
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent = percent - ((percent - ((loading / total) * 100)) * 0.25);
per = int(percent);
percentage = per + "%";
_parent.loadbar._width = per * 6;
if (percent > 99) {
_parent.gotoAndPlay(2);
}
}
Frame 3
_global.score = 0;
_global.lives = 3;
_global.quality = "MEDIUM";
_global.difficulty = 1;
_global.version = "version 1.3 release";
i = 0;
while (i < 16) {
removeMovieClip("vam" + i);
i++;
}
i = 1;
while (i < 3) {
vampire_mc.duplicateMovieClip("vam" + i, i);
i++;
}
stop();
Instance of Symbol 682 MovieClip [vampireclip] "vampire_mc" in Frame 3
onClipEvent (load) {
this._x = random(600);
this.rtarget = random(600);
if (this._x >= this.rtarget) {
this.attachMovie("vampire_run_right", "vampire", 0);
this.sprite = 1;
} else {
this.attachMovie("vampire_run_left", "vampire", 0);
this.sprite = 2;
}
this._width = 58;
this._height = 73.5;
this._y = 293;
this.speed = 1 + random(4);
this.hit = false;
this.health = 100;
this.respawn = getTimer();
}
onClipEvent (enterFrame) {
if (getTimer() < this.respawn) {
if (Math.abs(this.rtarget - this._x) < 50) {
if (this.sprite != 0) {
this.attachMovie("vampire_attack", "vampire" + this.level, this.level);
this.sprite = 0;
}
if (this.rtarget > this._x) {
this._x = this._x + random(6);
} else {
this._x = this._x - random(6);
}
} else if (this.rtarget > this._x) {
if (this.sprite != 1) {
this.attachMovie("vampire_run_right", "vampire" + this.level, this.level);
this.sprite = 1;
}
this._x = this._x + this.speed;
} else if (this.rtarget < this._x) {
if (this.sprite != 2) {
this.attachMovie("vampire_run_left", "vampire" + this.level, this.level);
this.sprite = 2;
}
this._x = this._x - this.speed;
}
} else {
temp = random(600);
if ((temp > (this._x + 50)) && (temp < (this._x + 50))) {
temp = random(600);
}
this.rtarget = temp;
this.speed = 1 + random(4);
this.respawn = (getTimer() + 2500) + random(1000);
}
}
Frame 4
quality = function (component) {
if (cmbquality.getValue() == "low") {
_global.quality = "LOW";
} else if (cmbquality.getValue() == "medium") {
_global.quality = "MEDIUM";
} else if (cmbquality.getValue() == "high") {
_global.quality = "HIGH";
}
this._quality = _global.quality;
};
difficulty = function (component) {
if (cmbdifficulty.getValue() == "easy") {
_global.difficulty = 1;
} else if (cmbdifficulty.getValue() == "normal") {
_global.difficulty = 2;
} else if (cmbdifficulty.getValue() == "hard") {
_global.difficulty = 3;
}
};
stop();
Instance of Symbol 681 MovieClip [FComboBoxSymbol] "cmbdifficulty" in Frame 4
//component parameters
onClipEvent (initialize) {
editable = false;
labels = [];
labels[0] = "easy";
labels[1] = "normal";
labels[2] = "hard";
rowCount = 8;
changeHandler = "";
}
Frame 5
stop();
Frame 6
if (_framesloaded >= _totalframes) {
play();
} else {
ld.text = Math.round((getBytesLoaded() / getBytesTotal()) * 100) + "%";
gotoAndPlay (6);
}
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 6
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Frame 7
_root.talkbubble(25, 275, 2500, "finally, i get to have a vacation.", "talk_face_player", 200);
Frame 166
_root.talkbubble(170, 200, 2500, "are we there yet?", "talk_face_player", 201);
Frame 235
_root.talkbubble(250, 75, 2500, "we're about 30 minutes away from the airport.", "talk_face_heli", 202);
Frame 505
_root.talkbubble(350, 190, 2500, "at last i'll get some peace and quiet.", "talk_face_player", 202);
Frame 790
_root.talkbubble(100, 190, 2500, "MOTHER OF GOD!", "talk_face_player", 201);
Frame 795
_root.talkbubble(150, 225, 2500, "AHHHHH!!!! FUXOR!!!!111", "talk_face_heli", 202);
Frame 935
_root.talkbubble(350, 25, 2500, "make sure he doesn't survive.", "talk_face_bossdark", 202);
Frame 1106
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
lives.text = "LIVES LEFT: " + _global.lives;
stop();
Instance of Symbol 837 MovieClip "fader" in Frame 1106
onClipEvent (enterFrame) {
if ((this._alpha > 0) && (getTimer() > this.fadetimer)) {
this._alpha = this._alpha - 1;
_root.lives._alpha = _root.lives._alpha - 1;
this.fadetimer = getTimer() + 10;
} else {
_root.play();
}
}
Frame 1107
gotonextscene = function () {
gotoAndPlay (1117);
};
gotomainmenu = function () {
gotoAndStop (3);
};
function keyTrap() {
if (player.canmove) {
if (Key.isDown(39)) {
if (this._x < 600) {
this._x = this._x + player.speed;
}
} else if (Key.isDown(37)) {
if (this._x > 0) {
this._x = this._x - player.speed;
}
}
if (Key.isDown(38)) {
}
if (Key.isDown(17)) {
ammodisp = player.ammo;
if (player.ammo >= 1) {
if (player.bulletcount < 8) {
if (getTimer() > this.time) {
if (player.canfire) {
shotsfired++;
player.ammo--;
z = 0;
while (z <= MAXBULLETS) {
if (bullets[z] == 0) {
player.bulletcount++;
bullets[z] = 1;
bulletid = new Object();
bulletid.id = z;
if ((player.sprite % 2) == 0) {
player_mc.attachMovie("gunflash_left", "gf" + z, 200);
} else {
player_mc.attachMovie("gunflash_right", "gf" + z, 200);
}
bullet_mc.duplicateMovieClip("bullet" + player.bulletcount, player.bulletcount, bulletid);
setProperty("bullet" + player.bulletcount, _visible , true);
this.time = getTimer() + 200;
break;
}
z++;
}
}
}
} else {
player.canfire = false;
player.bulletcount = 0;
if (player.sprite == 5) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_right", "player", 0);
player.sprite = 9;
}
if (player.sprite == 6) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_left", "player", 0);
player.sprite = 10;
}
if (player.sprite == 7) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_right", "player", 0);
player.sprite = 11;
}
if (player.sprite == 8) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_left", "player", 0);
player.sprite = 12;
}
}
}
}
if (Key.isDown(32)) {
grenadedisp = player.grenades;
if (((player.grenades >= 1) && (getTimer() > this.gtime)) && (player.canfire)) {
if (player.grenadecount < MAXGRENADES) {
if (grenades[player.grenadecount++] == 0) {
shotsfired++;
player.grenades--;
grenades[player.grenadecount] = 1;
grenadeid = new Object();
grenadeid.id = player.grenadecount;
grenade_mc.duplicateMovieClip("grenade" + player.grenadecount, player.grenadecount, grenadeid);
this.gtime = getTimer() + 250;
}
} else {
player.grenadecount = 0;
}
}
}
}
}
MAXENEMIES = 1;
MAXBULLETS = 8;
MAXGRENADES = 8;
ENDTIMER = getTimer() + 100000;
KILLS = 0;
LEVELEND = false;
bubblenotify = false;
bubbleammonotify = false;
bubblehealthnotify = false;
gameover = false;
kills = 0;
hits = 0;
shotsfired = 0;
accuracy = 0;
player = new Object();
health = 100;
player.ammo = 96;
player.grenades = 4;
player._x = 300;
player._y = 299;
player._width = 43.8;
player._height = 63;
player.speed = 5;
player.sprite = 1;
player.canfire = true;
player.canmove = true;
player.reloadframe = 0;
player.bulletcount = 0;
player.grenadecount = 0;
player.apogee = 150;
player.jumpready = false;
player.doublejump = false;
player.velo = 6;
player.xvelo = 4;
bullet_mc._visible = false;
bullets = new Array(16);
enemies = new Array(16);
grenades = new Array(16);
z = 0;
while (z <= 16) {
bullets[z] = 0;
enemies[z] = 0;
grenades[z] = 0;
z++;
}
ammodisp = player.ammo;
grenadedisp = player.grenades;
player_mc.attachMovie("player_stand", "player", 0);
setProperty(player_mc, _x , player._x);
setProperty(player_mc, _y , player._y);
setProperty(player_mc, _width , player._width);
setProperty(player_mc, _height , player._height);
keyWatch = new Object();
keyWatch.onKeyDown = function () {
if (player.canmove) {
if (Key.getCode() == 39) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 13) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_right", "player", 0, mdata);
player.sprite = 13;
}
} else if (player.sprite != 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_right", "player", 0);
player.sprite = 1;
}
}
if (Key.getCode() == 37) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 14) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_left", "player", 0);
player_mc.gotoAndPlay(20);
player.sprite = 14;
}
} else if (player.sprite != 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_left", "player", 0);
player.sprite = 2;
}
}
if (Key.getCode() == 17) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_right", "player", 0);
player.sprite = 5;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_left", "player", 0);
player.sprite = 6;
}
}
if (Key.getCode() == 32) {
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_right", "player", 0);
player.sprite = 15;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_left", "player", 0);
player.sprite = 16;
}
}
if (Key.getCode() == 38) {
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_right", "player", 0);
player.sprite = 13;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_left", "player", 0);
player.sprite = 14;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
}
}
};
keyWatch.onKeyUp = function () {
if (player.canmove) {
if ((Key.getCode() == 39) || (Key.getCode() == 37)) {
if (!Key.isDown(39)) {
if (!Key.isDown(37)) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
}
if (Key.getCode() == 17) {
player.canfire = true;
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
if (Key.getCode() == 38) {
if (!player.doublejump) {
player.doublejump = true;
player.jumpready = true;
}
}
if (Key.getCode() == 32) {
player.canfire = true;
if (((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) || (player.sprite == 15)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) || (player.sprite == 16)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
};
Key.addListener(keyWatch);
player.reloaded = function () {
player.canfire = true;
if (player.sprite == 9) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 10) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
if (player.sprite == 11) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 12) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
};
player_mc.onEnterFrame = keyTrap;
enemydead = function (num) {
if (!_root.LEVELEND) {
numEnemy--;
makeenemy();
}
};
makeenemy = function () {
z = 0;
while (z <= MAXENEMIES) {
if (enemies[z] == 0) {
position = new Object();
if (random(10) < 5) {
position._x = -50;
} else {
position._x = 650;
}
vampire_mc.duplicateMovieClip("vampire" + z, z + 100, position);
_root["vampire" + z].id = z;
enemies[z] = 1;
numEnemy++;
return;
}
z++;
}
};
endLevel = function () {
_root.player.canmove = false;
_root.LEVELEND = true;
_root.truck.active = true;
};
nextLevel = function () {
gotoAndPlay (1108);
};
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
poweruphealth = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_health.duplicateMovieClip("h" + layer, layer, pos);
};
powerupammo = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_ammo.duplicateMovieClip("a" + layer, layer, pos);
};
powerupgrenade = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_grenade.duplicateMovieClip("g" + layer, layer, pos);
};
playerdied = function () {
trace("died - " + _global.lives);
if (_global.lives > 1) {
z = 0;
while (z <= 16) {
removeMovieClip("vampire" + z);
z++;
}
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
_global.lives--;
gotoAndPlay (1106);
} else {
_root.player.canmove = false;
_root.LEVELEND = true;
this.gameover = true;
gotoAndStop (1108);
}
};
stop();
Instance of Symbol 669 MovieClip [player] "player_mc" in Frame 1107
onClipEvent (enterFrame) {
if ((_root.health <= 0) && (getTimer() > _root.player.deadtime)) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player.canmove = false;
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
_root.fader._alpha++;
if (_root.player_mc._alpha <= 0) {
_root.playerdied();
_root.ENDTIMER = getTimer();
_root.player_mc.removeMovieClip();
}
}
if (getTimer() >= _root.ENDTIMER) {
if (!this.endcalled) {
if ((_root.player.sprite % 2) == 1) {
_root.player_mc.attachMovie("player_jump_right", "player", 0);
_root.player.sprite = 13;
}
if ((_root.player.sprite % 2) == 0) {
_root.player_mc.attachMovie("player_jump_left", "player", 0);
_root.player.sprite = 14;
}
_root.player.jumpready = true;
_root.endLevel();
this.endcalled = true;
}
if (_root.truck.inplace && (!_root.truck.out)) {
if (_root.player.landed) {
_root.player.landed = false;
if (_root.player_mc._x < _root.truck._x) {
_root.player_mc.attachMovie("player_run_right", "player", 0);
} else {
_root.player_mc.attachMovie("player_run_left", "player", 0);
}
}
if (_root.player_mc._x < _root.truck._x) {
_root.player_mc._x = _root.player_mc._x + 2;
} else {
_root.player_mc._x = _root.player_mc._x - 2;
}
if (((_root.player_mc._x > (_root.truck._x - 10)) && (_root.player_mc._x < (_root.truck._x + 10))) && (_root.player_mc._y >= _root.player._y)) {
_root.player.landed = true;
_root.truck.out = true;
this._x = 650;
}
}
} else {
timeleft = _root.ENDTIMER - getTimer();
_root.timer = timeleft;
if (!beginnotify) {
_root.talkbubble(200, 125, 5000, "hi, i'm the chief. i'll help you to get fimilar with the controls.", "talk_face_chief", 200);
beginnotify = true;
}
if ((timeleft <= 94500) && (!tr1)) {
_root.talkbubble(375, 25, 5000, "let's start with movement. use the arrow keys to move left and right.", "talk_face_chief", 200);
tr1 = true;
}
if ((timeleft <= 89000) && (!tr2)) {
_root.talkbubble(375, 25, 5000, "press the up key to jump.", "talk_face_chief", 200);
tr2 = true;
}
if ((timeleft <= 84500) && (!tr3)) {
_root.talkbubble(375, 25, 5000, "press the control key to use your firearm.", "talk_face_chief", 200);
tr3 = true;
}
if ((timeleft <= 79000) && (!tr4)) {
_root.talkbubble(375, 25, 5000, "you can also use grenades. press the space bar to throw one.", "talk_face_chief", 200);
tr4 = true;
}
if ((timeleft <= 74500) && (!tr5)) {
_root.talkbubble(5, 25, 5000, "the numbers above display your health, ammo, and grenades.", "talk_face_chief", 200);
tr5 = true;
}
if ((timeleft <= 69000) && (!tr6)) {
_root.talkbubble(375, 25, 5000, "collect power ups to improve your health, ammo, or grenade levels.", "talk_face_chief", 200);
_root.poweruphealth(400, 320, 51);
_root.powerupammo(440, 320, 52);
_root.powerupgrenade(480, 320, 53);
tr6 = true;
}
if ((timeleft <= 64500) && (!tr7)) {
_root.talkbubble(200, 125, 3000, "we're sending a truck to get you. until then be careful.", "talk_face_chief", 200);
tr7 = true;
}
if ((timeleft <= 60000) && (!wave1)) {
wave1 = true;
_root.MAXENEMIES++;
_root.makeenemy();
}
if ((timeleft <= 59000) && (!tr8)) {
_root.talkbubble(200, 125, 3000, "um chief, i may be smoking crack, but i see a vampire here...", "talk_face_player", 200);
tr8 = true;
}
if ((timeleft <= 55500) && (!tr9)) {
_root.talkbubble(200, 125, 3000, "vampire?! don't take any chances. shoot to kill.", "talk_face_chief", 200);
tr9 = true;
} else if ((timeleft <= 50000) && (!wave2)) {
_root.talkbubble(200, 125, 5000, "just hold on. the truck is on its way.", "talk_face_chief", 200);
wave2 = true;
_root.MAXENEMIES++;
_root.makeenemy();
} else if ((timeleft <= 20000) && (!wave3)) {
_root.talkbubble(200, 125, 5000, "we're getting close! just hold on for a little bit longer!", "talk_face_pilot", 200);
wave3 = true;
_root.makeenemy();
}
}
if (_root.health < 25) {
if (_root.bubblehealthnotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: health is low!", "talk_face_alert", 203);
_root.bubblehealthnotify = true;
}
if (getTimer() > healthnotify) {
_root.healthd._visible = false;
healthnotify = getTimer() + 500;
} else {
_root.healthd._visible = true;
}
}
if (((_root.player.sprite == 13) || (_root.player.sprite == 14)) || (_root.player.jumpready)) {
_root.player.canfire = false;
if (_root.player.grenadehit) {
if (_root.player.sprite == 13) {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation - 5;
if (this._x > 0) {
this._x = this._x - _root.player.xvelo;
}
} else {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation + 5;
if (this._x < 600) {
this._x = this._x + _root.player.xvelo;
}
}
}
if (_root.player.jumpready) {
if (_root.player.velo > 0.05) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo - ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y - _root.player.velo;
} else {
_root.player.jumpready = false;
_root.player.apogeereached = true;
}
} else if (_root.player.apogeereached) {
if (_root.player.grenadehit) {
_root.player.grenadehit = false;
_root.player.realign = true;
}
if (_root.player.realign) {
if (this._rotation != 0) {
if (_root.player.sprite == 13) {
this._rotation = this._rotation - 5;
} else {
this._rotation = this._rotation + 5;
}
} else {
this._rotation = 0;
_root.player.realgin = false;
}
}
if ((_root.player_mc._y < _root.player._y) && (_root.player.apogeereached)) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo + ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y + _root.player.velo;
_root.player.landed = false;
} else if ((_root.player_mc._y >= _root.player._y) && (_root.player.apogeereached)) {
_root.player_mc._y = _root.player._y;
_root.player.apogeereached = false;
_root.player.landed = true;
}
} else if (_root.player.landed) {
_root.player.xvelo = 1 + random(10);
this._rotation = 0;
_root.player.landed = false;
_root.player.canfire = true;
_root.player.doublejump = true;
if (_root.player.sprite == 13) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_right", "player", 0);
_root.player.sprite = 3;
}
if (_root.player.sprite == 14) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_left", "player", 0);
_root.player.sprite = 4;
}
}
}
}
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 1107
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Instance of Symbol 623 MovieClip [powerup_ammo] "powerup_ammo" in Frame 1107
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.ammo = 32;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_ammo) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.ammo < (999 - this.ammo)) {
_root.player.ammo = _root.player.ammo + this.ammo;
} else {
_root.player.ammo = 999;
}
_root.ammodisp = _root.player.ammo;
this.removeMovieClip();
}
}
}
Instance of Symbol 621 MovieClip [powerup_grenade] "powerup_grenade" in Frame 1107
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.grenades = 4;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_grenade) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.grenades < (999 - this.grenades)) {
_root.player.grenades = _root.player.grenades + this.grenades;
} else {
_root.player.grenades = 999;
}
_root.grenadedisp = _root.player.grenades;
this.removeMovieClip();
}
}
}
Instance of Symbol 619 MovieClip [powerup_health] "powerup_health" in Frame 1107
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.health = 25;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_health) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.health < (100 - this.health)) {
_root.health = _root.health + this.health;
} else {
_root.health = 100;
}
this.removeMovieClip();
}
}
}
Instance of Symbol 682 MovieClip [vampireclip] "vampire_mc" in Frame 1107
onClipEvent (load) {
if (this != _root.vampire_mc) {
if (_root.player_mc._x >= this._x) {
this.attachMovie("vampire_run_right", "vampire", 0);
this.sprite = 1;
this.dir = 1;
} else {
this.attachMovie("vampire_run_left", "vampire", 0);
this.sprite = 2;
this.dir = 2;
}
this._width = 58;
this._height = 73.5;
this._y = 293;
this.speed = 1 + random(3);
this.hit = false;
this.health = 100;
this.blayer = 1;
this.yvelo = 3;
this.xvelo = 1 + random(4);
this.spin = 1 + random(10);
switch (_global.difficulty) {
case 1 :
this.speed = 1 + random(3);
this.damage = 1;
break;
case 2 :
this.speed = 2 + random(3);
this.damage = 3;
break;
case 3 :
this.speed = 2 + random(3);
this.damage = 5;
}
}
}
onClipEvent (enterFrame) {
if (this != _root.vampire_mc) {
if (!this.hit) {
_global.score = _global.score + 10;
if ((this.sprite == 5) || (this.sprite == 6)) {
_global.score = _global.score + 100;
if (!this.grenadehit) {
this._alpha = this._alpha - 3;
this._y = this._y + 1;
if (this._alpha <= 0) {
if (!this.norespawn) {
_root.enemydead(this.getDepth());
}
_root.enemies[this.id] = 0;
this.removeMovieClip();
}
} else if (this.grenadehit) {
if (this.dir == 1) {
this._rotation = this._rotation - this.spin;
} else {
this._rotation = this._rotation + this.spin;
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this.xvelo > 0) {
this.xvelo = this.xvelo - ((0.01 * Math.abs(this.xvelo)) / this.xvelo);
}
this._y = this._y - this.yvelo;
if (this.dir == 1) {
this._x = this._x - this.xvelo;
} else {
this._x = this._x + this.xvelo;
}
if (((this._y >= 330) || (this._x < -50)) || (this._x > 630)) {
this.norespawn = false;
this.grenadehit = false;
}
}
} else {
if (this.hitTest(_root.player_mc) && (getTimer() > this.hittime)) {
if (_root.health > 0) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - this.damage;
this.hittime = getTimer() + 250;
}
}
if (Math.abs(_root.player_mc._x - this._x) < 50) {
if (this.sprite != 0) {
this.attachMovie("vampire_attack", "vampire" + this.level, this.level);
this.sprite = 0;
}
if (_root.player_mc._x > this._x) {
this._x = this._x + random(6);
} else {
this._x = this._x - random(6);
}
} else if (_root.player_mc._x > this._x) {
if (this.sprite != 1) {
this.attachMovie("vampire_run_right", "vampire" + this.level, this.level);
this.sprite = 1;
this.dir = 1;
}
this._x = this._x + this.speed;
} else if (_root.player_mc._x < this._x) {
if (this.sprite != 2) {
this.attachMovie("vampire_run_left", "vampire" + this.level, this.level);
this.sprite = 2;
this.dir = 2;
}
this._x = this._x - this.speed;
}
}
} else if (getTimer() > this.time) {
this.hit = false;
this.time = getTimer() + 100;
}
}
}
Instance of Symbol 842 MovieClip "truck" in Frame 1107
onClipEvent (load) {
this.active = false;
this.inplace = false;
this.out = false;
this.xvelo = 12;
}
onClipEvent (enterFrame) {
if (this.active) {
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this._x < 475) {
this._x = this._x + xvelo;
} else {
_root.talkbubble(375, 150, 2500, "let's get the hell out of here!", "talk_face_pilot", 200);
this.inplace = true;
this.active = false;
}
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root.enemies[z] = 0;
_root["vampire" + z].grenadehit = true;
_root["vampire" + z].health = 0;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
z++;
}
}
if (this.out) {
if (this._x < 750) {
this._x = this._x + 5;
} else {
_root.nextLevel();
}
}
}
Instance of Symbol 616 MovieClip [bullet] "bullet_mc" in Frame 1107
onClipEvent (load) {
this.damage = 20;
this._y = _root.player_mc._y - 15;
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
this._x = _root.player_mc._x + 35;
this.dir = 1;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
this._x = _root.player_mc._x - 35;
this.dir = 2;
}
}
onClipEvent (enterFrame) {
if (_root.player.ammo < 16) {
if (_root.bubbleammonotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: ammo is low!", "talk_face_alert", 202);
_root.bubbleammonotify = true;
}
if (getTimer() > ammonotify) {
_root.ammod._visible = false;
ammonotify = getTimer() + 500;
} else {
_root.ammod._visible = true;
}
}
if (this != _root.bullet_mc) {
if (this.dir == 1) {
this._x = this._x + 30;
if (this._x > 600) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
if (this.dir == 2) {
this._x = this._x - 30;
if (this._x < 0) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
i = 0;
while (i <= _root.MAXBULLETS) {
if (_root.bullets[i] != 0) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
_root.hits++;
_global.score++;
_root.scoredisp._text = _global.score;
if ((_root["vampire" + z].sprite != 5) && (_root["vampire" + z].sprite != 6)) {
if (_root["vampire" + z].sprite == 1) {
_root["vampire" + z].attachMovie("vampire_hit_right", "vampire", 0);
_root["vampire" + z].sprite = 3;
} else if (_root["vampire" + z].sprite == 2) {
_root["vampire" + z].attachMovie("vampire_hit_left", "vampire", 0);
_root["vampire" + z].sprite = 4;
}
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root["vampire" + z].hit = true;
_root["vampire" + z].health = _root["vampire" + z].health - this.damage;
if (_root["vampire" + z].health <= 0) {
_root.kills++;
_global.score = _global.score + 100;
_root.enemies[z] = 0;
if (this.dir == 1) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
_root["vampire" + z].deadTimer = getTimer();
}
_root.bullets[i] = 0;
this.removeMovieClip();
}
}
}
z++;
}
}
i++;
}
}
}
Instance of Symbol 614 MovieClip [grenade] "grenade_mc" in Frame 1107
onClipEvent (load) {
if (this != _root.grenade_mc) {
this.damage = 10;
this.xvelo = 8 + random(2);
this.yvelo = 1 + random(3);
this.apogeereached = false;
this.ecount = 0;
this.etime = 0;
this.explode = false;
this.bubblenotify = false;
this._y = _root.player_mc._y + 5;
if (((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) || (_root.player.sprite == 15)) {
this._x = _root.player_mc._x;
this.dir = 1;
}
if (((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) || (_root.player.sprite == 16)) {
this._x = _root.player_mc._x;
this.dir = 2;
}
}
}
onClipEvent (enterFrame) {
if (_root.player.grenades <= 2) {
if (_root.bubblenotify == false) {
_root.bubblenotify = true;
_root.talkbubble(5, 25, 2500, "WARNING: grenades are low!", "talk_face_alert", 201);
}
if (getTimer() > grenadenotify) {
_root.grenaded._visible = false;
grenadenotify = getTimer() + 500;
} else {
_root.grenaded._visible = true;
}
}
if (this.explode && (getTimer() > this.etime)) {
if (!this.area1down) {
pos = new Object();
pos._x = this._x;
pos._y = this._y;
_root.explosion_mc.duplicateMovieClip("exparea" + id, 0, pos);
this.area1down = true;
}
if (this.ecount < 8) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(75);
} else {
pos._x = -random(75);
}
pos._y = -random(50);
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp" + this.ecount, this.ecount, pos);
} else {
this.attachMovie("explosion_2", "exp" + this.ecount, this.ecount, pos);
}
this.ecount++;
if (getTimer() > this.rtime) {
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp22", 22);
} else {
this.attachMovie("explosion_2", "exp22", 22);
}
this.rtime = getTimer() + 100;
}
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
} else if (getTimer() > this.otime) {
this.explode = false;
this.removeMovieClip();
}
}
if (this != _root.grenade_mc) {
if (!this.explode) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
_root.grenades[id] = 0;
this.xvelo = 0;
this.yvelo = 0;
this.explode = true;
}
}
z++;
}
if (this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.08 * Math.abs(this.xvelo)) / this.xvelo);
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this._y >= 330) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
if (this._x > 600) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
if (this.dir == 2) {
this._x = this._x - this.xvelo;
if (this._x < 0) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
}
}
}
Instance of Symbol 612 MovieClip [explosion_area_1] "explosion_mc" in Frame 1107
onClipEvent (load) {
this.damage = 100;
this._alpha = 100;
this.playerhittime = 0;
}
onClipEvent (enterFrame) {
if (this._alpha >= 10) {
this._alpha = this._alpha - 10;
}
if (this != _root.explosion_mc) {
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
_root.player_mc.attachMovie("player_jump_right", "player", 0);
_root.player.sprite = 13;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
_root.player_mc.attachMovie("player_jump_left", "player", 0);
_root.player.sprite = 14;
}
_root.player.canfire = false;
_root.player.jumpready = true;
_root.player.grenadehit = true;
_root.health--;
this.playerhittime = getTimer() + 100;
}
z = 0;
while (z <= _root.MAXENEMIES) {
if (z <= _root.MAXGRENADES) {
if (this.hitTest(_root["grenade" + z])) {
}
}
if (_root.enemies[z] == 1) {
if (this.hitTest(_root["vampire" + z])) {
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root["vampire" + z].hit = true;
_root["vampire" + z].health = _root["vampire" + z].health - this.damage;
_root.hits++;
if (_root["vampire" + z].health <= 0) {
_root.kills++;
_global.score = _global.score + 100;
_root.enemies[z] = 2;
_root["vampire" + z].grenadehit = true;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
}
z++;
}
}
}
Frame 1108
if (_root.gameover) {
trace(_root.levelend._x);
_root.levelend._x = 650;
}
aw1 = false;
aw2 = false;
aw3 = false;
_root.accuracy = int((_root.hits / _root.shotsfired) * 100);
if (isNaN(_root.accuracy)) {
_root.accuracy = 0;
}
if (_root.accuracy >= 100) {
_root.ranking = "A+";
} else if (_root.accuracy >= 90) {
_root.ranking = "A";
} else if (_root.accuracy >= 85) {
_root.ranking = "B+";
} else if (_root.accuracy >= 80) {
_root.ranking = "B";
} else if (_root.accuracy >= 75) {
_root.ranking = "C+";
} else if (_root.accuracy >= 70) {
_root.ranking = "C";
} else if (_root.accuracy >= 65) {
_root.ranking = "D+";
} else if (_root.accuracy >= 60) {
_root.ranking = "D";
} else {
_root.ranking = "F";
}
a1 = "BEST IN SHOW";
a2 = "CLASS CLOWN";
a3 = "GOOD ATTENDANCE";
a4 = "MOST FRIENDLY";
a5 = "MOST ATHLETIC";
a6 = "BEST HANDWRITING";
if (_root.health >= 100) {
if (!aw1) {
award1 = "GOOD DIET";
aw1 = true;
} else if (!aw2) {
award2 = "GOOD DIET";
aw2 = true;
} else if (!aw3) {
award3 = "GOOD DIET";
aw3 = true;
}
}
if (_root.ranking >= 80) {
if (!aw1) {
award1 = "ACCURACY HERO";
aw1 = true;
} else if (!aw2) {
award2 = "ACCURACY HERO";
aw2 = true;
} else if (!aw3) {
award3 = "ACCURACY HERO";
aw3 = true;
}
}
aextra1 = random(6) + 1;
if (aextra1 == 1) {
atext = a1;
} else if (aextra1 == 2) {
atext = a2;
} else if (aextra1 == 3) {
atext = a3;
} else if (aextra1 == 4) {
atext = a4;
} else if (aextra1 == 5) {
atext = a5;
} else if (aextra1 == 6) {
atext = a6;
}
if (!aw1) {
award1 = atext;
aw1 = true;
} else if (!aw2) {
award2 = atext;
aw2 = true;
} else if (!aw3) {
award3 = atext;
aw3 = true;
}
Instance of Symbol 608 MovieClip [level_end] "levelend" in Frame 1108
onClipEvent (load) {
if (_root.gameover) {
this._y = 650;
}
}
Instance of Symbol 861 MovieClip "gameover" in Frame 1108
onClipEvent (load) {
if (_root.gameover) {
this._alpha = 100;
} else {
this._y = 650;
}
}
Frame 1117
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
_root.talkbubble(325, 25, 2500, "the vampires are heading toward the city!", "talk_face_chief", 200);
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 1117
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Frame 1206
_root.talkbubble(325, 25, 2500, "we're sending a helicopter to pick you up.", "talk_face_chief", 200);
Frame 1517
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
lives.text = "LIVES LEFT: " + _global.lives;
stop();
Instance of Symbol 837 MovieClip "fader" in Frame 1517
onClipEvent (enterFrame) {
if ((this._alpha > 0) && (getTimer() > this.fadetimer)) {
this._alpha = this._alpha - 1;
_root.lives._alpha = _root.lives._alpha - 1;
this.fadetimer = getTimer() + 10;
} else {
_root.play();
}
}
Frame 1518
gotonextscene = function () {
gotoAndPlay (1528);
};
gotomainmenu = function () {
gotoAndStop (3);
};
function keyTrap() {
if (player.canmove) {
if (Key.isDown(39)) {
if (this._x < 600) {
this._x = this._x + player.speed;
}
} else if (Key.isDown(37)) {
if (this._x > 0) {
this._x = this._x - player.speed;
}
}
if (Key.isDown(38)) {
}
if (Key.isDown(17)) {
ammodisp = player.ammo;
if (player.ammo >= 1) {
if (player.bulletcount < 8) {
if (getTimer() > this.time) {
if (player.canfire) {
player.ammo--;
z = 0;
while (z <= MAXBULLETS) {
if (bullets[z] == 0) {
shotsfired++;
player.bulletcount++;
bullets[z] = 1;
bulletid = new Object();
bulletid.id = z;
if ((player.sprite % 2) == 0) {
player_mc.attachMovie("gunflash_left", "gf" + z, 300);
} else {
player_mc.attachMovie("gunflash_right", "gf" + z, 300);
}
bullet_mc.duplicateMovieClip("bullet" + player.bulletcount, player.bulletcount, bulletid);
setProperty("bullet" + player.bulletcount, _visible , true);
this.time = getTimer() + 200;
break;
}
z++;
}
}
}
} else {
player.canfire = false;
player.bulletcount = 0;
if (player.sprite == 5) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_right", "player", 0);
player.sprite = 9;
}
if (player.sprite == 6) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_left", "player", 0);
player.sprite = 10;
}
if (player.sprite == 7) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_right", "player", 0);
player.sprite = 11;
}
if (player.sprite == 8) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_left", "player", 0);
player.sprite = 12;
}
}
}
}
if (Key.isDown(32)) {
grenadedisp = player.grenades;
if (((player.grenades >= 1) && (getTimer() > this.gtime)) && (player.canfire)) {
if (player.grenadecount < MAXGRENADES) {
if (grenades[player.grenadecount++] == 0) {
shotsfired++;
player.grenades--;
grenades[player.grenadecount] = 1;
grenadeid = new Object();
grenadeid.id = player.grenadecount;
grenade_mc.duplicateMovieClip("grenade" + player.grenadecount, player.grenadecount, 80 + grenadeid);
this.gtime = getTimer() + 250;
}
} else {
player.grenadecount = 0;
}
}
}
}
}
this.gameover = false;
MAXENEMIES = 3;
MAXBULLETS = 8;
MAXGRENADES = 8;
ENDTIMER = getTimer() + 120000;
KILLS = 0;
LEVELEND = false;
kills = 0;
hits = 0;
shotsfired = 0;
accuracy = 0;
bubblenotify = false;
bubbleammonotify = false;
bubblehealthnotify = false;
numHealth = 0;
numAmmo = 0;
numGrenade = 0;
player = new Object();
health = 100;
player.ammo = 96;
player.grenades = 4;
player._x = 475;
player._y = -80;
player._width = 43.8;
player._height = 63;
player.speed = 5;
player.sprite = 1;
player.canfire = false;
player.canmove = false;
player.candamage = true;
player.reloadframe = 0;
player.bulletcount = 0;
player.grenadecount = 0;
player.apogee = 150;
player.doublejump = false;
player.jumpready = false;
player.velo = 6;
player.xvelo = 4;
bullet_mc._visible = false;
bullets = new Array(16);
enemies = new Array(16);
grenades = new Array(16);
z = 0;
while (z <= 16) {
bullets[z] = 0;
enemies[z] = 0;
grenades[z] = 0;
z++;
}
ammodisp = player.ammo;
grenadedisp = player.grenades;
player_mc.attachMovie("player_stand", "player", 0);
setProperty(player_mc, _x , player._x);
setProperty(player_mc, _y , player._y);
setProperty(player_mc, _width , player._width);
setProperty(player_mc, _height , player._height);
keyWatch = new Object();
keyWatch.onKeyDown = function () {
if (player.canmove) {
if (Key.getCode() == 39) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 13) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_right", "player", 0, mdata);
player.sprite = 13;
}
} else if (player.sprite != 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_right", "player", 0);
player.sprite = 1;
}
}
if (Key.getCode() == 37) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 14) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_left", "player", 0);
player_mc.gotoAndPlay(20);
player.sprite = 14;
}
} else if (player.sprite != 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_left", "player", 0);
player.sprite = 2;
}
}
if (Key.getCode() == 17) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_right", "player", 0);
player.sprite = 5;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_left", "player", 0);
player.sprite = 6;
}
}
if (Key.getCode() == 32) {
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_right", "player", 0);
player.sprite = 15;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_left", "player", 0);
player.sprite = 16;
}
}
if (Key.getCode() == 38) {
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_right", "player", 0);
player.sprite = 13;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_left", "player", 0);
player.sprite = 14;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
}
}
};
keyWatch.onKeyUp = function () {
if (player.canmove) {
if ((Key.getCode() == 39) || (Key.getCode() == 37)) {
if (!Key.isDown(39)) {
if (!Key.isDown(37)) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
}
if (Key.getCode() == 17) {
player.canfire = true;
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
if (Key.getCode() == 38) {
if (!player.doublejump) {
player.doublejump = true;
player.jumpready = true;
}
}
if (Key.getCode() == 32) {
player.canfire = true;
if (((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) || (player.sprite == 15)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) || (player.sprite == 16)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
};
Key.addListener(keyWatch);
player.reloaded = function () {
player.canfire = true;
if (player.sprite == 9) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 10) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
if (player.sprite == 11) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 12) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
};
player_mc.onEnterFrame = keyTrap;
enemydead = function (num) {
if (!_root.LEVELEND) {
numEnemy--;
makeenemy();
}
};
makeenemy = function () {
z = 0;
while (z <= MAXENEMIES) {
if (enemies[z] == 0) {
position = new Object();
if (random(10) < 5) {
position._x = -50;
} else {
position._x = 650;
}
vampire_mc.duplicateMovieClip("vampire" + z, z + 100, position);
_root["vampire" + z].id = z;
enemies[z] = 1;
numEnemy++;
return;
}
z++;
}
};
endLevel = function () {
_root.LEVELEND = true;
_root.helicopter.active = true;
};
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
poweruphealth = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_health.duplicateMovieClip("h" + layer, layer, pos);
};
powerupammo = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_ammo.duplicateMovieClip("a" + layer, layer, pos);
};
powerupgrenade = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_grenade.duplicateMovieClip("g" + layer, layer, pos);
};
nextLevel = function () {
z = 0;
while (z < MAXENEMIES) {
_root["vampire" + z].removeMovieClip();
z++;
}
gotoAndPlay (1519);
};
playerdied = function () {
trace("died - " + _global.lives);
if (_global.lives > 1) {
z = 0;
while (z <= 16) {
removeMovieClip("vampire" + z);
z++;
}
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
_global.lives--;
gotoAndPlay (1517);
} else {
this.gameover = true;
gotoAndStop (1519);
}
};
numEnemy = 2;
i = 0;
while (i < numEnemy) {
vampire_mc.duplicateMovieClip("vampire" + i, i + 100);
_root["vampire" + i].id = i;
enemies[i] = 1;
i++;
}
stop();
Instance of Symbol 669 MovieClip [player] "player_mc" in Frame 1518
onClipEvent (enterFrame) {
if ((_root.health <= 0) && (getTimer() > _root.player.deadtime)) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player.canmove = false;
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
_root.fader._alpha++;
if (_root.player_mc._alpha <= 0) {
_root.playerdied();
_root.ENDTIMER = getTimer();
_root.player_mc.removeMovieClip();
}
}
if (getTimer() >= _root.ENDTIMER) {
if (!this.endcalled) {
_root.endLevel();
this.endcalled = true;
}
if (_root.helicopter.inplace && (!_root.helicopter.out)) {
if (_root.player_mc._y >= _root.player._y) {
if (_root.player_mc._x < (_root.helicopter._x - 45)) {
if (_root.player.sprite != 3) {
_root.player_mc.attachMovie("player_run_right", "player", 0);
_root.player.sprite = 3;
}
} else if (_root.player.sprite != 4) {
_root.player_mc.attachMovie("player_run_left", "player", 0);
_root.player.sprite = 4;
}
}
if (!((_root.player_mc._x > (_root.helicopter._x - 60)) && (_root.player_mc._x < (_root.helicopter._x - 15)))) {
if (_root.player_mc._x < (_root.helicopter._x - 45)) {
_root.player_mc._x = _root.player_mc._x + 5;
} else {
_root.player_mc._x = _root.player_mc._x - 5;
}
}
if (((_root.player_mc._x > (_root.helicopter._x - 60)) && (_root.player_mc._x < (_root.helicopter._x - 15))) && (_root.player_mc._y >= _root.player._y)) {
_root.player.landed = true;
_root.helicopter.yvelo = 6;
_root.helicopter.out = true;
this.unloadMovie();
}
}
} else {
timeleft = _root.ENDTIMER - getTimer();
_root.timer = timeleft;
if ((timeleft < 119500) && (!beginnotify)) {
_root.truck.active = true;
_root.makeenemy();
_root.talkbubble(200, 125, 5000, "a helicopter will be here to pick you up.", "talk_face_chief", 200);
beginnotify = true;
}
if ((timeleft <= 94500) && (!tr1)) {
x = 0;
while (x < 2) {
_root.makeenemy();
x++;
}
tr1 = true;
}
if ((timeleft <= 79000) && (!tr4)) {
_root.talkbubble(375, 25, 5000, "i love bagels.", "talk_face_chief", 200);
tr4 = true;
_root.makeenemy();
}
if ((timeleft <= 74500) && (!tr5)) {
_root.talkbubble(375, 25, 5000, "me too.", "talk_face_pilot", 200);
tr5 = true;
}
if ((timeleft <= 60000) && (!wave1)) {
_root.powerupammo(random(600), 320, 50 + random(10));
_root.powerupammo(random(600), 320, 50 + random(10));
wave1 = true;
_root.makeenemy();
} else if ((timeleft <= 50000) && (!wave2)) {
_root.talkbubble(200, 125, 5000, "we are about 45 seconds from your location.", "talk_face_heli", 200);
wave2 = true;
_root.makeenemy();
} else if ((timeleft <= 30000) && (!tr6)) {
_root.powerupammo(random(600), 320, 50 + random(10));
_root.powerupammo(random(600), 320, 50 + random(10));
tr6 = true;
_root.makeenemy();
} else if ((timeleft <= 15000) && (!wave3)) {
_root.talkbubble(200, 125, 5000, "we're almost in position. standby...", "talk_face_heli", 200);
_root.makeenemy();
_root.makeenemy();
wave3 = true;
}
}
if (_root.health < 25) {
if (_root.bubblehealthnotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: health is low!", "talk_face_alert", 203);
_root.bubblehealthnotify = true;
}
if (getTimer() > healthnotify) {
_root.healthd._visible = false;
healthnotify = getTimer() + 500;
} else {
_root.healthd._visible = true;
}
}
if (((_root.player.sprite == 13) || (_root.player.sprite == 14)) || (_root.player.jumpready)) {
_root.player.canfire = false;
if (_root.player.grenadehit) {
if (_root.player.sprite == 13) {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation - 5;
if (this._x > 0) {
this._x = this._x - _root.player.xvelo;
}
} else {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation + 5;
if (this._x < 600) {
this._x = this._x + _root.player.xvelo;
}
}
}
if (_root.player.jumpready) {
if (_root.player.velo > 0.05) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo - ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y - _root.player.velo;
} else {
_root.player.jumpready = false;
_root.player.apogeereached = true;
}
} else if (_root.player.apogeereached) {
if (_root.player.grenadehit) {
_root.player.grenadehit = false;
_root.player.realign = true;
}
if (_root.player.realign) {
if (this._rotation != 0) {
if (_root.player.sprite == 13) {
this._rotation = this._rotation - 5;
} else {
this._rotation = this._rotation + 5;
}
} else {
this._rotation = 0;
_root.player.realgin = false;
}
}
if ((_root.player_mc._y < _root.player._y) && (_root.player.apogeereached)) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo + ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y + _root.player.velo;
_root.player.landed = false;
} else if ((_root.player_mc._y >= _root.player._y) && (_root.player.apogeereached)) {
_root.player_mc._y = _root.player._y;
_root.player.apogeereached = false;
_root.player.landed = true;
}
} else if (_root.player.landed) {
_root.player.xvelo = 1 + random(10);
this._rotation = 0;
_root.player.landed = false;
_root.player.canfire = true;
_root.player.doublejump = true;
if (_root.player.sprite == 13) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_right", "player", 0);
_root.player.sprite = 3;
}
if (_root.player.sprite == 14) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_left", "player", 0);
_root.player.sprite = 4;
}
}
}
}
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 1518
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Instance of Symbol 623 MovieClip [powerup_ammo] "powerup_ammo" in Frame 1518
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.ammo = 32;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_ammo) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.ammo < (999 - this.ammo)) {
_root.player.ammo = _root.player.ammo + this.ammo;
} else {
_root.player.ammo = 999;
}
_root.ammodisp = _root.player.ammo;
this.removeMovieClip();
}
}
}
Instance of Symbol 621 MovieClip [powerup_grenade] "powerup_grenade" in Frame 1518
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.grenades = 4;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_grenade) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.grenades < (999 - this.grenades)) {
_root.player.grenades = _root.player.grenades + this.grenades;
} else {
_root.player.grenades = 999;
}
_root.grenadedisp = _root.player.grenades;
this.removeMovieClip();
}
}
}
Instance of Symbol 619 MovieClip [powerup_health] "powerup_health" in Frame 1518
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.health = 25;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_health) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.health < (100 - this.health)) {
_root.health = _root.health + this.health;
} else {
_root.health = 100;
}
this.removeMovieClip();
}
}
}
Instance of Symbol 682 MovieClip [vampireclip] "vampire_mc" in Frame 1518
onClipEvent (load) {
if (this != _root.vampire_mc) {
if (_root.player_mc._x >= this._x) {
this.attachMovie("vampire_run_right", "vampire", 0);
this.sprite = 1;
this.dir = 1;
} else {
this.attachMovie("vampire_run_left", "vampire", 0);
this.sprite = 2;
this.dir = 2;
}
this._width = 58;
this._height = 73.5;
this._y = 293;
this.speed = 1 + random(2);
this.hit = false;
this.health = 100;
this.blayer = 1;
this.yvelo = 3;
this.xvelo = 1 + random(4);
this.spin = 1 + random(10);
this.powerup = false;
switch (_global.difficulty) {
case 1 :
this.speed = 1 + random(2);
this.damage = 1;
break;
case 2 :
this.speed = 2 + random(2);
this.damage = 3;
break;
case 3 :
this.speed = 2 + random(2);
this.damage = 5;
}
}
}
onClipEvent (enterFrame) {
if (this != _root.vampire_mc) {
if (!this.hit) {
if ((this.sprite == 5) || (this.sprite == 6)) {
if (!this.grenadehit) {
this._alpha = this._alpha - 3;
this._y = this._y + 1;
if (this._alpha <= 0) {
if ((this._x > 0) && (this._x < 600)) {
if (random(100) <= 10) {
if ((_root.health <= 75) && (_root.numHealth < 3)) {
_root.poweruphealth(this._x, 320, 50 + random(10));
_root.numHealth++;
}
} else if (random(100) <= 10) {
if (_root.numAmmo < 4) {
_root.powerupammo(this._x, 320, 50 + random(10));
_root.numHealth++;
}
} else if (random(100) <= 10) {
_root.powerupgrenade(this._x, 320, 50 + random(10));
}
}
if (!this.norespawn) {
_root.enemydead(this.getDepth());
}
_root.enemies[this.id] = 0;
this.removeMovieClip();
}
} else if (this.grenadehit) {
if (this.dir == 1) {
this._rotation = this._rotation - this.spin;
} else {
this._rotation = this._rotation + this.spin;
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this.xvelo > 0) {
this.xvelo = this.xvelo - ((0.01 * Math.abs(this.xvelo)) / this.xvelo);
}
this._y = this._y - this.yvelo;
if (this.dir == 1) {
this._x = this._x - this.xvelo;
} else {
this._x = this._x + this.xvelo;
}
if (((this._y >= 330) || (this._x < -50)) || (this._x > 630)) {
this.norespawn = false;
this.grenadehit = false;
}
}
} else {
if (this.hitTest(_root.player_mc) && (getTimer() > this.hittime)) {
if ((_root.health > 0) && (_root.player.candamage)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - this.damage;
this.hittime = getTimer() + 250;
}
}
if (Math.abs(_root.player_mc._x - this._x) < 50) {
if (this.sprite != 0) {
this.attachMovie("vampire_attack", "vampire" + this.level, this.level);
this.sprite = 0;
}
if (_root.player_mc._x > this._x) {
this._x = this._x + random(6);
} else {
this._x = this._x - random(6);
}
} else if (_root.player_mc._x > this._x) {
if (this.sprite != 1) {
this.attachMovie("vampire_run_right", "vampire" + this.level, this.level);
this.sprite = 1;
this.dir = 1;
}
this._x = this._x + this.speed;
} else if (_root.player_mc._x < this._x) {
if (this.sprite != 2) {
this.attachMovie("vampire_run_left", "vampire" + this.level, this.level);
this.sprite = 2;
this.dir = 2;
}
this._x = this._x - this.speed;
}
}
} else if (getTimer() > this.time) {
this.hit = false;
this.time = getTimer() + 100;
}
}
}
Instance of Symbol 842 MovieClip "truck" in Frame 1518
onClipEvent (load) {
this.active = false;
this.inplace = false;
this.out = false;
this.xvelo = 12;
}
onClipEvent (enterFrame) {
if (this.active) {
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this._x < 475) {
this._x = this._x + xvelo;
} else {
_root.talkbubble(200, 125, 2500, "good luck!", "talk_face_pilot", 200);
_root.player_mc._y = 299;
_root.player._y = 299;
_root.player.canmove = true;
_root.player.canfire = true;
this.inplace = true;
this.active = false;
this.out = true;
}
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root.enemies[z] = 0;
_root["vampire" + z].grenadehit = true;
_root["vampire" + z].health = 0;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
z++;
}
}
if (this.out) {
if (this._x < 750) {
this._x = this._x + 5;
} else {
this.unloadMovie();
}
}
}
Instance of Symbol 883 MovieClip "helicopter" in Frame 1518
onClipEvent (load) {
this.yvelo = 8.5;
this.xvelo = 10;
this.active = false;
this.inplace = false;
this.out = false;
}
onClipEvent (enterFrame) {
if (this.active) {
if (_this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
if (this._y <= 295) {
this._y = this._y + this.yvelo;
} else {
_root.player.canmove = false;
_root.player.candamage = false;
this.inplace = true;
this.active = false;
}
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root.enemies[z] = 0;
_root["vampire" + z].grenadehit = true;
_root["vampire" + z].health = 0;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
z++;
}
}
if (this.out) {
if (this._x >= -150) {
if (_this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this._rotation > -15) {
this._rotation--;
}
this._y = this._y - this.yvelo;
this._x = this._x - this.xvelo;
} else {
_root.nextLevel();
}
}
}
Instance of Symbol 616 MovieClip [bullet] "bullet_mc" in Frame 1518
onClipEvent (load) {
this.damage = 20;
this._y = _root.player_mc._y - 15;
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
this._x = _root.player_mc._x + 35;
this.dir = 1;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
this._x = _root.player_mc._x - 35;
this.dir = 2;
}
}
onClipEvent (enterFrame) {
if (_root.player.ammo < 16) {
if (_root.bubbleammonotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: ammo is low!", "talk_face_alert", 202);
_root.bubbleammonotify = true;
}
if (getTimer() > ammonotify) {
_root.ammod._visible = false;
ammonotify = getTimer() + 500;
} else {
_root.ammod._visible = true;
}
}
if (this != _root.bullet_mc) {
if (this.dir == 1) {
this._x = this._x + 30;
if (this._x > 600) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
if (this.dir == 2) {
this._x = this._x - 30;
if (this._x < 0) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
i = 0;
while (i <= _root.MAXBULLETS) {
if (_root.bullets[i] != 0) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
_root.hits++;
if ((_root["vampire" + z].sprite != 5) && (_root["vampire" + z].sprite != 6)) {
if (_root["vampire" + z].sprite == 1) {
_root["vampire" + z].attachMovie("vampire_hit_right", "vampire", 0);
_root["vampire" + z].sprite = 3;
} else if (_root["vampire" + z].sprite == 2) {
_root["vampire" + z].attachMovie("vampire_hit_left", "vampire", 0);
_root["vampire" + z].sprite = 4;
}
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root["vampire" + z].hit = true;
_root["vampire" + z].health = _root["vampire" + z].health - this.damage;
if (_root["vampire" + z].health <= 0) {
_root.kills++;
_root.enemies[z] = 0;
if (this.dir == 1) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
_root["vampire" + z].deadTimer = getTimer();
}
_root.bullets[i] = 0;
this.removeMovieClip();
}
}
}
z++;
}
}
i++;
}
}
}
Instance of Symbol 614 MovieClip [grenade] "grenade_mc" in Frame 1518
onClipEvent (load) {
if (this != _root.grenade_mc) {
this.damage = 10;
this.xvelo = 8 + random(2);
this.yvelo = 1 + random(3);
this.apogeereached = false;
this.ecount = 0;
this.etime = 0;
this.explode = false;
this.bubblenotify = false;
this._y = _root.player_mc._y + 5;
if (((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) || (_root.player.sprite == 15)) {
this._x = _root.player_mc._x;
this.dir = 1;
}
if (((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) || (_root.player.sprite == 16)) {
this._x = _root.player_mc._x;
this.dir = 2;
}
}
}
onClipEvent (enterFrame) {
if (_root.player.grenades <= 2) {
if (_root.bubblenotify == false) {
_root.bubblenotify = true;
_root.talkbubble(5, 25, 2500, "WARNING: grenades are low!", "talk_face_alert", 201);
}
if (getTimer() > grenadenotify) {
_root.grenaded._visible = false;
grenadenotify = getTimer() + 500;
} else {
_root.grenaded._visible = true;
}
}
if (this.explode && (getTimer() > this.etime)) {
if (!this.area1down) {
pos = new Object();
pos._x = this._x;
pos._y = this._y;
_root.explosion_mc.duplicateMovieClip("exparea" + id, 0, pos);
this.area1down = true;
}
if (this.ecount < 8) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(75);
} else {
pos._x = -random(75);
}
pos._y = -random(50);
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp" + this.ecount, this.ecount, pos);
} else {
this.attachMovie("explosion_2", "exp" + this.ecount, this.ecount, pos);
}
this.ecount++;
if (getTimer() > this.rtime) {
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp22", 22);
} else {
this.attachMovie("explosion_2", "exp22", 22);
}
this.rtime = getTimer() + 100;
}
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
} else if (getTimer() > this.otime) {
this.explode = false;
this.removeMovieClip();
}
}
if (this != _root.grenade_mc) {
if (!this.explode) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
_root.grenades[id] = 0;
this.xvelo = 0;
this.yvelo = 0;
this.explode = true;
}
}
z++;
}
if (this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.08 * Math.abs(this.xvelo)) / this.xvelo);
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this._y >= 330) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
if (this._x > 600) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
if (this.dir == 2) {
this._x = this._x - this.xvelo;
if (this._x < 0) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
}
}
}
Instance of Symbol 612 MovieClip [explosion_area_1] "explosion_mc" in Frame 1518
onClipEvent (load) {
this.damage = 100;
this._alpha = 100;
this.playerhittime = 0;
}
onClipEvent (enterFrame) {
if (this._alpha >= 10) {
this._alpha = this._alpha - 10;
}
if (this != _root.explosion_mc) {
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
_root.player_mc.attachMovie("player_jump_right", "player", 0);
_root.player.sprite = 13;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
_root.player_mc.attachMovie("player_jump_left", "player", 0);
_root.player.sprite = 14;
}
_root.player.canfire = false;
_root.player.jumpready = true;
_root.player.grenadehit = true;
_root.health--;
this.playerhittime = getTimer() + 100;
}
z = 0;
while (z <= _root.MAXENEMIES) {
if (z <= _root.MAXGRENADES) {
if (this.hitTest(_root["grenade" + z])) {
}
}
if (_root.enemies[z] == 1) {
if (this.hitTest(_root["vampire" + z])) {
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root["vampire" + z].hit = true;
_root["vampire" + z].health = _root["vampire" + z].health - this.damage;
_root.hits++;
if (_root["vampire" + z].health <= 0) {
_root.kills++;
_root.enemies[z] = 2;
_root["vampire" + z].grenadehit = true;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
}
z++;
}
}
}
Frame 1519
if (_root.gameover) {
trace(_root.levelend._x);
_root.levelend._x = 650;
}
aw1 = false;
aw2 = false;
aw3 = false;
_root.accuracy = int((_root.hits / _root.shotsfired) * 100);
if (isNaN(_root.accuracy)) {
_root.accuracy = 0;
}
if (_root.accuracy >= 100) {
_root.ranking = "A+";
} else if (_root.accuracy >= 90) {
_root.ranking = "A";
} else if (_root.accuracy >= 85) {
_root.ranking = "B+";
} else if (_root.accuracy >= 80) {
_root.ranking = "B";
} else if (_root.accuracy >= 75) {
_root.ranking = "C+";
} else if (_root.accuracy >= 70) {
_root.ranking = "C";
} else if (_root.accuracy >= 65) {
_root.ranking = "D+";
} else if (_root.accuracy >= 60) {
_root.ranking = "D";
} else {
_root.ranking = "F";
}
a1 = "BEST IN SHOW";
a2 = "CLASS CLOWN";
a3 = "GOOD ATTENDANCE";
a4 = "MOST FRIENDLY";
a5 = "MOST ATHLETIC";
a6 = "BEST HANDWRITING";
if (_root.health >= 100) {
if (!aw1) {
award1 = "GOOD DIET";
aw1 = true;
} else if (!aw2) {
award2 = "GOOD DIET";
aw2 = true;
} else if (!aw3) {
award3 = "GOOD DIET";
aw3 = true;
}
}
if (_root.ranking >= 80) {
if (!aw1) {
award1 = "ACCURACY HERO";
aw1 = true;
} else if (!aw2) {
award2 = "ACCURACY HERO";
aw2 = true;
} else if (!aw3) {
award3 = "ACCURACY HERO";
aw3 = true;
}
}
aextra1 = random(6) + 1;
if (aextra1 == 1) {
atext = a1;
} else if (aextra1 == 2) {
atext = a2;
} else if (aextra1 == 3) {
atext = a3;
} else if (aextra1 == 4) {
atext = a4;
} else if (aextra1 == 5) {
atext = a5;
} else if (aextra1 == 6) {
atext = a6;
}
if (!aw1) {
award1 = atext;
aw1 = true;
} else if (!aw2) {
award2 = atext;
aw2 = true;
} else if (!aw3) {
award3 = atext;
aw3 = true;
}
Instance of Symbol 608 MovieClip [level_end] "levelend" in Frame 1519
onClipEvent (load) {
if (_root.gameover) {
this._y = 650;
}
}
Instance of Symbol 861 MovieClip "gameover" in Frame 1519
onClipEvent (load) {
if (_root.gameover) {
this._alpha = 100;
} else {
this._y = 650;
}
}
Frame 1528
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 1528
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Frame 1567
_root.talkbubble(325, 75, 2500, "sir, you probably need to take a look at this!", "talk_face_heli", 200);
Frame 1687
_root.talkbubble(225, 275, 2500, "what now?!", "talk_face_player", 201);
Frame 1867
_root.talkbubble(325, 175, 2500, "something is headed our way.", "talk_face_heli", 200);
Frame 1987
_root.talkbubble(375, 200, 2500, "and whatever it is, it's really big...", "talk_face_heli", 200);
Frame 2197
_root.talkbubble(75, 75, 2500, "something very, very bad is about to happen...", "talk_face_player", 200);
Frame 2437
_root.talkbubble(75, 75, 2500, "mother of god...", "talk_face_player", 200);
Frame 2629
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
lives.text = "LIVES LEFT: " + _global.lives;
stop();
Instance of Symbol 837 MovieClip "fader" in Frame 2629
onClipEvent (enterFrame) {
if ((this._alpha > 0) && (getTimer() > this.fadetimer)) {
this._alpha = this._alpha - 1;
_root.lives._alpha = _root.lives._alpha - 1;
this.fadetimer = getTimer() + 10;
} else {
_root.play();
}
}
Frame 2630
gotonextscene = function () {
gotoAndPlay (2640);
};
gotomainmenu = function () {
gotoAndStop (3);
};
function keyTrap() {
if (player.canmove) {
if (Key.isDown(39)) {
if (this._x < 600) {
this._x = this._x + player.speed;
}
} else if (Key.isDown(37)) {
if (this._x > 0) {
this._x = this._x - player.speed;
}
}
if (Key.isDown(38)) {
}
if (Key.isDown(17)) {
ammodisp = player.ammo;
if (player.ammo >= 1) {
if (player.bulletcount < 8) {
if (getTimer() > this.time) {
if (player.canfire) {
player.ammo--;
z = 0;
while (z <= MAXBULLETS) {
if (bullets[z] == 0) {
_root.shotsfired++;
player.bulletcount++;
bullets[z] = 1;
bulletid = new Object();
bulletid.id = z;
if ((player.sprite % 2) == 0) {
player_mc.attachMovie("gunflash_left", "gf" + z, 300);
} else {
player_mc.attachMovie("gunflash_right", "gf" + z, 300);
}
bullet_mc.duplicateMovieClip("bullet" + player.bulletcount, player.bulletcount, bulletid);
setProperty("bullet" + player.bulletcount, _visible , true);
this.time = getTimer() + 200;
break;
}
z++;
}
}
}
} else {
player.canfire = false;
player.bulletcount = 0;
if (player.sprite == 5) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_right", "player", 0);
player.sprite = 9;
}
if (player.sprite == 6) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_left", "player", 0);
player.sprite = 10;
}
if (player.sprite == 7) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_right", "player", 0);
player.sprite = 11;
}
if (player.sprite == 8) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_left", "player", 0);
player.sprite = 12;
}
}
}
}
if (Key.isDown(32)) {
grenadedisp = player.grenades;
if (((player.grenades >= 1) && (getTimer() > this.gtime)) && (player.canfire)) {
if (player.grenadecount < MAXGRENADES) {
if (grenades[player.grenadecount++] == 0) {
_root.shotsfired++;
player.grenades--;
grenades[player.grenadecount] = 1;
grenadeid = new Object();
grenadeid.id = player.grenadecount;
grenade_mc.duplicateMovieClip("grenade" + player.grenadecount, player.grenadecount, 80 + grenadeid);
this.gtime = getTimer() + 250;
}
} else {
player.grenadecount = 0;
}
}
}
}
}
MAXENEMIES = 3;
MAXBULLETS = 8;
MAXGRENADES = 8;
ENDTIMER = getTimer() + 120000;
KILLS = 0;
LEVELEND = false;
kills = 0;
hits = 0;
shotsfired = 0;
accuracy = 0;
bubblenotify = false;
bubbleammonotify = false;
bubblehealthnotify = false;
numHealth = 0;
numAmmo = 0;
numGrenade = 0;
player = new Object();
health = 100;
player.ammo = 96;
player.grenades = 4;
player._x = 255;
player._y = -80;
player._width = 43.8;
player._height = 63;
player.speed = 5;
player.sprite = 1;
player.canfire = false;
player.canmove = false;
player.candamage = true;
player.reloadframe = 0;
player.bulletcount = 0;
player.grenadecount = 0;
player.apogee = 150;
player.doublejump = false;
player.jumpready = false;
player.velo = 6;
player.xvelo = 4;
bullet_mc._visible = false;
bullets = new Array(16);
enemies = new Array(16);
grenades = new Array(16);
z = 0;
while (z <= 16) {
bullets[z] = 0;
enemies[z] = 0;
grenades[z] = 0;
z++;
}
ammodisp = player.ammo;
grenadedisp = player.grenades;
player_mc.attachMovie("player_stand", "player", 0);
setProperty(player_mc, _x , player._x);
setProperty(player_mc, _y , player._y);
setProperty(player_mc, _width , player._width);
setProperty(player_mc, _height , player._height);
keyWatch = new Object();
keyWatch.onKeyDown = function () {
if (player.canmove) {
if (Key.getCode() == 39) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 13) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_right", "player", 0, mdata);
player.sprite = 13;
}
} else if (player.sprite != 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_right", "player", 0);
player.sprite = 1;
}
}
if (Key.getCode() == 37) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 14) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_left", "player", 0);
player_mc.gotoAndPlay(20);
player.sprite = 14;
}
} else if (player.sprite != 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_left", "player", 0);
player.sprite = 2;
}
}
if (Key.getCode() == 17) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_right", "player", 0);
player.sprite = 5;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_left", "player", 0);
player.sprite = 6;
}
}
if (Key.getCode() == 32) {
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_right", "player", 0);
player.sprite = 15;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_left", "player", 0);
player.sprite = 16;
}
}
if (Key.getCode() == 38) {
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_right", "player", 0);
player.sprite = 13;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_left", "player", 0);
player.sprite = 14;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
}
}
};
keyWatch.onKeyUp = function () {
if (player.canmove) {
if ((Key.getCode() == 39) || (Key.getCode() == 37)) {
if (!Key.isDown(39)) {
if (!Key.isDown(37)) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
}
if (Key.getCode() == 17) {
player.canfire = true;
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
if (Key.getCode() == 38) {
if (!player.doublejump) {
player.doublejump = true;
player.jumpready = true;
}
}
if (Key.getCode() == 32) {
player.canfire = true;
if (((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) || (player.sprite == 15)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) || (player.sprite == 16)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
};
Key.addListener(keyWatch);
player.reloaded = function () {
player.canfire = true;
if (player.sprite == 9) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 10) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
if (player.sprite == 11) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 12) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
};
player_mc.onEnterFrame = keyTrap;
enemydead = function (num) {
if (!_root.LEVELEND) {
numEnemy--;
makeenemy();
}
};
makeenemy = function () {
z = 0;
while (z <= MAXENEMIES) {
if (enemies[z] == 0) {
position = new Object();
if (random(10) < 5) {
position._x = -50;
} else {
position._x = 650;
}
vampire_mc.duplicateMovieClip("vampire" + z, z + 100, position);
_root["vampire" + z].id = z;
enemies[z] = 1;
numEnemy++;
return;
}
z++;
}
};
endLevel = function () {
gotoAndPlay (2631);
};
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
poweruphealth = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_health.duplicateMovieClip("h" + layer, layer, pos);
};
powerupammo = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_ammo.duplicateMovieClip("a" + layer, layer, pos);
};
powerupgrenade = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_grenade.duplicateMovieClip("g" + layer, layer, pos);
};
playerdied = function () {
trace("died - " + _global.lives);
if (_global.lives > 1) {
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
_global.lives--;
gotoAndPlay (2629);
} else {
this.gameover = true;
gotoAndStop (2631);
}
};
stop();
Instance of Symbol 669 MovieClip [player] "player_mc" in Frame 2630
onClipEvent (enterFrame) {
if ((_root.health <= 0) && (getTimer() > _root.player.deadtime)) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player.canmove = false;
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
_root.fader._alpha++;
if (_root.player_mc._alpha <= 0) {
_root.playerdied();
_root.ENDTIMER = getTimer();
_root.player_mc.removeMovieClip();
}
}
if (getTimer() >= _root.ENDTIMER) {
if (!this.endcalled) {
_root.endLevel();
this.endcalled = true;
}
if (_root.helicopter.inplace && (!_root.helicopter.out)) {
if (_root.player_mc._y >= _root.player._y) {
if (_root.player_mc._x < (_root.helicopter._x - 45)) {
if (_root.player.sprite != 3) {
_root.player_mc.attachMovie("player_run_right", "player", 0);
_root.player.sprite = 3;
}
} else if (_root.player.sprite != 4) {
_root.player_mc.attachMovie("player_run_left", "player", 0);
_root.player.sprite = 4;
}
}
if (!((_root.player_mc._x > (_root.helicopter._x - 60)) && (_root.player_mc._x < (_root.helicopter._x - 15)))) {
if (_root.player_mc._x < (_root.helicopter._x - 45)) {
_root.player_mc._x = _root.player_mc._x + 5;
} else {
_root.player_mc._x = _root.player_mc._x - 5;
}
}
if (((_root.player_mc._x > (_root.helicopter._x - 60)) && (_root.player_mc._x < (_root.helicopter._x - 15))) && (_root.player_mc._y >= _root.player._y)) {
_root.player.landed = true;
_root.helicopter.yvelo = 6;
_root.helicopter.out = true;
this.unloadMovie();
}
}
} else {
timeleft = _root.ENDTIMER - getTimer();
if ((timeleft < 119500) && (!beginnotify)) {
_root.helicopter.active = true;
_root.talkbubble(200, 125, 2500, "be careful, it's using military power armor!", "talk_face_chief", 200);
beginnotify = true;
}
}
if (_root.health < 25) {
if (_root.bubblehealthnotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: health is low!", "talk_face_alert", 203);
_root.bubblehealthnotify = true;
}
if (getTimer() > healthnotify) {
_root.healthd._visible = false;
healthnotify = getTimer() + 500;
} else {
_root.healthd._visible = true;
}
}
if (_root.health <= 0) {
_root.player.canmove = false;
_root.player.candamage = false;
_root.player.canfire = false;
_root.player.health = 0;
if (getTimer() > _root.player.deadtime) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
if (_root.player_mc._alpha <= 0) {
_root.player_mc.removeMovieClip();
}
}
}
if (((_root.player.sprite == 13) || (_root.player.sprite == 14)) || (_root.player.jumpready)) {
_root.player.canfire = false;
if (_root.player.grenadehit) {
if (_root.player.sprite == 13) {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation - 5;
if (this._x > 0) {
this._x = this._x - _root.player.xvelo;
}
} else {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation + 5;
if (this._x < 600) {
this._x = this._x + _root.player.xvelo;
}
}
}
if (_root.player.jumpready) {
if (_root.player.velo > 0.05) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo - ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y - _root.player.velo;
} else {
_root.player.jumpready = false;
_root.player.apogeereached = true;
}
} else if (_root.player.apogeereached) {
if (_root.player.grenadehit) {
_root.player.grenadehit = false;
_root.player.realign = true;
}
if (_root.player.realign) {
if (this._rotation != 0) {
if (_root.player.sprite == 13) {
this._rotation = this._rotation - 5;
} else {
this._rotation = this._rotation + 5;
}
} else {
this._rotation = 0;
_root.player.realgin = false;
}
}
if ((_root.player_mc._y < _root.player._y) && (_root.player.apogeereached)) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo + ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y + _root.player.velo;
_root.player.landed = false;
} else if ((_root.player_mc._y >= _root.player._y) && (_root.player.apogeereached)) {
_root.player_mc._y = _root.player._y;
_root.player.apogeereached = false;
_root.player.landed = true;
}
} else if (_root.player.landed) {
_root.player.xvelo = 1 + random(10);
this._rotation = 0;
_root.player.landed = false;
_root.player.canfire = true;
_root.player.doublejump = true;
if (_root.player.sprite == 13) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_right", "player", 0);
_root.player.sprite = 3;
}
if (_root.player.sprite == 14) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_left", "player", 0);
_root.player.sprite = 4;
}
}
}
}
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 2630
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Instance of Symbol 623 MovieClip [powerup_ammo] "powerup_ammo" in Frame 2630
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.ammo = 32;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_ammo) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.ammo < (999 - this.ammo)) {
_root.player.ammo = _root.player.ammo + this.ammo;
} else {
_root.player.ammo = 999;
}
_root.ammodisp = _root.player.ammo;
this.removeMovieClip();
}
}
}
Instance of Symbol 621 MovieClip [powerup_grenade] "powerup_grenade" in Frame 2630
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.grenades = 4;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_grenade) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.grenades < (999 - this.grenades)) {
_root.player.grenades = _root.player.grenades + this.grenades;
} else {
_root.player.grenades = 999;
}
_root.grenadedisp = _root.player.grenades;
this.removeMovieClip();
}
}
}
Instance of Symbol 619 MovieClip [powerup_health] "powerup_health" in Frame 2630
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.health = 25;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_health) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.health < (100 - this.health)) {
_root.health = _root.health + this.health;
} else {
_root.health = 100;
}
this.removeMovieClip();
}
}
}
Instance of Symbol 907 MovieClip "smoke" in Frame 2630
onClipEvent (load) {
this._alpha = 100;
}
onClipEvent (enterFrame) {
if (this._alpha > 0) {
this._alpha--;
} else {
this.removeMovieClip();
}
this._y--;
}
Instance of Symbol 682 MovieClip [vampireclip] "robot_mc" in Frame 2630
onClipEvent (load) {
this.attachMovie("robot_walk_right", "r1", 0);
this._width = 130;
this._height = 146;
this._x = -125;
this._y = 257;
this.dir = 1;
this.fire = false;
this.yvelo = 3;
this.xvelo = 1 + random(4);
this.spin = 5;
this.speed = 3;
this.MAXBULLETS = 8;
this.bullets = Array(this.MAXBULLETS);
this.bulletcounter = 1;
this.bulletwaittime = 700;
x = 0;
while (x < this.MAXBULLETS) {
this.bullets[x] = 0;
x++;
}
this.armor = 2000;
switch (_global.difficulty) {
case 1 :
this.speed = 2;
this.armor = 2000;
break;
case 2 :
this.speed = 3 + random(2);
this.armor = 2500;
break;
case 3 :
this.speed = 4 + random(3);
this.armor = 3000;
}
}
onClipEvent (enterFrame) {
if (this.active) {
_root.timer = this.armor;
if ((this.armor <= 1800) && (!this.wave0)) {
_root.talkbubble(375, 25, 5000, "analyze its strategy and find a weak point!", "talk_face_chief", 200);
this.wave0 = true;
}
if ((this.armor <= 1500) && (!this.wave1)) {
_root.powerupammo(random(600), 320, 50 + random(10));
this.wave1 = true;
this.MAXBULLETS++;
}
if ((this.armor <= 1000) && (!this.wave2)) {
_root.poweruphealth(random(600), 320, 50 + random(10));
this.wave2 = true;
this.bulletwaittime = 500;
this.MAXBULLETS++;
this.speed = this.speed + 1;
this.yvelo = 1;
}
if ((this.armor <= 500) && (!this.wave3)) {
_root.powerupgrenade(random(600), 320, 50 + random(10));
this.MAXBULLETS++;
this.wave3 = true;
this.speed = this.speed + 1;
}
if (this.armor <= 0) {
if (dir == 1) {
this.attachMovie("robot_explode_right", "r1", 0);
} else {
this.attachMovie("robot_explode_left", "r1", 0);
}
pos = new Object();
pos._x = this._x;
pos._y = this._y;
_root.smoke.duplicateMovieClip("sm1", 0, pos);
_root.kills = 1;
this.active = false;
this.explode = true;
}
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - random(5);
this.playerhittime = getTimer() + 100;
}
if (this.fire) {
if (getTimer() < this.firetime) {
if (this.bulletcounter <= this.MAXBULLETS) {
if (getTimer() > this.bullettimer) {
pos = new Object();
pos.dir = this.dir;
pos._x = this._x;
pos._y = this._y + 5;
pos.dy = _root.player_mc._y;
pos.xvelo = 10.8;
pos.yvelo = 0.5;
this.bullets[bulletcounter - 1] = 1;
_root.robotbullet.duplicateMovieClip("rb" + this.bulletcounter, 30 + this.bulletcounter, pos);
this.bullettimer = getTimer() + this.bulletwaittime;
this.bulletcounter++;
}
}
} else {
this.fire = false;
this.bulletcounter = 0;
if (this.dir == 1) {
this.attachMovie("robot_walk_right", "r1", 0);
} else {
this.attachMovie("robot_walk_left", "r1", 0);
}
}
if ((this.dir == 1) && (this.sprite != 3)) {
this.removeMovieClip();
this.attachMovie("robot_shoot_right", "r1", 0);
this.sprite = 3;
} else if ((this.dir == 2) && (this.sprite != 4)) {
this.removeMovieClip();
this.attachMovie("robot_shoot_left", "r1", 0);
this.sprite = 4;
}
} else {
if ((this._x <= 50) && (this.dir != 1)) {
this.dir = 1;
this.firetime = getTimer() + 3000;
this.fire = true;
} else if ((this._x >= 550) && (this.dir != 2)) {
this.dir = 2;
this.firetime = getTimer() + 3000;
this.fire = true;
}
if (this.dir == 1) {
this._x = this._x + this.speed;
} else {
this._x = this._x - this.speed;
}
}
}
if (this.explode) {
if (this.ecount < 30) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(100);
} else {
pos._x = -random(100);
}
pos._y = -random(100);
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp" + this.ecount, 20 + this.ecount, pos);
} else {
this.attachMovie("explosion_2", "exp" + this.ecount, 20 + this.ecount, pos);
}
this.ecount++;
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
} else {
_root.gameover = false;
_root.player_mc._x = -50;
_root.player.canmove = false;
_root.player.canfire = false;
_root.endLevel();
}
}
}
Instance of Symbol 883 MovieClip "helicopter" in Frame 2630
onClipEvent (load) {
this.yvelo = 9;
this.xvelo = 10;
this.active = false;
this.inplace = false;
this.out = false;
this._rotation = -10;
}
onClipEvent (enterFrame) {
if (this.active) {
if (_this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this._y < 200) {
if ((this._rotation < 0) && (this._x < 500)) {
this._rotation++;
}
} else if (this._rotation < 5) {
this._rotation++;
}
if (this._x >= 315) {
this._x = this._x - this.xvelo;
if (this._y <= 300) {
this._y = this._y + this.yvelo;
}
this.outTime = getTimer() + 1500;
} else if (getTimer() < this.outTime) {
if (this._rotation > 1) {
this._rotation--;
}
if (!this.talk) {
_root.talkbubble(200, 125, 2500, "have a good time!", "talk_face_heli", 201);
this.talk = true;
_root.player_mc._y = 299;
_root.player._y = 299;
}
} else {
_root.player.canmove = true;
_root.player.canfire = true;
this.inplace = true;
this.active = false;
this.yvelo = 9;
this.xvelo = 10;
this.out = true;
}
}
if (this.out) {
if (this._x >= -150) {
if (_this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this._rotation > -25) {
this._rotation--;
}
this._y = this._y - this.yvelo;
this._x = this._x - this.xvelo;
} else {
_root.robot_mc.active = true;
this.unloadMovie();
}
}
}
Instance of Symbol 518 MovieClip [robot_bullet] "robotbullet" in Frame 2630
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (this != _root.robotbullet) {
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - (8 + random(5));
this.playerhittime = getTimer() + 1;
this.removeMovieClip();
}
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
} else if (this.dir == 2) {
this._x = this._x - this.xvelo;
}
if (this._y > this.dy) {
this._y = this._y - this.yvelo;
} else if (this._y < this.dy) {
this._y = this._y + this.yvelo;
}
if ((this._x < 0) || (this._x > 600)) {
this.removeMovieClip();
}
}
}
Instance of Symbol 616 MovieClip [bullet] "bullet_mc" in Frame 2630
onClipEvent (load) {
this.damage = 25;
this._y = _root.player_mc._y - 15;
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
this._x = _root.player_mc._x + 35;
this.dir = 1;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
this._x = _root.player_mc._x - 35;
this.dir = 2;
}
}
onClipEvent (enterFrame) {
if (_root.player.ammo < 16) {
if (_root.bubbleammonotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: ammo is low!", "talk_face_alert", 202);
_root.bubbleammonotify = true;
}
if (getTimer() > ammonotify) {
_root.ammod._visible = false;
ammonotify = getTimer() + 500;
} else {
_root.ammod._visible = true;
}
}
if (this != _root.bullet_mc) {
if (this.dir == 1) {
this._x = this._x + 30;
if (this._x > 600) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
if (this.dir == 2) {
this._x = this._x - 30;
if (this._x < 0) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
i = 0;
while (i <= _root.MAXBULLETS) {
if (_root.bullets[i] != 0) {
if (this.hitTest(_root.robot_mc)) {
_root.hits++;
if (_root.robot_mc.blayer < 5) {
_root.robot_mc.blayer++;
} else {
_root.robot_mc.blayer = 1;
}
blooddepth = "blood" + _root.robot_mc.blayer;
position = new Object();
position._x = -random(45);
position._y = -random(70);
_root.robot_mc.attachMovie("sparks", blooddepth, _root.robot_mc.blayer, position);
_root.robot_mc.hit = true;
_root.robot_mc.armor = _root.robot_mc.armor - this.damage;
_root.bullets[i] = 0;
this.removeMovieClip();
}
}
i++;
}
}
}
Instance of Symbol 614 MovieClip [grenade] "grenade_mc" in Frame 2630
onClipEvent (load) {
if (this != _root.grenade_mc) {
this.damage = 10;
this.xvelo = 8 + random(2);
this.yvelo = 1 + random(3);
this.apogeereached = false;
this.ecount = 0;
this.etime = 0;
this.explode = false;
this.bubblenotify = false;
this._y = _root.player_mc._y + 5;
if (((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) || (_root.player.sprite == 15)) {
this._x = _root.player_mc._x;
this.dir = 1;
}
if (((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) || (_root.player.sprite == 16)) {
this._x = _root.player_mc._x;
this.dir = 2;
}
}
}
onClipEvent (enterFrame) {
if (_root.player.grenades <= 2) {
if (_root.bubblenotify == false) {
_root.bubblenotify = true;
_root.talkbubble(5, 25, 2500, "WARNING: grenades are low!", "talk_face_alert", 201);
}
if (getTimer() > grenadenotify) {
_root.grenaded._visible = false;
grenadenotify = getTimer() + 500;
} else {
_root.grenaded._visible = true;
}
}
if (this.explode && (getTimer() > this.etime)) {
if (!this.area1down) {
pos = new Object();
pos._x = this._x;
pos._y = this._y;
_root.explosion_mc.duplicateMovieClip("exparea" + id, 0, pos);
this.area1down = true;
}
if (this.ecount < 8) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(75);
} else {
pos._x = -random(75);
}
pos._y = -random(50);
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp" + this.ecount, this.ecount, pos);
} else {
this.attachMovie("explosion_2", "exp" + this.ecount, this.ecount, pos);
}
this.ecount++;
if (getTimer() > this.rtime) {
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp22", 22);
} else {
this.attachMovie("explosion_2", "exp22", 22);
}
this.rtime = getTimer() + 100;
}
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
} else if (getTimer() > this.otime) {
this.explode = false;
this.removeMovieClip();
}
}
if (this != _root.grenade_mc) {
if (!this.explode) {
if (this.hitTest(_root.robot_mc)) {
_root.grenades[id] = 0;
this.xvelo = 0;
this.yvelo = 0;
this.explode = true;
}
if (this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.08 * Math.abs(this.xvelo)) / this.xvelo);
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this._y >= 330) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
if (this._x > 600) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
if (this.dir == 2) {
this._x = this._x - this.xvelo;
if (this._x < 0) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
}
}
}
Instance of Symbol 612 MovieClip [explosion_area_1] "explosion_mc" in Frame 2630
onClipEvent (load) {
this.damage = 100;
this._alpha = 100;
this.playerhittime = 0;
}
onClipEvent (enterFrame) {
if (this._alpha >= 10) {
this._alpha = this._alpha - 10;
}
if (this != _root.explosion_mc) {
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
_root.player_mc.attachMovie("player_jump_right", "player", 0);
_root.player.sprite = 13;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
_root.player_mc.attachMovie("player_jump_left", "player", 0);
_root.player.sprite = 14;
}
_root.player.canfire = false;
_root.player.jumpready = true;
_root.player.grenadehit = true;
_root.health--;
this.playerhittime = getTimer() + 100;
}
if (this.hitTest(_root.robot_mc)) {
_root.hits++;
if (_root.robot_mc.blayer < 5) {
_root.robot_mc.blayer++;
} else {
_root.robot_mc.blayer = 1;
}
blooddepth = "blood" + _root.robot_mc.blayer;
position = new Object();
position._x = -random(45);
position._y = -random(70);
_root.robot_mc.attachMovie("sparks", blooddepth, _root.robot_mc.blayer, position);
_root.robot_mc.hit = true;
_root.robot_mc.armor = _root.robot_mc.armor - this.damage;
this.removeMovieClip();
}
}
}
Frame 2631
if (_root.gameover) {
trace(_root.levelend._x);
_root.levelend._x = 650;
}
aw1 = false;
aw2 = false;
aw3 = false;
_root.accuracy = int((_root.hits / _root.shotsfired) * 100);
if (isNaN(_root.accuracy)) {
_root.accuracy = 0;
}
if (_root.accuracy >= 100) {
_root.ranking = "A+";
} else if (_root.accuracy >= 90) {
_root.ranking = "A";
} else if (_root.accuracy >= 85) {
_root.ranking = "B+";
} else if (_root.accuracy >= 80) {
_root.ranking = "B";
} else if (_root.accuracy >= 75) {
_root.ranking = "C+";
} else if (_root.accuracy >= 70) {
_root.ranking = "C";
} else if (_root.accuracy >= 65) {
_root.ranking = "D+";
} else if (_root.accuracy >= 60) {
_root.ranking = "D";
} else {
_root.ranking = "F";
}
a1 = "BEST IN SHOW";
a2 = "CLASS CLOWN";
a3 = "GOOD ATTENDANCE";
a4 = "MOST FRIENDLY";
a5 = "MOST ATHLETIC";
a6 = "BEST HANDWRITING";
if (_root.health >= 100) {
if (!aw1) {
award1 = "GOOD DIET";
aw1 = true;
} else if (!aw2) {
award2 = "GOOD DIET";
aw2 = true;
} else if (!aw3) {
award3 = "GOOD DIET";
aw3 = true;
}
}
if (_root.ranking >= 80) {
if (!aw1) {
award1 = "ACCURACY HERO";
aw1 = true;
} else if (!aw2) {
award2 = "ACCURACY HERO";
aw2 = true;
} else if (!aw3) {
award3 = "ACCURACY HERO";
aw3 = true;
}
}
aextra1 = random(6) + 1;
if (aextra1 == 1) {
atext = a1;
} else if (aextra1 == 2) {
atext = a2;
} else if (aextra1 == 3) {
atext = a3;
} else if (aextra1 == 4) {
atext = a4;
} else if (aextra1 == 5) {
atext = a5;
} else if (aextra1 == 6) {
atext = a6;
}
if (!aw1) {
award1 = atext;
aw1 = true;
} else if (!aw2) {
award2 = atext;
aw2 = true;
} else if (!aw3) {
award3 = atext;
aw3 = true;
}
Instance of Symbol 608 MovieClip [level_end] "levelend" in Frame 2631
onClipEvent (load) {
if (_root.gameover) {
this._y = 650;
}
}
Instance of Symbol 861 MovieClip "gameover" in Frame 2631
onClipEvent (load) {
if (_root.gameover) {
this._alpha = 100;
} else {
this._y = 650;
}
}
Frame 2640
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
_root.talkbubble(25, 15, 1500, "here is a map of the area.", "talk_face_chief", 200);
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 2640
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Frame 2739
_root.talkbubble(25, 15, 2500, "the vampires have established a base in the city.", "talk_face_chief", 200);
Frame 2859
_root.talkbubble(25, 15, 2500, "they're operating out of an old denny's restaurant.", "talk_face_chief", 200);
Frame 2979
_root.talkbubble(375, 15, 3500, "i better get there as soon as possible.", "talk_face_player", 201);
Frame 3179
_root.talkbubble(275, 25, 5000, "he's on his way. don't fail me again.", "talk_face_chief", 201);
Frame 3615
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
lives.text = "LIVES LEFT: " + _global.lives;
stop();
Instance of Symbol 837 MovieClip "fader" in Frame 3615
onClipEvent (enterFrame) {
if ((this._alpha > 0) && (getTimer() > this.fadetimer)) {
this._alpha = this._alpha - 1;
_root.lives._alpha = _root.lives._alpha - 1;
this.fadetimer = getTimer() + 10;
} else {
_root.play();
}
}
Frame 3616
gotonextscene = function () {
gotoAndPlay (3627);
};
gotomainmenu = function () {
gotoAndStop (3);
};
function keyTrap() {
if (player.canmove) {
if (Key.isDown(39)) {
if (this._x < 600) {
this._x = this._x + player.speed;
}
} else if (Key.isDown(37)) {
if (this._x > 0) {
this._x = this._x - player.speed;
}
}
if (Key.isDown(38)) {
}
if (Key.isDown(17)) {
ammodisp = player.ammo;
if (player.ammo >= 1) {
if (player.bulletcount < 8) {
if (getTimer() > this.time) {
if (player.canfire) {
player.ammo--;
z = 0;
while (z <= MAXBULLETS) {
if (bullets[z] == 0) {
shotsfired++;
player.bulletcount++;
bullets[z] = 1;
bulletid = new Object();
bulletid.id = z;
if ((player.sprite % 2) == 0) {
player_mc.attachMovie("gunflash_left", "gf" + z, 300);
} else {
player_mc.attachMovie("gunflash_right", "gf" + z, 300);
}
bullet_mc.duplicateMovieClip("bullet" + player.bulletcount, player.bulletcount, bulletid);
setProperty("bullet" + player.bulletcount, _visible , true);
this.time = getTimer() + 200;
break;
}
z++;
}
}
}
} else {
player.canfire = false;
player.bulletcount = 0;
if (player.sprite == 5) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_right", "player", 0);
player.sprite = 9;
}
if (player.sprite == 6) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_left", "player", 0);
player.sprite = 10;
}
if (player.sprite == 7) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_right", "player", 0);
player.sprite = 11;
}
if (player.sprite == 8) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_left", "player", 0);
player.sprite = 12;
}
}
}
}
if (Key.isDown(32)) {
grenadedisp = player.grenades;
if (((player.grenades >= 1) && (getTimer() > this.gtime)) && (player.canfire)) {
if (player.grenadecount < MAXGRENADES) {
if (grenades[player.grenadecount++] == 0) {
shotsfired++;
player.grenades--;
grenades[player.grenadecount] = 1;
grenadeid = new Object();
grenadeid.id = player.grenadecount;
grenade_mc.duplicateMovieClip("grenade" + player.grenadecount, player.grenadecount, 80 + grenadeid);
this.gtime = getTimer() + 250;
}
} else {
player.grenadecount = 0;
}
}
}
}
}
MAXENEMIES = 7;
MAXBULLETS = 8;
MAXGRENADES = 8;
ENDTIMER = getTimer() + 120000;
KILLS = 0;
LEVELEND = false;
gameover = false;
kills = 0;
hits = 0;
shotsfired = 0;
accuracy = 0;
bubblenotify = false;
bubbleammonotify = false;
bubblehealthnotify = false;
numHealth = 0;
numAmmo = 0;
numGrenade = 0;
player = new Object();
health = 100;
player.ammo = 96;
player.grenades = 4;
player._x = _root.truck._x;
player._y = 210;
player._width = 43.8;
player._height = 63;
player.speed = 5;
player.sprite = 1;
player.canfire = false;
player.canmove = false;
player.candamage = true;
player.reloadframe = 0;
player.bulletcount = 0;
player.grenadecount = 0;
player.apogee = 150;
player.doublejump = false;
player.jumpready = false;
player.velo = 4;
player.xvelo = 4;
player.activetruck = 1;
bullet_mc._visible = false;
bullets = new Array(16);
enemies = new Array(16);
grenades = new Array(16);
z = 0;
while (z <= 16) {
bullets[z] = 0;
enemies[z] = 0;
grenades[z] = 0;
z++;
}
ammodisp = player.ammo;
grenadedisp = player.grenades;
player_mc.attachMovie("player_stand", "player", 0);
setProperty(player_mc, _x , player._x);
setProperty(player_mc, _y , player._y);
setProperty(player_mc, _width , player._width);
setProperty(player_mc, _height , player._height);
keyWatch = new Object();
keyWatch.onKeyDown = function () {
if (player.canmove) {
if (Key.getCode() == 39) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 13) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_right", "player", 0, mdata);
player.sprite = 13;
}
} else if (player.sprite != 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_right", "player", 0);
player.sprite = 1;
}
}
if (Key.getCode() == 37) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 14) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_left", "player", 0);
player_mc.gotoAndPlay(20);
player.sprite = 14;
}
} else if (player.sprite != 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_left", "player", 0);
player.sprite = 2;
}
}
if (Key.getCode() == 17) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_right", "player", 0);
player.sprite = 5;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_left", "player", 0);
player.sprite = 6;
}
}
if (Key.getCode() == 32) {
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_right", "player", 0);
player.sprite = 15;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_left", "player", 0);
player.sprite = 16;
}
}
if (Key.getCode() == 38) {
if (_root.player_mc._y <= (_root.truck._y - 10)) {
player.falling = false;
}
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_right", "player", 0);
player.sprite = 13;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_left", "player", 0);
player.sprite = 14;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
}
}
};
keyWatch.onKeyUp = function () {
if (player.canmove) {
if ((Key.getCode() == 39) || (Key.getCode() == 37)) {
if (!Key.isDown(39)) {
if (!Key.isDown(37)) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
}
if (Key.getCode() == 17) {
player.canfire = true;
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
if (Key.getCode() == 38) {
if (!player.doublejump) {
player.doublejump = true;
player.jumpready = true;
}
}
if (Key.getCode() == 32) {
player.canfire = true;
if (((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) || (player.sprite == 15)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) || (player.sprite == 16)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
};
Key.addListener(keyWatch);
player.reloaded = function () {
player.canfire = true;
if (player.sprite == 9) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 10) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
if (player.sprite == 11) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 12) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
};
player_mc.onEnterFrame = keyTrap;
enemydead = function (num) {
if (!_root.LEVELEND) {
numEnemy--;
makeenemy();
}
};
makeenemy = function () {
z = 0;
while (z <= MAXENEMIES) {
if (enemies[z] == 0) {
position = new Object();
if (random(10) < 5) {
position._x = -50;
} else {
position._x = 650;
}
vampire_mc.duplicateMovieClip("vampire" + z, z + 100, position);
_root["vampire" + z].id = z;
enemies[z] = 1;
numEnemy++;
return;
}
z++;
}
};
endLevel = function () {
z = 0;
while (z <= MAXENEMIES) {
_root["vampire" + z].removeMovieClip();
z++;
}
_root.LEVELEND = true;
player.canmove = false;
player.canfire = false;
player.candamage = false;
gotoAndPlay (3617);
};
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
poweruphealth = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_health.duplicateMovieClip("h" + layer, layer, pos);
};
powerupammo = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_ammo.duplicateMovieClip("a" + layer, layer, pos);
};
powerupgrenade = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_grenade.duplicateMovieClip("g" + layer, layer, pos);
};
nextLevel = function () {
};
playerdied = function () {
trace("died - " + _global.lives);
if (_global.lives > 1) {
z = 0;
while (z <= 16) {
removeMovieClip("vampire" + z);
z++;
}
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
_global.lives--;
gotoAndPlay (3615);
} else {
this.gameover = true;
gotoAndStop (3617);
}
};
numEnemy = 3;
i = 0;
while (i < numEnemy) {
vampire_mc.duplicateMovieClip("vampire" + i, i + 100);
_root["vampire" + i].id = i;
enemies[i] = 1;
i++;
}
stop();
Instance of Symbol 669 MovieClip [player] "player_mc" in Frame 3616
onClipEvent (enterFrame) {
if ((_root.health <= 0) && (getTimer() > _root.player.deadtime)) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player.canmove = false;
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
_root.fader._alpha++;
if (_root.player_mc._alpha <= 0) {
_root.playerdied();
_root.ENDTIMER = getTimer();
_root.player_mc.removeMovieClip();
}
}
if (getTimer() >= _root.ENDTIMER) {
if (!this.endcalled) {
_root.endLevel();
this.endcalled = true;
}
} else {
timeleft = _root.ENDTIMER - getTimer();
_root.timer = timeleft;
if ((timeleft < 119500) && (!beginnotify)) {
_root.truck.active = true;
_root.makeenemy();
_root.talkbubble(200, 125, 5000, "you're a few miles away. just try to stay alive!", "talk_face_chief", 200);
beginnotify = true;
}
if ((timeleft <= 94500) && (!tr1)) {
x = 0;
while (x < 3) {
_root.makeenemy();
x++;
}
tr1 = true;
}
if ((timeleft <= 79000) && (!tr4)) {
_root.talkbubble(375, 25, 5000, "keep those vampires away from the truck!", "talk_face_pilot", 200);
tr4 = true;
_root.makeenemy();
}
if ((timeleft <= 60000) && (!wave1)) {
_root.powerupammo(random(600), 200, 50 + random(10));
_root.powerupammo(random(600), 200, 50 + random(10));
wave1 = true;
_root.makeenemy();
_root.makeenemy();
} else if ((timeleft <= 50000) && (!wave2)) {
wave2 = true;
_root.makeenemy();
} else if ((timeleft <= 30000) && (!tr6)) {
_root.talkbubble(375, 25, 5000, "i'm sending you some ammo!", "talk_face_chief", 200);
_root.powerupammo(random(600), 200, 50 + random(10));
_root.powerupammo(random(600), 200, 50 + random(10));
tr6 = true;
_root.makeenemy();
} else if ((timeleft <= 15000) && (!wave3)) {
_root.talkbubble(200, 125, 5000, "almost there!", "talk_face_pilot", 200);
_root.makeenemy();
_root.makeenemy();
wave3 = true;
}
}
if (_root.health < 25) {
if (_root.bubblehealthnotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: health is low!", "talk_face_alert", 203);
_root.bubblehealthnotify = true;
}
if (getTimer() > healthnotify) {
_root.healthd._visible = false;
healthnotify = getTimer() + 500;
} else {
_root.healthd._visible = true;
}
}
if (_root.player.activetruck == 0) {
if (_root.player_mc._y >= _root.player._y) {
if (!_root.player.fallspriteset) {
if ((_root.player.sprite % 2) == 0) {
_root.player.sprite = 13;
} else {
_root.player.sprite = 14;
}
_root.player.fallspriteset = true;
_root.player.falling = true;
_root.player.apogeereached = true;
}
}
}
if (((_root.player.sprite == 13) || (_root.player.sprite == 14)) || (_root.player.jumpready)) {
_root.player.canfire = false;
if (_root.player.grenadehit) {
if (_root.player.sprite == 13) {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation - 5;
if (this._x > 0) {
this._x = this._x - _root.player.xvelo;
}
} else {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation + 5;
if (this._x < 600) {
this._x = this._x + _root.player.xvelo;
}
}
}
if (_root.player.jumpready) {
if (_root.player.velo > 0.05) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo - ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y - _root.player.velo;
} else {
_root.player.jumpready = false;
_root.player.apogeereached = true;
}
} else if (_root.player.apogeereached) {
if (_root.player.grenadehit) {
_root.player.grenadehit = false;
_root.player.realign = true;
}
if (_root.player.realign) {
if (this._rotation != 0) {
if (_root.player.sprite == 13) {
this._rotation = this._rotation - 5;
} else {
this._rotation = this._rotation + 5;
}
} else {
this._rotation = 0;
_root.player.realgin = false;
}
}
if (!_root.player.falling) {
if ((_root.player_mc._y < _root.player._y) && (_root.player.apogeereached)) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo + ((0.3 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y + Math.abs(_root.player.velo);
_root.player.landed = false;
} else if ((_root.player_mc._y >= _root.player._y) && (_root.player.apogeereached)) {
trace("land - " + _root.player.landed);
_root.player_mc._y = _root.player._y;
_root.player.apogeereached = false;
_root.player.fallspriteset = false;
_root.player.landed = true;
}
} else if (_root.player_mc._y < 330) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo + ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y + Math.abs(_root.player.velo);
} else if (_root.player_mc._y >= 330) {
if ((_root.health > 0) && (_root.player.candamage)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - 5;
this.hittime = getTimer() + 250;
}
_root.player.falling = false;
_root.player.jumpready = true;
_root.player.grenadehit = true;
_root.player.velo = 7;
}
} else if (_root.player.landed) {
trace("reset");
_root.player.xvelo = 1 + random(10);
_root.player.velo = 4;
this._rotation = 0;
_root.player.landed = false;
_root.player.canfire = true;
_root.player.doublejump = true;
if (_root.player.sprite == 13) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_right", "player", 0);
_root.player.sprite = 3;
}
if (_root.player.sprite == 14) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_left", "player", 0);
_root.player.sprite = 4;
}
}
}
}
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 3616
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Instance of Symbol 623 MovieClip [powerup_ammo] "powerup_ammo" in Frame 3616
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.ammo = 32;
}
onClipEvent (enterFrame) {
this._y = this._y - 0.25;
if (this != _root.powerup_ammo) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.ammo < (999 - this.ammo)) {
_root.player.ammo = _root.player.ammo + this.ammo;
} else {
_root.player.ammo = 999;
}
_root.ammodisp = _root.player.ammo;
this.removeMovieClip();
}
}
}
Instance of Symbol 621 MovieClip [powerup_grenade] "powerup_grenade" in Frame 3616
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.grenades = 4;
}
onClipEvent (enterFrame) {
this._y = this._y - 0.25;
if (this != _root.powerup_grenade) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.grenades < (999 - this.grenades)) {
_root.player.grenades = _root.player.grenades + this.grenades;
} else {
_root.player.grenades = 999;
}
_root.grenadedisp = _root.player.grenades;
this.removeMovieClip();
}
}
}
Instance of Symbol 619 MovieClip [powerup_health] "powerup_health" in Frame 3616
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.health = 25;
}
onClipEvent (enterFrame) {
this._y = this._y - 0.25;
if (this != _root.powerup_health) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.health < (100 - this.health)) {
_root.health = _root.health + this.health;
} else {
_root.health = 100;
}
this.removeMovieClip();
}
}
}
Instance of Symbol 682 MovieClip [vampireclip] "vampire_mc" in Frame 3616
onClipEvent (load) {
if (this != _root.vampire_mc) {
if (_root.player_mc._x >= this._x) {
this.attachMovie("vampire_run_right", "vampire", 0);
this.sprite = 1;
this.dir = 1;
} else {
this.attachMovie("vampire_run_left", "vampire", 0);
this.sprite = 2;
this.dir = 2;
}
this._width = 58;
this._height = 73.5;
this._y = 293;
this.speed = 5 + random(2);
this.hit = false;
this.health = 100;
this.blayer = 1;
this.xvelo = 1 + random(4);
this.spin = 1 + random(10);
this.powerup = false;
this.jump = false;
switch (_global.difficulty) {
case 1 :
this.speed = 4;
this.damage = 2;
break;
case 2 :
this.speed = 4 + random(3);
this.damage = 3;
break;
case 3 :
this.speed = 4 + random(3);
this.damage = 3;
}
}
}
onClipEvent (enterFrame) {
if (this != _root.vampire_mc) {
if (!this.hit) {
if (this.jump) {
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this.xvelo > 0) {
this.xvelo = this.xvelo - ((0.01 * Math.abs(this.xvelo)) / this.xvelo);
}
this._y = this._y - this.yvelo;
if (this.dir == 1) {
this._x = this._x - this.xvelo;
} else {
this._x = this._x + this.xvelo;
}
if (((this._y > 293) || (this._x < -50)) || (this._x > 630)) {
this._y = 293;
this.jump = false;
this.apogeereached = false;
this.xvelo = 1 + random(4);
this.jumpset = false;
}
}
if ((this.sprite == 5) || (this.sprite == 6)) {
if (!this.grenadehit) {
this._alpha = this._alpha - 3;
this._y = this._y + 1;
if (this._alpha <= 0) {
if ((this._x > 0) && (this._x < 600)) {
if (random(100) <= 10) {
if ((_root.health <= 75) && (_root.numHealth < 3)) {
_root.poweruphealth(this._x, 200, 50 + random(10));
_root.numHealth++;
}
} else if (random(100) <= 10) {
if (_root.numAmmo < 4) {
_root.powerupammo(this._x, 200, 50 + random(10));
_root.numHealth++;
}
} else if (random(100) <= 10) {
_root.powerupgrenade(this._x, 200, 50 + random(10));
}
}
if (!this.norespawn) {
_root.enemydead(this.getDepth());
}
_root.enemies[this.id] = 0;
this.removeMovieClip();
}
} else if (this.grenadehit) {
if (this.dir == 1) {
this._rotation = this._rotation - this.spin;
} else {
this._rotation = this._rotation + this.spin;
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this.xvelo > 0) {
this.xvelo = this.xvelo - ((0.01 * Math.abs(this.xvelo)) / this.xvelo);
}
this._y = this._y - this.yvelo;
if (this.dir == 1) {
this._x = this._x - this.xvelo;
} else {
this._x = this._x + this.xvelo;
}
if (((this._y >= 330) || (this._x < -50)) || (this._x > 630)) {
this.norespawn = false;
this.grenadehit = false;
}
}
} else {
if (this.hitTest(_root.player_mc) && (getTimer() > this.hittime)) {
if ((_root.health > 0) && (_root.player.candamage)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - this.damage;
this.hittime = getTimer() + 250;
}
}
if (Math.abs((_root.truck._x - this._x) < 300)) {
if (!this.jumpset) {
if (_root.truck._x < this._x) {
this.attachMovie("vampire_jump_fly_left", "vampire", 0);
} else {
this.attachMovie("vampire_jump_fly_right", "vampire", 0);
}
this.sprite = 8;
this.yvelo = 3.5;
this.jump = true;
this.jumpset = true;
}
}
if (Math.abs(_root.player_mc._x - this._x) < 50) {
if (this.sprite != 0) {
this.attachMovie("vampire_attack", "vampire" + this.level, this.level);
this.sprite = 0;
}
if (_root.player_mc._x > this._x) {
this._x = this._x + random(6);
} else {
this._x = this._x - random(6);
}
} else if (_root.truck._x > this._x) {
if (!this.jump) {
if (this.sprite != 1) {
this.attachMovie("vampire_run_right", "vampire" + this.level, this.level);
this.sprite = 1;
this.dir = 1;
}
}
this._x = this._x + this.speed;
} else if (_root.truck._x < this._x) {
if (!this.jump) {
if (this.sprite != 2) {
this.attachMovie("vampire_run_left", "vampire" + this.level, this.level);
this.sprite = 2;
this.dir = 2;
}
}
this._x = this._x - this.speed;
}
}
} else if (getTimer() > this.time) {
this.hit = false;
this.time = getTimer() + 100;
}
}
}
Instance of Symbol 842 MovieClip "truck" in Frame 3616
onClipEvent (load) {
this.active = false;
this.inplace = false;
this.out = false;
this.xvelo = 15;
this.candamage = true;
dir = 1;
d2 = 350;
speed = 10;
}
onClipEvent (enterFrame) {
if (this.active) {
if ((this.hitTest(_root.player_mc) && (_root.player.activetruck != 1)) && (_root.player_mc._y < _root.player._y)) {
_root.player.activetruck = 1;
}
if (!this.hitTest(_root.player_mc)) {
_root.player.activetruck = 0;
}
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if ((this._x <= d1) && (this.dir != 1)) {
this.dir = 1;
this.speed = 1;
d2 = random(600);
} else if ((this._x >= d2) && (this.dir != 2)) {
this.dir = 2;
this.speed = 1;
d1 = random(600);
}
if (!this.inplace) {
if (this._x < d2) {
this._x = this._x + this.xvelo;
if (_root.player.activetruck == 1) {
_root.player_mc._x = _root.player_mc._x + this.xvelo;
}
} else {
_root.player.canmove = true;
this.inplace = true;
this.candamage = false;
}
} else if (this.dir == 1) {
if (_root.player.activetruck == 1) {
_root.player_mc._x = _root.player_mc._x + this.speed;
}
this._x = this._x + this.speed;
} else {
if (_root.player.activetruck == 1) {
_root.player_mc._x = _root.player_mc._x - this.speed;
}
this._x = this._x - this.speed;
}
if (this.candamage) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root.enemies[z] = 0;
_root["vampire" + z].grenadehit = true;
_root["vampire" + z].health = 0;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
z++;
}
}
}
if (this.out) {
if (this._x < 750) {
this._x = this._x + 5;
} else {
this.unloadMovie();
}
}
}
Instance of Symbol 616 MovieClip [bullet] "bullet_mc" in Frame 3616
onClipEvent (load) {
this.damage = 35;
this._y = _root.player_mc._y - 15;
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
this._x = _root.player_mc._x + 35;
this.dir = 1;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
this._x = _root.player_mc._x - 35;
this.dir = 2;
}
}
onClipEvent (enterFrame) {
if (_root.player.ammo < 16) {
if (_root.bubbleammonotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: ammo is low!", "talk_face_alert", 202);
_root.bubbleammonotify = true;
}
if (getTimer() > ammonotify) {
_root.ammod._visible = false;
ammonotify = getTimer() + 500;
} else {
_root.ammod._visible = true;
}
}
if (this != _root.bullet_mc) {
if (this.dir == 1) {
this._x = this._x + 30;
if (this._x > 600) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
if (this.dir == 2) {
this._x = this._x - 30;
if (this._x < 0) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
i = 0;
while (i <= _root.MAXBULLETS) {
if (_root.bullets[i] != 0) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
if ((_root["vampire" + z].sprite != 5) && (_root["vampire" + z].sprite != 6)) {
if (_root["vampire" + z].sprite == 1) {
_root["vampire" + z].attachMovie("vampire_hit_right", "vampire", 0);
_root["vampire" + z].sprite = 3;
} else if (_root["vampire" + z].sprite == 2) {
_root["vampire" + z].attachMovie("vampire_hit_left", "vampire", 0);
_root["vampire" + z].sprite = 4;
}
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root["vampire" + z].hit = true;
_root["vampire" + z].health = _root["vampire" + z].health - this.damage;
_root.hits++;
if (_root["vampire" + z].health <= 0) {
_root.kills++;
_root.enemies[z] = 0;
if (this.dir == 1) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
_root["vampire" + z].deadTimer = getTimer();
}
_root.bullets[i] = 0;
this.removeMovieClip();
}
}
}
z++;
}
}
i++;
}
}
}
Instance of Symbol 614 MovieClip [grenade] "grenade_mc" in Frame 3616
onClipEvent (load) {
if (this != _root.grenade_mc) {
this.damage = 10;
this.xvelo = 8 + random(2);
this.yvelo = 1 + random(3);
this.apogeereached = false;
this.ecount = 0;
this.etime = 0;
this.explode = false;
this.bubblenotify = false;
this._y = _root.player_mc._y + 5;
if (((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) || (_root.player.sprite == 15)) {
this._x = _root.player_mc._x;
this.dir = 1;
}
if (((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) || (_root.player.sprite == 16)) {
this._x = _root.player_mc._x;
this.dir = 2;
}
}
}
onClipEvent (enterFrame) {
if (_root.player.grenades <= 2) {
if (_root.bubblenotify == false) {
_root.bubblenotify = true;
_root.talkbubble(5, 25, 2500, "WARNING: grenades are low!", "talk_face_alert", 201);
}
if (getTimer() > grenadenotify) {
_root.grenaded._visible = false;
grenadenotify = getTimer() + 500;
} else {
_root.grenaded._visible = true;
}
}
if (this.explode && (getTimer() > this.etime)) {
if (!this.area1down) {
pos = new Object();
pos._x = this._x;
pos._y = this._y;
_root.explosion_mc.duplicateMovieClip("exparea" + id, 0, pos);
this.area1down = true;
}
if (this.ecount < 8) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(75);
} else {
pos._x = -random(75);
}
pos._y = -random(50);
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp" + this.ecount, this.ecount, pos);
} else {
this.attachMovie("explosion_2", "exp" + this.ecount, this.ecount, pos);
}
this.ecount++;
if (getTimer() > this.rtime) {
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp22", 22);
} else {
this.attachMovie("explosion_2", "exp22", 22);
}
this.rtime = getTimer() + 100;
}
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
} else if (getTimer() > this.otime) {
this.explode = false;
this.removeMovieClip();
}
}
if (this != _root.grenade_mc) {
if (!this.explode) {
z = 0;
while (z <= _root.MAXENEMIES) {
if (_root.enemies[z] != 0) {
if (this.hitTest(_root["vampire" + z])) {
_root.grenades[id] = 0;
this.xvelo = 0;
this.yvelo = 0;
this.explode = true;
}
}
z++;
}
if (this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.08 * Math.abs(this.xvelo)) / this.xvelo);
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this._y >= 330) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
if (this._x > 600) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
if (this.dir == 2) {
this._x = this._x - this.xvelo;
if (this._x < 0) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
}
}
}
Instance of Symbol 612 MovieClip [explosion_area_1] "explosion_mc" in Frame 3616
onClipEvent (load) {
this.damage = 100;
this._alpha = 100;
this.playerhittime = 0;
}
onClipEvent (enterFrame) {
if (this._alpha >= 10) {
this._alpha = this._alpha - 10;
}
if (this != _root.explosion_mc) {
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
_root.player_mc.attachMovie("player_jump_right", "player", 0);
_root.player.sprite = 13;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
_root.player_mc.attachMovie("player_jump_left", "player", 0);
_root.player.sprite = 14;
}
_root.player.canfire = false;
_root.player.jumpready = true;
_root.player.grenadehit = true;
_root.health--;
this.playerhittime = getTimer() + 100;
}
z = 0;
while (z <= _root.MAXENEMIES) {
if (z <= _root.MAXGRENADES) {
if (this.hitTest(_root["grenade" + z])) {
}
}
if (_root.enemies[z] == 1) {
if (this.hitTest(_root["vampire" + z])) {
_root.hits++;
if (_root["vampire" + z].blayer < 5) {
_root["vampire" + z].blayer++;
} else {
_root["vampire" + z].blayer = 1;
}
blooddepth = "blood" + _root["vampire" + z].blayer;
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root["vampire" + z].attachMovie("blood", blooddepth, _root["vampire" + z].blayer, position);
_root["vampire" + z].hit = true;
_root["vampire" + z].health = _root["vampire" + z].health - this.damage;
if (_root["vampire" + z].health <= 0) {
_root.kills++;
_root.enemies[z] = 2;
_root["vampire" + z].grenadehit = true;
if (_root["vampire" + z].dir == 2) {
_root["vampire" + z].attachMovie("vampire_dead_left", "vampire", 0);
_root["vampire" + z].sprite = 5;
} else {
_root["vampire" + z].attachMovie("vampire_dead_right", "vampire", 0);
_root["vampire" + z].sprite = 5;
}
}
}
}
z++;
}
}
}
Frame 3617
if (_root.gameover) {
trace(_root.levelend._x);
_root.levelend._x = 650;
}
aw1 = false;
aw2 = false;
aw3 = false;
_root.accuracy = int((_root.hits / _root.shotsfired) * 100);
if (isNaN(_root.accuracy)) {
_root.accuracy = 0;
}
if (_root.accuracy >= 100) {
_root.ranking = "A+";
} else if (_root.accuracy >= 90) {
_root.ranking = "A";
} else if (_root.accuracy >= 85) {
_root.ranking = "B+";
} else if (_root.accuracy >= 80) {
_root.ranking = "B";
} else if (_root.accuracy >= 75) {
_root.ranking = "C+";
} else if (_root.accuracy >= 70) {
_root.ranking = "C";
} else if (_root.accuracy >= 65) {
_root.ranking = "D+";
} else if (_root.accuracy >= 60) {
_root.ranking = "D";
} else {
_root.ranking = "F";
}
a1 = "BEST IN SHOW";
a2 = "CLASS CLOWN";
a3 = "GOOD ATTENDANCE";
a4 = "MOST FRIENDLY";
a5 = "MOST ATHLETIC";
a6 = "BEST HANDWRITING";
if (_root.health >= 100) {
if (!aw1) {
award1 = "GOOD DIET";
aw1 = true;
} else if (!aw2) {
award2 = "GOOD DIET";
aw2 = true;
} else if (!aw3) {
award3 = "GOOD DIET";
aw3 = true;
}
}
if (_root.ranking >= 80) {
if (!aw1) {
award1 = "ACCURACY HERO";
aw1 = true;
} else if (!aw2) {
award2 = "ACCURACY HERO";
aw2 = true;
} else if (!aw3) {
award3 = "ACCURACY HERO";
aw3 = true;
}
}
aextra1 = random(6) + 1;
if (aextra1 == 1) {
atext = a1;
} else if (aextra1 == 2) {
atext = a2;
} else if (aextra1 == 3) {
atext = a3;
} else if (aextra1 == 4) {
atext = a4;
} else if (aextra1 == 5) {
atext = a5;
} else if (aextra1 == 6) {
atext = a6;
}
if (!aw1) {
award1 = atext;
aw1 = true;
} else if (!aw2) {
award2 = atext;
aw2 = true;
} else if (!aw3) {
award3 = atext;
aw3 = true;
}
stop();
Instance of Symbol 608 MovieClip [level_end] "levelend" in Frame 3617
onClipEvent (load) {
if (_root.gameover) {
this._y = 650;
}
}
Instance of Symbol 861 MovieClip "gameover" in Frame 3617
onClipEvent (load) {
if (_root.gameover) {
this._alpha = 100;
} else {
this._y = 650;
}
}
Frame 3627
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 3627
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Frame 3671
_root.talkbubble(375, 50, 2500, "who is that out front?", "talk_face_player", 200);
Frame 3981
_root.talkbubble(375, 125, 2500, "i had it all perfectly planned!", "talk_face_chiefangry", 200);
Frame 4096
_root.talkbubble(75, 125, 2500, "then you messed everything up!", "talk_face_chiefangry", 200);
Frame 4221
_root.talkbubble(75, 125, 2500, "THAT WAS VERY SELFISH AND INCONSIDERATE!", "talk_face_chiefangry", 200);
Frame 4536
_root.talkbubble(75, 125, 1500, "bring the pain!", "talk_face_boss", 200);
Frame 4697
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
lives.text = "LIVES LEFT: " + _global.lives;
stop();
Instance of Symbol 837 MovieClip "fader" in Frame 4697
onClipEvent (enterFrame) {
if ((this._alpha > 0) && (getTimer() > this.fadetimer)) {
this._alpha = this._alpha - 1;
_root.lives._alpha = _root.lives._alpha - 1;
this.fadetimer = getTimer() + 10;
} else {
_root.play();
}
}
Frame 4698
function keyTrap() {
if (player.canmove) {
if (Key.isDown(39)) {
if (this._x < 600) {
this._x = this._x + player.speed;
}
} else if (Key.isDown(37)) {
if (this._x > 0) {
this._x = this._x - player.speed;
}
}
if (Key.isDown(38)) {
}
if (Key.isDown(17)) {
ammodisp = player.ammo;
if (player.ammo >= 1) {
if (player.bulletcount < 8) {
if (getTimer() > this.time) {
if (player.canfire) {
player.ammo--;
z = 0;
while (z <= MAXBULLETS) {
if (bullets[z] == 0) {
player.bulletcount++;
bullets[z] = 1;
bulletid = new Object();
bulletid.id = z;
if ((player.sprite % 2) == 0) {
player_mc.attachMovie("gunflash_left", "gf" + z, 300);
} else {
player_mc.attachMovie("gunflash_right", "gf" + z, 300);
}
bullet_mc.duplicateMovieClip("bullet" + player.bulletcount, player.bulletcount, bulletid);
setProperty("bullet" + player.bulletcount, _visible , true);
this.time = getTimer() + 200;
break;
}
z++;
}
}
}
} else {
player.canfire = false;
player.bulletcount = 0;
if (player.sprite == 5) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_right", "player", 0);
player.sprite = 9;
}
if (player.sprite == 6) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_reload_left", "player", 0);
player.sprite = 10;
}
if (player.sprite == 7) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_right", "player", 0);
player.sprite = 11;
}
if (player.sprite == 8) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_reload_left", "player", 0);
player.sprite = 12;
}
}
}
}
if (Key.isDown(32)) {
grenadedisp = player.grenades;
if (((player.grenades >= 1) && (getTimer() > this.gtime)) && (player.canfire)) {
if (player.grenadecount < MAXGRENADES) {
if (grenades[player.grenadecount++] == 0) {
player.grenades--;
grenades[player.grenadecount] = 1;
grenadeid = new Object();
grenadeid.id = player.grenadecount;
grenade_mc.duplicateMovieClip("grenade" + player.grenadecount, player.grenadecount, 80 + grenadeid);
this.gtime = getTimer() + 250;
}
} else {
player.grenadecount = 0;
}
}
}
}
}
MAXENEMIES = 3;
MAXBULLETS = 8;
MAXGRENADES = 8;
ENDTIMER = getTimer() + 120000;
KILLS = 0;
LEVELEND = false;
bubblenotify = false;
bubbleammonotify = false;
bubblehealthnotify = false;
numHealth = 0;
numAmmo = 0;
numGrenade = 0;
player = new Object();
health = 100;
player.ammo = 96;
player.grenades = 4;
player._x = 255;
player._y = 299;
player._width = 43.8;
player._height = 63;
player.speed = 5;
player.sprite = 1;
player.canfire = true;
player.canmove = true;
player.candamage = true;
player.reloadframe = 0;
player.bulletcount = 0;
player.grenadecount = 0;
player.apogee = 150;
player.doublejump = false;
player.jumpready = false;
player.velo = 6;
player.xvelo = 4;
bullet_mc._visible = false;
bullets = new Array(16);
enemies = new Array(16);
grenades = new Array(16);
z = 0;
while (z <= 16) {
bullets[z] = 0;
enemies[z] = 0;
grenades[z] = 0;
z++;
}
ammodisp = player.ammo;
grenadedisp = player.grenades;
player_mc.attachMovie("player_stand", "player", 0);
setProperty(player_mc, _x , player._x);
setProperty(player_mc, _y , player._y);
setProperty(player_mc, _width , player._width);
setProperty(player_mc, _height , player._height);
keyWatch = new Object();
keyWatch.onKeyDown = function () {
if (player.canmove) {
if (Key.getCode() == 39) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 13) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_right", "player", 0, mdata);
player.sprite = 13;
}
} else if (player.sprite != 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_right", "player", 0);
player.sprite = 1;
}
}
if (Key.getCode() == 37) {
if ((player.sprite == 13) || (player.sprite == 14)) {
if (player.sprite != 14) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_fly_left", "player", 0);
player_mc.gotoAndPlay(20);
player.sprite = 14;
}
} else if (player.sprite != 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_left", "player", 0);
player.sprite = 2;
}
}
if (Key.getCode() == 17) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_right", "player", 0);
player.sprite = 5;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_shoot_left", "player", 0);
player.sprite = 6;
}
}
if (Key.getCode() == 32) {
if (player.sprite == 3) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_right", "player", 0);
player.sprite = 15;
}
if (player.sprite == 4) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_grenade_left", "player", 0);
player.sprite = 16;
}
}
if (Key.getCode() == 38) {
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_right", "player", 0);
player.sprite = 13;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_jump_left", "player", 0);
player.sprite = 14;
player.canfire = false;
player.doublejump = false;
player.jumpready = false;
}
}
}
};
keyWatch.onKeyUp = function () {
if (player.canmove) {
if ((Key.getCode() == 39) || (Key.getCode() == 37)) {
if (!Key.isDown(39)) {
if (!Key.isDown(37)) {
if (player.sprite == 1) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 2) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
}
if (Key.getCode() == 17) {
player.canfire = true;
if ((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if ((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
if (Key.getCode() == 38) {
if (!player.doublejump) {
player.doublejump = true;
player.jumpready = true;
}
}
if (Key.getCode() == 32) {
player.canfire = true;
if (((((player.sprite == 1) || (player.sprite == 3)) || (player.sprite == 5)) || (player.sprite == 7)) || (player.sprite == 15)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (((((player.sprite == 2) || (player.sprite == 4)) || (player.sprite == 6)) || (player.sprite == 8)) || (player.sprite == 16)) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
}
}
};
Key.addListener(keyWatch);
player.reloaded = function () {
player.canfire = true;
if (player.sprite == 9) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_right", "player", 0);
player.sprite = 3;
}
if (player.sprite == 10) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_stand_left", "player", 0);
player.sprite = 4;
}
if (player.sprite == 11) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_right", "player", 0);
player.sprite = 7;
}
if (player.sprite == 12) {
player_mc.removeMovieClip();
player_mc.attachMovie("player_run_shoot_left", "player", 0);
player.sprite = 8;
}
};
player_mc.onEnterFrame = keyTrap;
enemydead = function (num) {
if (!_root.LEVELEND) {
numEnemy--;
KILLS++;
makeenemy();
}
};
makeenemy = function () {
z = 0;
while (z <= MAXENEMIES) {
if (enemies[z] == 0) {
position = new Object();
if (random(10) < 5) {
position._x = -50;
} else {
position._x = 650;
}
vampire_mc.duplicateMovieClip("vampire" + z, z + 100, position);
_root["vampire" + z].id = z;
enemies[z] = 1;
numEnemy++;
return;
}
z++;
}
};
nextLevel = function () {
_root.LEVELEND = true;
gotoAndStop (4709);
};
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
poweruphealth = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_health.duplicateMovieClip("h" + layer, layer, pos);
};
powerupammo = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_ammo.duplicateMovieClip("a" + layer, layer, pos);
};
powerupgrenade = function (x, y, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
_root.powerup_grenade.duplicateMovieClip("g" + layer, layer, pos);
};
playerdied = function () {
trace("died - " + _global.lives);
if (_global.lives > 1) {
z = 200;
while (z <= 205) {
removeMovieClip("bubble" + z);
z++;
}
_global.lives--;
gotoAndPlay (4697);
} else {
this.gameover = true;
gotoAndStop (4699);
}
};
stop();
Instance of Symbol 669 MovieClip [player] "player_mc" in Frame 4698
onClipEvent (enterFrame) {
if ((_root.health <= 0) && (getTimer() > _root.player.deadtime)) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player.canmove = false;
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
_root.fader._alpha++;
if (_root.player_mc._alpha <= 0) {
_root.playerdied();
_root.ENDTIMER = getTimer();
_root.player_mc.removeMovieClip();
}
}
if (getTimer() >= _root.ENDTIMER) {
if (!this.endcalled) {
_root.endLevel();
this.endcalled = true;
}
if (_root.helicopter.inplace && (!_root.helicopter.out)) {
if (_root.player_mc._y >= _root.player._y) {
if (_root.player_mc._x < (_root.helicopter._x - 45)) {
if (_root.player.sprite != 3) {
_root.player_mc.attachMovie("player_run_right", "player", 0);
_root.player.sprite = 3;
}
} else if (_root.player.sprite != 4) {
_root.player_mc.attachMovie("player_run_left", "player", 0);
_root.player.sprite = 4;
}
}
if (!((_root.player_mc._x > (_root.helicopter._x - 60)) && (_root.player_mc._x < (_root.helicopter._x - 15)))) {
if (_root.player_mc._x < (_root.helicopter._x - 45)) {
_root.player_mc._x = _root.player_mc._x + 5;
} else {
_root.player_mc._x = _root.player_mc._x - 5;
}
}
if (((_root.player_mc._x > (_root.helicopter._x - 60)) && (_root.player_mc._x < (_root.helicopter._x - 15))) && (_root.player_mc._y >= _root.player._y)) {
_root.player.landed = true;
_root.helicopter.yvelo = 6;
_root.helicopter.out = true;
this.unloadMovie();
}
}
} else {
timeleft = _root.ENDTIMER - getTimer();
if ((timeleft < 119500) && (!beginnotify)) {
_root.helicopter.active = true;
_root.talkbubble(200, 125, 5000, "bwahahaha! i am very inconsiderate and unable to love!", "talk_face_boss", 200);
beginnotify = true;
}
}
if (_root.health < 25) {
if (_root.bubblehealthnotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: health is low!", "talk_face_alert", 203);
_root.bubblehealthnotify = true;
}
if (getTimer() > healthnotify) {
_root.healthd._visible = false;
healthnotify = getTimer() + 500;
} else {
_root.healthd._visible = true;
}
}
if (_root.health <= 0) {
_root.player.canmove = false;
_root.player.candamage = false;
_root.player.canfire = false;
_root.player.health = 0;
if (getTimer() > _root.player.deadtime) {
if (_root.player.sprite != 0) {
_root.player_mc.attachMovie("player_stand", "player", 0);
_root.player.sprite = 0;
}
_root.player_mc._alpha = _root.player_mc._alpha - 1;
_root.player_mc._y = _root.player_mc._y - 1;
_root.player.deadtime = getTimer() + 10;
if (_root.player_mc._alpha <= 0) {
_root.player_mc.removeMovieClip();
}
}
}
if (((_root.player.sprite == 13) || (_root.player.sprite == 14)) || (_root.player.jumpready)) {
_root.player.canfire = false;
if (_root.player.grenadehit) {
if (_root.player.sprite == 13) {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation - 5;
if (this._x > 0) {
this._x = this._x - _root.player.xvelo;
}
} else {
if (_root.player.xvelo != 0) {
_root.player.xvelo = _root.player.xvelo - ((0.1 * Math.abs(_root.player.xvelo)) / _root.player.xvelo);
}
this._rotation = this._rotation + 5;
if (this._x < 600) {
this._x = this._x + _root.player.xvelo;
}
}
}
if (_root.player.jumpready) {
if (_root.player.velo > 0.05) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo - ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y - _root.player.velo;
} else {
_root.player.jumpready = false;
_root.player.apogeereached = true;
}
} else if (_root.player.apogeereached) {
if (_root.player.grenadehit) {
_root.player.grenadehit = false;
_root.player.realign = true;
}
if (_root.player.realign) {
if (this._rotation != 0) {
if (_root.player.sprite == 13) {
this._rotation = this._rotation - 5;
} else {
this._rotation = this._rotation + 5;
}
} else {
this._rotation = 0;
_root.player.realgin = false;
}
}
if ((_root.player_mc._y < _root.player._y) && (_root.player.apogeereached)) {
if (_root.player.velo != 0) {
_root.player.velo = _root.player.velo + ((0.1 * Math.abs(_root.player.velo)) / _root.player.velo);
}
_root.player_mc._y = _root.player_mc._y + _root.player.velo;
_root.player.landed = false;
} else if ((_root.player_mc._y >= _root.player._y) && (_root.player.apogeereached)) {
_root.player_mc._y = _root.player._y;
_root.player.apogeereached = false;
_root.player.landed = true;
}
} else if (_root.player.landed) {
_root.player.xvelo = 1 + random(10);
this._rotation = 0;
_root.player.landed = false;
_root.player.canfire = true;
_root.player.doublejump = true;
if (_root.player.sprite == 13) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_right", "player", 0);
_root.player.sprite = 3;
}
if (_root.player.sprite == 14) {
_root.player_mc.removeMovieClip();
_root.player_mc.attachMovie("player_stand_left", "player", 0);
_root.player.sprite = 4;
}
}
}
}
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 4698
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Instance of Symbol 623 MovieClip [powerup_ammo] "powerup_ammo" in Frame 4698
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.ammo = 32;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_ammo) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.ammo < (999 - this.ammo)) {
_root.player.ammo = _root.player.ammo + this.ammo;
} else {
_root.player.ammo = 999;
}
_root.ammodisp = _root.player.ammo;
this.removeMovieClip();
}
}
}
Instance of Symbol 621 MovieClip [powerup_grenade] "powerup_grenade" in Frame 4698
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.grenades = 4;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_grenade) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.player.grenades < (999 - this.grenades)) {
_root.player.grenades = _root.player.grenades + this.grenades;
} else {
_root.player.grenades = 999;
}
_root.grenadedisp = _root.player.grenades;
this.removeMovieClip();
}
}
}
Instance of Symbol 619 MovieClip [powerup_health] "powerup_health" in Frame 4698
onClipEvent (load) {
this.outTime = getTimer() + 7000;
this.health = 25;
}
onClipEvent (enterFrame) {
if (this != _root.powerup_health) {
if (getTimer() > this.outTime) {
if (this._alpha > 0) {
this._alpha = this._alpha - 3;
} else {
this.removeMovieClip();
}
}
if (this.hitTest(_root.player_mc)) {
if (_root.health < (100 - this.health)) {
_root.health = _root.health + this.health;
} else {
_root.health = 100;
}
this.removeMovieClip();
}
}
}
Instance of Symbol 907 MovieClip "smoke" in Frame 4698
onClipEvent (load) {
this._alpha = 100;
}
onClipEvent (enterFrame) {
if (this._alpha > 0) {
this._alpha--;
} else {
this.removeMovieClip();
}
this._y--;
}
Instance of Symbol 682 MovieClip [vampireclip] "robot_mc" in Frame 4698
onClipEvent (load) {
this.attachMovie("boss_run_right", "r1", 0);
this._width = 102.7;
this._height = 142.7;
this._x = -125;
this._y = 265;
this.dir = 1;
this.fire = false;
this.attack = false;
this.angle = 0;
this.magnitude = 8;
this.dset = false;
this.yvelo = 3;
this.xvelo = 1 + random(4);
this.ecount = 1;
this.speed = 3;
this.MAXBULLETS = 16;
this.bullets = Array(this.MAXBULLETS);
this.bulletcounter = 1;
this.bulletwaittime = 100;
x = 0;
while (x < this.MAXBULLETS) {
this.bullets[x] = 0;
x++;
}
this.armor = 2000;
this.active = true;
switch (_global.difficulty) {
case 1 :
this.speed = 3;
this.armor = 2000;
break;
case 2 :
this.speed = 2 + random(2);
this.armor = 2500;
break;
case 3 :
this.speed = 2 + random(2);
this.armor = 3000;
}
}
onClipEvent (enterFrame) {
if (this.active) {
_root.timer = this.armor;
if ((this.armor <= 1500) && (!this.wave1)) {
_root.powerupammo(random(600), 320, 50 + random(10));
this.wave1 = true;
this.MAXBULLETS++;
}
if ((this.armor <= 1000) && (!this.wave2)) {
_root.poweruphealth(random(600), 320, 50 + random(10));
this.wave2 = true;
this.bulletwaittime = 200;
this.MAXBULLETS++;
this.speed = this.speed + 2;
this.yvelo = 1;
}
if ((this.armor <= 500) && (!this.wave3)) {
_root.powerupgrenade(random(600), 320, 50 + random(10));
this.MAXBULLETS++;
this.wave3 = true;
this.speed = this.speed + 2;
}
if (this.armor <= 0) {
_root.player.candamage = false;
this.active = false;
this.attack = false;
this.fire = false;
this.explode = true;
}
if ((this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) && (_root.player.candamage)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - random(5);
this.playerhittime = getTimer() + 100;
}
if (this.attack) {
if (!this.ainplace) {
if (!this.axset) {
if ((this._x > 280) && (this._x < 300)) {
this.attachMovie("boss_shoot_3", "r1", 0);
this.axset = true;
} else if (this._x > 300) {
if (!this.dspriteL) {
this.attachMovie("boss_run_left", "r1", 0);
this.dspriteL = true;
}
this._x = this._x - this.speed;
} else if (this._x < 300) {
if (!this.dspriteR) {
this.attachMovie("boss_run_right", "r1", 0);
this.dspriteR = true;
}
this._x = this._x + this.speed;
}
} else if (!this.ayset) {
if (this._y > 150) {
this._y = this._y - 1;
} else {
this.ayset = true;
this.ainplace = true;
this.aattack = true;
}
}
} else if (this.aattack) {
if (this.bulletcounter <= this.MAXBULLETS) {
if (getTimer() > this.bullettimer) {
pos = new Object();
pos.dy = _root.player_mc._y;
pos.dx = _root.player_mc._x;
pos._x = this._x;
pos._y = this._y;
pos.xvelo = 2;
pos.yvelo = 2;
this.bullets[bulletcounter - 1] = 1;
_root.robotbullet2.duplicateMovieClip("rb" + this.bulletcounter, 30 + this.bulletcounter, pos);
this.bullettimer = getTimer() + this.bulletwaittime;
this.bulletcounter++;
if (this.angle >= 360) {
this.angle = 15;
} else {
this.angle = this.angle + 15;
}
}
} else {
this.aattack = false;
this.areset = true;
}
} else if (this.areset) {
if (this._y < 265) {
this._y = this._y + 1;
} else {
this.bulletwaittime = 100;
this.bulletcounter = 0;
this._y = 265;
this.areset = false;
this.attack = false;
this.ainplace = false;
this.axset = false;
this.ayset = false;
this.dspriteL = false;
this.dspriteR = false;
if (this.dir == 1) {
this.attachMovie("boss_run_right", "r1", 0);
} else {
this.attachMovie("boss_run_left", "r1", 0);
}
}
}
} else if (this.fire) {
if (getTimer() < this.firetime) {
if (this.bulletcounter <= this.MAXBULLETS) {
if (getTimer() > this.bullettimer) {
pos = new Object();
pos.dir = this.dir;
if (this.dir == 1) {
pos._x = this._x + 55;
} else {
pos._x = this._x - 55;
}
pos._y = this._y - 25;
if (!this.dset) {
pos.dy = _root.player_mc._y;
this.dset = true;
}
pos.xvelo = 10.8;
pos.yvelo = 0.5;
this.bullets[bulletcounter - 1] = 1;
_root.robotbullet.duplicateMovieClip("rb" + this.bulletcounter, 30 + this.bulletcounter, pos);
this.bullettimer = getTimer() + this.bulletwaittime;
this.bulletcounter++;
}
}
} else {
this.fire = false;
this.dset = false;
this.bulletcounter = 0;
if (this.dir == 1) {
this.attachMovie("boss_run_right", "r1", 0);
} else {
this.attachMovie("boss_run_left", "r1", 0);
}
this.attack = true;
this.bulletwaittime = 350;
}
if ((this.dir == 1) && (this.sprite != 3)) {
this.removeMovieClip();
this.attachMovie("boss_shoot_2_right", "r1", 0);
this.sprite = 3;
} else if ((this.dir == 2) && (this.sprite != 4)) {
this.removeMovieClip();
this.attachMovie("boss_shoot_2_left", "r1", 0);
this.sprite = 4;
}
} else {
if ((this._x <= 50) && (this.dir != 1)) {
this.dir = 1;
this.firetime = getTimer() + 3000;
this.fire = true;
} else if ((this._x >= 550) && (this.dir != 2)) {
this.dir = 2;
this.firetime = getTimer() + 3000;
this.fire = true;
}
if (this.dir == 1) {
this._x = this._x + this.speed;
} else {
this._x = this._x - this.speed;
}
}
}
if (this.explode) {
if (this.dir == 2) {
if (this._rotation < 180) {
this._rotation = this._rotation + 1;
}
} else if (this._rotation > -180) {
this._rotation = this._rotation - 1;
}
if (this._y < 400) {
this._y = this._y + 1;
}
if (this._alpha > 0) {
this._alpha = this._alpha - 0.5;
} else {
_root.nextLevel();
}
if (this.ecount < 30) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(100);
} else {
pos._x = -random(100);
}
pos._y = -random(100);
if (random(10) < 5) {
this.attachMovie("blood", "exp" + this.ecount, 20 + this.ecount, pos);
} else {
this.attachMovie("blood", "exp" + this.ecount, 20 + this.ecount, pos);
}
this.ecount++;
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
}
}
}
Instance of Symbol 496 MovieClip [boss_bullet] "robotbullet" in Frame 4698
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (this != _root.robotbullet) {
if ((this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) && (_root.player.candamage)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - (5 + random(5));
this.playerhittime = getTimer() + 1;
this.removeMovieClip();
}
if (_this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
} else if (this.dir == 2) {
this._x = this._x - this.xvelo;
}
if (this._y > this.dy) {
this._y = this._y - this.yvelo;
} else if (this._y < this.dy) {
this._y = this._y + this.yvelo;
}
if ((this._x < 0) || (this._x > 600)) {
this.removeMovieClip();
}
}
}
Instance of Symbol 495 MovieClip [boss_bullet2] "robotbullet2" in Frame 4698
onClipEvent (load) {
this._alpha = 100;
}
onClipEvent (enterFrame) {
if (this._alpha > 0) {
this._alpha = this._alpha - 1;
} else {
this.removeMovieClip();
}
if (this != _root.robotbullet) {
if ((this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) && (_root.player.candamage)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
_root.health = _root.health - (5 + random(5));
this.playerhittime = getTimer() + 1;
this.removeMovieClip();
}
this.xvelo = this.xvelo + ((0.1 * Math.abs(this.xvelo)) / this.xvelo);
if (this._x > this.dx) {
this._x = this._x - this.xvelo;
} else if (this._x < this.dx) {
this._x = this._x + this.xvelo;
}
if (this._y > this.dy) {
this._y = this._y - this.xvelo;
} else if (this._y < this.dy) {
this._y = this._y + this.xvelo;
}
if ((this._x < 0) || (this._x > 600)) {
this.removeMovieClip();
}
if ((this._y < 0) || (this._y > 350)) {
this.removeMovieClip();
}
}
}
Instance of Symbol 616 MovieClip [bullet] "bullet_mc" in Frame 4698
onClipEvent (load) {
this.damage = 25;
this._y = _root.player_mc._y - 15;
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
this._x = _root.player_mc._x + 35;
this.dir = 1;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
this._x = _root.player_mc._x - 35;
this.dir = 2;
}
}
onClipEvent (enterFrame) {
if (_root.player.ammo < 16) {
if (_root.bubbleammonotify == false) {
_root.talkbubble(5, 25, 2500, "WARNING: ammo is low!", "talk_face_alert", 202);
_root.bubbleammonotify = true;
}
if (getTimer() > ammonotify) {
_root.ammod._visible = false;
ammonotify = getTimer() + 500;
} else {
_root.ammod._visible = true;
}
}
if (this != _root.bullet_mc) {
if (this.dir == 1) {
this._x = this._x + 30;
if (this._x > 600) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
if (this.dir == 2) {
this._x = this._x - 30;
if (this._x < 0) {
_root.bullets[id] = 0;
this.removeMovieClip();
}
}
i = 0;
while (i <= _root.MAXBULLETS) {
if (_root.bullets[i] != 0) {
if (this.hitTest(_root.robot_mc)) {
if (_root.robot_mc.blayer < 5) {
_root.robot_mc.blayer++;
} else {
_root.robot_mc.blayer = 1;
}
blooddepth = "blood" + _root.robot_mc.blayer;
position = new Object();
position._x = -random(45);
position._y = -random(70);
_root.robot_mc.attachMovie("sparks", blooddepth, _root.robot_mc.blayer, position);
_root.robot_mc.hit = true;
_root.robot_mc.armor = _root.robot_mc.armor - this.damage;
_root.bullets[i] = 0;
this.removeMovieClip();
}
}
i++;
}
}
}
Instance of Symbol 614 MovieClip [grenade] "grenade_mc" in Frame 4698
onClipEvent (load) {
if (this != _root.grenade_mc) {
this.damage = 10;
this.xvelo = 8 + random(2);
this.yvelo = 1 + random(3);
this.apogeereached = false;
this.ecount = 0;
this.etime = 0;
this.explode = false;
this.bubblenotify = false;
this._y = _root.player_mc._y + 5;
if (((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) || (_root.player.sprite == 15)) {
this._x = _root.player_mc._x;
this.dir = 1;
}
if (((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) || (_root.player.sprite == 16)) {
this._x = _root.player_mc._x;
this.dir = 2;
}
}
}
onClipEvent (enterFrame) {
if (_root.player.grenades <= 2) {
if (_root.bubblenotify == false) {
_root.bubblenotify = true;
_root.talkbubble(5, 25, 2500, "WARNING: grenades are low!", "talk_face_alert", 201);
}
if (getTimer() > grenadenotify) {
_root.grenaded._visible = false;
grenadenotify = getTimer() + 500;
} else {
_root.grenaded._visible = true;
}
}
if (this.explode && (getTimer() > this.etime)) {
if (!this.area1down) {
pos = new Object();
pos._x = this._x;
pos._y = this._y;
_root.explosion_mc.duplicateMovieClip("exparea" + id, 0, pos);
this.area1down = true;
}
if (this.ecount < 8) {
pos = new Object();
if (random(10) < 5) {
pos._x = random(75);
} else {
pos._x = -random(75);
}
pos._y = -random(50);
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp" + this.ecount, this.ecount, pos);
} else {
this.attachMovie("explosion_2", "exp" + this.ecount, this.ecount, pos);
}
this.ecount++;
if (getTimer() > this.rtime) {
if (random(10) < 5) {
this.attachMovie("explosion_1", "exp22", 22);
} else {
this.attachMovie("explosion_2", "exp22", 22);
}
this.rtime = getTimer() + 100;
}
this.etime = getTimer() + random(120);
this.otime = getTimer() + 500;
} else if (getTimer() > this.otime) {
this.explode = false;
this.removeMovieClip();
}
}
if (this != _root.grenade_mc) {
if (!this.explode) {
if (this.hitTest(_root.robot_mc)) {
_root.grenades[id] = 0;
this.xvelo = 0;
this.yvelo = 0;
this.explode = true;
}
if (this.xvelo != 0) {
this.xvelo = this.xvelo - ((0.08 * Math.abs(this.xvelo)) / this.xvelo);
}
if (!this.apogeereached) {
if (this.yvelo != 0) {
this.yvelo = this.yvelo - ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
} else {
if (this.yvelo != 0) {
this.yvelo = this.yvelo + ((0.1 * Math.abs(this.yvelo)) / this.yvelo);
}
this._y = this._y - this.yvelo;
}
if ((this.yvelo < 0) && (!this.apogeereached)) {
this.apogeereached = true;
}
if (this._y >= 330) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
if (this.dir == 1) {
this._x = this._x + this.xvelo;
if (this._x > 600) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
if (this.dir == 2) {
this._x = this._x - this.xvelo;
if (this._x < 0) {
_root.grenades[id] = 0;
this.yvelo = 0;
this.xvelo = 0;
this.explode = true;
}
}
}
}
}
Instance of Symbol 612 MovieClip [explosion_area_1] "explosion_mc" in Frame 4698
onClipEvent (load) {
this.damage = 100;
this._alpha = 100;
this.playerhittime = 0;
}
onClipEvent (enterFrame) {
if (this._alpha >= 10) {
this._alpha = this._alpha - 10;
}
if (this != _root.explosion_mc) {
if (this.hitTest(_root.player_mc) && (getTimer() > this.playerhittime)) {
if (_root.player.blayer < 10) {
_root.player.blayer++;
} else {
_root.player.blayer--;
}
position = new Object();
position._x = random(50);
position._y = -60 + random(50);
_root.player_mc.attachMovie("blood", "bloodp" + _root.player.blayer, _root.player.blayer, position);
if ((((_root.player.sprite == 1) || (_root.player.sprite == 3)) || (_root.player.sprite == 5)) || (_root.player.sprite == 7)) {
_root.player_mc.attachMovie("player_jump_right", "player", 0);
_root.player.sprite = 13;
}
if ((((_root.player.sprite == 2) || (_root.player.sprite == 4)) || (_root.player.sprite == 6)) || (_root.player.sprite == 8)) {
_root.player_mc.attachMovie("player_jump_left", "player", 0);
_root.player.sprite = 14;
}
_root.player.canfire = false;
_root.player.jumpready = true;
_root.player.grenadehit = true;
_root.health--;
this.playerhittime = getTimer() + 100;
}
if (this.hitTest(_root.robot_mc)) {
if (_root.robot_mc.blayer < 5) {
_root.robot_mc.blayer++;
} else {
_root.robot_mc.blayer = 1;
}
blooddepth = "blood" + _root.robot_mc.blayer;
position = new Object();
position._x = -random(45);
position._y = -random(70);
_root.robot_mc.attachMovie("sparks", blooddepth, _root.robot_mc.blayer, position);
_root.robot_mc.hit = true;
_root.robot_mc.armor = _root.robot_mc.armor - this.damage;
this.removeMovieClip();
}
}
}
Frame 4709
talkbubble = function (x, y, delay, text, face, layer) {
pos = new Object();
pos._x = x;
pos._y = y;
pos.delay = delay;
pos.text = text;
pos.face = face;
talkbubble_mc.duplicateMovieClip("bubble" + layer, layer, pos);
};
Instance of Symbol 669 MovieClip [player] "talkbubble_mc" in Frame 4709
onClipEvent (load) {
if (this != _root.talkbubble_mc) {
txt = new Object();
txt.text = text;
txt.delay = delay;
txt.face = face;
this.attachMovie("talk_bubble", "bubble" + this.getDepth(), 0, txt);
}
}
Frame 5168
_root.talkbubble(375, 15, 3500, "tell me why you did this.", "talk_face_player", 200);
Frame 5258
_root.talkbubble(50, 15, 3500, "i always wanted... to be popular.", "talk_face_chief", 201);
Frame 5388
_root.talkbubble(50, 15, 3500, "i thought raising an army of hip vampires would make me cool.", "talk_face_chief", 201);
Frame 5523
_root.talkbubble(50, 15, 4000, "but it got out of hand... the science... too strong... flashback... imminent...", "talk_face_chief", 201);
Frame 5689
_root.talkbubble(225, 15, 4000, "i created a machine called the turbo action catalyst...", "talk_face_chief", 201);
Frame 5800
_root.talkbubble(225, 15, 4000, "it allowed me to incubate vampires in my own back yard...", "talk_face_chief", 201);
Frame 5923
_root.talkbubble(225, 15, 4500, "it was all so innocent at first... but my hobby grew into obsession...", "talk_face_chief", 201);
Frame 6024
_root.talkbubble(50, 15, 4500, "before i knew it... i had a house full of vampires.", "talk_face_chief", 201);
Frame 6178
_root.talkbubble(50, 15, 4500, "they filled my mind with thoughts of world domination...", "talk_face_chief", 201);
Frame 6298
_root.talkbubble(50, 15, 4500, "and when i resisted, they used the catalyst against me...", "talk_face_chief", 201);
Frame 6423
_root.talkbubble(50, 15, 4500, "they gave me the power to start a revolution!", "talk_face_chief", 201);
Frame 6678
_root.talkbubble(225, 15, 4500, "it's really a shame we have to kill you now...", "talk_face_chief", 201);
Frame 6853
_root.talkbubble(225, 15, 4500, "i think not... your time is about up.", "talk_face_player", 202);
Frame 6988
_root.talkbubble(225, 15, 5000, "time? OH CRAP! THE SUN! get out of here! RUN!", "talk_face_chief", 200);
Frame 7303
_root.talkbubble(225, 15, 5000, "as for you, chief...", "talk_face_player", 200);
Frame 7834
_root.talkbubble(50, 15, 5000, "finally, i get to have a vacation.", "talk_face_player", 200);
Frame 8153
stop();
Frame 8154
stop();
Symbol 3 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 3 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 3 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 16 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 26 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 35 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 36 MovieClip [UpArrow] Frame 1
stop();
Symbol 36 MovieClip [UpArrow] Frame 2
stop();
Symbol 36 MovieClip [UpArrow] Frame 3
stop();
Symbol 43 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 50 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 55 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 56 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 64 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 72 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 80 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 81 MovieClip [DownArrow] Frame 1
stop();
Symbol 81 MovieClip [DownArrow] Frame 2
stop();
Symbol 81 MovieClip [DownArrow] Frame 3
stop();
Symbol 85 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 val = this.hostComponent.styleTable.embedFonts.value;
if (val != undefined) {
this.labelField.embedFonts = val;
}
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 tmpColor = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (tmpColor == undefined) {
tmpColor = (enable ? 0 : 8947848);
}
this.setColor(tmpColor);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 94 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 97 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "background");
Symbol 100 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 102 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(background_mc, "backgroundDisabled");
Symbol 105 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(disabled_mc, "foregroundDisabled");
Symbol 108 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(dot_mc, "radioDot");
Symbol 109 MovieClip [frb_states] Frame 1
stop();
Symbol 109 MovieClip [frb_states] Frame 2
stop();
Symbol 109 MovieClip [frb_states] Frame 3
stop();
Symbol 109 MovieClip [frb_states] Frame 4
stop();
Symbol 109 MovieClip [frb_states] Frame 5
stop();
Symbol 110 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 i in this.styleFormat_prm) {
this.setStyleProperty(i, this.styleFormat_prm[i]);
}
}
};
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 funct in this.methodTable) {
this[funct]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var inner = this.styleTable.focusRectInner.value;
var outer = this.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, outer);
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, inner);
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 tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((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 || (!global)) {
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 textProp = propName.subString(4, propName.length);
this.textStyle[textProp] = value;
this.invalidate("setSize");
} else {
for (var j in this.styleTable[propName].coloredMCs) {
var myColor = new Color(this.styleTable[propName].coloredMCs[j]);
if (this.styleTable[propName].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
myColor.setTransform(myTObj);
} else {
myColor.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = global;
}
};
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 myColor = new Color(skinMCRef);
myColor.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 i in arguments[0]) {
this[i] = arguments[0][i];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var arg = 0;
while (arg < arguments.length) {
var mcRef = arguments[arg];
this.listeners[arguments[arg]] = mcRef;
for (var i in this) {
if (this.isAStyle(i)) {
mcRef.updateStyleProperty(this, i.toString());
}
}
arg++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var prop in this) {
if (this.isAStyle(prop)) {
if (component.styleTable[prop].useGlobal == this.isGlobal) {
component.styleTable[prop].useGlobal = true;
var value = (this.isGlobal ? undefined : (globalStyleFormat[prop]));
component.setStyleProperty(prop, value, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var count = 0;
for (var i in this.listeners) {
var component = this.listeners[i];
if (arguments.length > 0) {
var j = 0;
while (j < arguments.length) {
if (this.isAStyle(arguments[j])) {
component.updateStyleProperty(this, arguments[j]);
}
j++;
}
} else {
for (var j in this) {
if (this.isAStyle(j)) {
component.updateStyleProperty(this, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 114 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 114 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 117 MovieClip [FRadioButtonSymbol] Frame 1
#initclip 4
function FRadioButtonClass() {
this.init();
}
function FRadioButtonGroupClass() {
this.radioInstances = new Array();
}
FRadioButtonClass.prototype = new FUIComponentClass();
FRadioButtonGroupClass.prototype = new FUIComponentClass();
Object.registerClass("FRadioButtonSymbol", FRadioButtonClass);
FRadioButtonClass.prototype.init = function () {
if (this.initialState == undefined) {
this.selected = false;
} else {
this.selected = this.initialState;
}
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.boundingBox_mc._width = 0;
this.boundingBox_mc._height = 0;
this.attachMovie("frb_hitArea", "frb_hitArea_mc", 1);
this.attachMovie("frb_states", "frb_states_mc", 2);
this.attachMovie("FLabelSymbol", "fLabel_mc", 3);
super.init();
this._xscale = 100;
this._yscale = 100;
this.setSize(this.width, this.height);
this.setChangeHandler(this.changeHandler);
if (this.label != undefined) {
this.setLabel(this.label);
}
if (this.initialState == undefined) {
this.setValue(false);
} else {
this.setValue(this.initialState);
}
if (this.data == "") {
this.data = undefined;
} else {
this.setData(this.data);
}
this.addToRadioGroup();
this.ROLE_SYSTEM_RADIOBUTTON = 45;
this.STATE_SYSTEM_SELECTED = 16;
this.EVENT_OBJECT_STATECHANGE = 32778;
this.EVENT_OBJECT_NAMECHANGE = 32780;
this._accImpl.master = this;
this._accImpl.stub = false;
this._accImpl.get_accRole = this.get_accRole;
this._accImpl.get_accName = this.get_accName;
this._accImpl.get_accState = this.get_accState;
this._accImpl.get_accDefaultAction = this.get_accDefaultAction;
this._accImpl.accDoDefaultAction = this.accDoDefaultAction;
};
FRadioButtonClass.prototype.setHitArea = function (w, h) {
var hit = this.frb_hitArea_mc;
this.hitArea = hit;
if (this.frb_states_mc._width > w) {
hit._width = this.frb_states_mc._width;
} else {
hit._width = w;
}
hit._visible = false;
if (arguments.length > 1) {
hit._height = h;
}
};
FRadioButtonClass.prototype.txtFormat = function (pos) {
var txtS = this.textStyle;
var sTbl = this.styleTable;
txtS.align = ((sTbl.textAlign.value == undefined) ? ((txtS.align = pos)) : undefined);
txtS.leftMargin = ((sTbl.textLeftMargin.value == undefined) ? ((txtS.leftMargin = 0)) : undefined);
txtS.rightMargin = ((sTbl.textRightMargin.value == undefined) ? ((txtS.rightMargin = 0)) : undefined);
if (this.flabel_mc._height > this.height) {
super.setSize(this.width, this.flabel_mc._height);
} else {
super.setSize(this.width, this.height);
}
this.setEnabled(this.enable);
};
FRadioButtonClass.prototype.setSize = function (w, h) {
this.setLabel(this.getLabel());
this.setLabelPlacement(this.labelPlacement);
if (this.frb_states_mc._height < this.flabel_mc.labelField._height) {
super.setSize(w, this.flabel_mc.labelField._height);
}
this.setHitArea(this.width, this.height);
this.setLabelPlacement(this.labelPlacement);
};
FRadioButtonClass.prototype.setLabelPlacement = function (pos) {
this.setLabel(this.getLabel());
this.txtFormat(pos);
var halfLabelH = (this.fLabel_mc._height / 2);
var halfFrameH = (this.frb_states_mc._height / 2);
var vertCenter = (halfFrameH - halfLabelH);
var radioWidth = this.frb_states_mc._width;
var frame = this.frb_states_mc;
var label = this.fLabel_mc;
var w = (this.width - frame._width);
if (frame._width > this.width) {
w = 0;
} else {
w = this.width - frame._width;
}
this.fLabel_mc.setSize(w);
if ((pos == "right") || (pos == undefined)) {
this.labelPlacement = "right";
this.frb_states_mc._x = 0;
this.fLabel_mc._x = radioWidth;
this.txtFormat("left");
} else if (pos == "left") {
this.labelPlacement = "left";
this.fLabel_mc._x = 0;
this.frb_states_mc._x = this.width - radioWidth;
this.txtFormat("right");
}
this.fLabel_mc._y = vertCenter;
this.frb_hitArea_mc._y = vertCenter;
this.setLabel(this.getLabel());
};
FRadioButtonClass.prototype.setData = function (dataValue) {
this.data = dataValue;
};
FRadioButtonClass.prototype.getData = function () {
return(this.data);
};
FRadioButtonClass.prototype.getState = function () {
return(this.selected);
};
FRadioButtonClass.prototype.getSize = function () {
return(this.width);
};
FRadioButtonClass.prototype.getGroupName = function () {
return(this.groupName);
};
FRadioButtonClass.prototype.setGroupName = function (groupName) {
var i = 0;
while (i < this._parent[this.groupName].radioInstances.length) {
if (this._parent[this.groupName].radioInstances[i] == this) {
delete this._parent[this.groupName].radioInstances[i];
}
i++;
}
this.groupName = groupName;
this.addToRadioGroup();
};
FRadioButtonClass.prototype.addToRadioGroup = function () {
if (this._parent[this.groupName] == undefined) {
this._parent[this.groupName] = new FRadioButtonGroupClass();
}
this._parent[this.groupName].addRadioInstance(this);
};
FRadioButtonClass.prototype.setValue = function (selected) {
if (selected || (selected == undefined)) {
this.setState(true);
this.focusRect.removeMovieClip();
this.executeCallBack();
} else if (selected == false) {
this.setState(false);
}
};
FRadioButtonClass.prototype.setTabState = function (selected) {
Selection.setFocus(this);
this.setState(selected);
this.drawFocusRect();
this.executeCallBack();
};
FRadioButtonClass.prototype.setState = function (selected) {
if (selected || (selected == undefined)) {
this.tabEnabled = true;
for (var i in this._parent) {
if ((this != this._parent[i]) && (this._parent[i].groupName == this.groupName)) {
this._parent[i].setState(false);
this._parent[i].tabEnabled = false;
}
}
}
if (this.enable) {
this.flabel_mc.setEnabled(true);
if (selected || (selected == undefined)) {
this.frb_states_mc.gotoAndStop("selectedEnabled");
this.enabled = false;
this.selected = true;
this.tabEnabled = true;
this.tabFocused = true;
} else {
this.frb_states_mc.gotoAndStop("unselectedEnabled");
this.enabled = true;
this.selected = false;
this.tabEnabled = false;
var enabTrue = this._parent[this.groupName].getEnabled();
var noneSelect = (this._parent[this.groupName].getValue() == undefined);
if (enabTrue && (noneSelect)) {
this._parent[this.groupName].radioInstances[0].tabEnabled = true;
}
}
} else {
this.flabel_mc.setEnabled(false);
if (selected || (selected == undefined)) {
this.frb_states_mc.gotoAndStop("selectedDisabled");
this.enabled = false;
this.selected = true;
this.tabEnabled = false;
} else {
this.frb_states_mc.gotoAndStop("unselectedDisabled");
this.enabled = false;
this.selected = false;
this.tabEnabled = false;
}
}
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_STATECHANGE, true);
}
};
FRadioButtonClass.prototype.getValue = function () {
if (this.selected) {
if ((this.data == "") || (this.data == undefined)) {
return(this.getLabel());
}
return(this.data);
}
};
FRadioButtonClass.prototype.setEnabled = function (enable) {
if ((enable == true) || (enable == undefined)) {
this.enable = true;
super.setEnabled(true);
} else {
this.enable = false;
super.setEnabled(false);
}
this.setState(this.selected);
var cgn = (this._parent[this.groupName].getEnabled() == undefined);
var cgnez = (this._parent[this.groupName].radioInstances[0].getEnabled() == false);
if (cgn && (cgnez)) {
var i = 0;
while (i < this._parent[this.groupName].radioInstances.length) {
if (this._parent[this.groupName].radioInstances[i].getEnabled() == true) {
this._parent[this.groupName].radioInstances[i].tabEnabled = true;
return(undefined);
}
i++;
}
}
};
FRadioButtonClass.prototype.getEnabled = function () {
return(this.enable);
};
FRadioButtonClass.prototype.setLabel = function (label) {
this.fLabel_mc.setLabel(label);
this.txtFormat();
if (Accessibility.isActive()) {
Accessibility.sendEvent(this, 0, this.EVENT_OBJECT_NAMECHANGE);
}
};
FRadioButtonClass.prototype.getLabel = function () {
return(this.fLabel_mc.getLabel());
};
FRadioButtonClass.prototype.onPress = function () {
this.pressFocus();
this.frb_states_mc.gotoAndStop("press");
};
FRadioButtonClass.prototype.onRelease = function () {
this.frb_states_mc.gotoAndStop("unselectedDisabled");
this.setValue(!this.selected);
};
FRadioButtonClass.prototype.onReleaseOutside = function () {
this.frb_states_mc.gotoAndStop("unselectedEnabled");
};
FRadioButtonClass.prototype.onDragOut = function () {
this.frb_states_mc.gotoAndStop("unselectedEnabled");
};
FRadioButtonClass.prototype.onDragOver = function () {
this.frb_states_mc.gotoAndStop("press");
};
FRadioButtonClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this._parent[this.groupName]);
};
FRadioButtonGroupClass.prototype.addRadioInstance = function (instance) {
this.radioInstances.push(instance);
this.radioInstances[0].tabEnabled = true;
};
FRadioButtonGroupClass.prototype.setEnabled = function (enableFlag) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setEnabled(enableFlag);
i++;
}
};
FRadioButtonGroupClass.prototype.getEnabled = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].getEnabled() != this.radioInstances[0].getEnabled()) {
return(undefined);
}
i++;
}
return(this.radioInstances[0].getEnabled());
};
FRadioButtonGroupClass.prototype.setChangeHandler = function (changeHandler, obj) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setChangeHandler(changeHandler, obj);
i++;
}
};
FRadioButtonGroupClass.prototype.getValue = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].selected == true) {
if ((this.radioInstances[i].data == "") || (this.radioInstances[i].data == undefined)) {
return(this.radioInstances[i].getLabel());
}
return(this.radioInstances[i].data);
}
i++;
}
};
FRadioButtonGroupClass.prototype.getData = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].selected) {
return(this.radioInstances[i].getData());
}
i++;
}
};
FRadioButtonGroupClass.prototype.getInstance = function () {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].selected == true) {
return(i);
}
i++;
}
};
FRadioButtonGroupClass.prototype.setValue = function (dataValue) {
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].data == dataValue) {
this.radioInstances[i].setValue(true);
return(undefined);
}
i++;
}
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].getLabel() == dataValue) {
this.radioInstances[i].setValue(true);
}
i++;
}
};
FRadioButtonGroupClass.prototype.setSize = function (w) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setSize(w);
i++;
}
};
FRadioButtonGroupClass.prototype.getSize = function () {
var widestRadio = 0;
var i = 0;
while (i < this.radioInstances.length) {
if (this.radioInstances[i].width >= widestRadio) {
widestRadio = this.radioInstances[i].width;
}
i++;
}
return(widestRadio);
};
FRadioButtonGroupClass.prototype.setGroupName = function (groupName) {
this.oldGroupName = this.radioInstances[0].groupName;
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].groupName = groupName;
this.radioInstances[i].addToRadioGroup();
i++;
}
delete this._parent[this.oldGroupName];
};
FRadioButtonGroupClass.prototype.getGroupName = function () {
return(this.radioInstances[0].groupName);
};
FRadioButtonGroupClass.prototype.setLabelPlacement = function (pos) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setLabelPlacement(pos);
i++;
}
};
FRadioButtonGroupClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].setStyleProperty(propName, value, isGlobal);
i++;
}
};
FRadioButtonGroupClass.prototype.addListener = function () {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].addListener();
i++;
}
};
FRadioButtonGroupClass.prototype.applyChanges = function () {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].applyChanges();
i++;
}
};
FRadioButtonGroupClass.prototype.removeListener = function (component) {
var i = 0;
while (i < this.radioInstances.length) {
this.radioInstances[i].removeListener(component);
i++;
}
};
FRadioButtonClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this._width + 6, this._height - 3);
};
FRadioButtonClass.prototype.myOnKillFocus = function () {
Key.removeListener(this.keyListener);
this.focused = false;
this.focusRect.removeMovieClip();
this._parent[this.groupName].foobar = 0;
};
FRadioButtonClass.prototype.myOnKeyDown = function () {
if ((Key.getCode() == 32) && (this._parent[this.groupName].getValue() == undefined)) {
if (this._parent[this.groupName].radioInstances[0] == this) {
this.setTabState(true);
}
}
if ((Key.getCode() == 40) && (this.pressOnce == undefined)) {
this.foobar = this._parent[this.groupName].getInstance();
var i = this.foobar;
while (i < this._parent[this.groupName].radioInstances.length) {
var inc = (i + 1);
if (this._parent[this.groupName].radioInstances[inc].getEnabled()) {
this._parent[this.groupName].radioInstances[inc].setTabState(true);
return(undefined);
}
i++;
}
}
if ((Key.getCode() == 38) && (this.pressOnce == undefined)) {
this.foobar = this._parent[this.groupName].getInstance();
var i = this.foobar;
while (i >= 0) {
var inc = (i - 1);
if (this._parent[this.groupName].radioInstances[inc].getEnabled()) {
this._parent[this.groupName].radioInstances[inc].setTabState(true);
return(undefined);
}
i--;
}
}
};
FRadioButtonClass.prototype.get_accRole = function (childId) {
return(this.master.ROLE_SYSTEM_RADIOBUTTON);
};
FRadioButtonClass.prototype.get_accName = function (childId) {
return(this.master.getLabel());
};
FRadioButtonClass.prototype.get_accState = function (childId) {
if (this.master.getState()) {
return(this.master.STATE_SYSTEM_SELECTED);
}
return(0);
};
FRadioButtonClass.prototype.get_accDefaultAction = function (childId) {
if (this.master.getState()) {
return("UnCheck");
}
return("Check");
};
FRadioButtonClass.prototype.accDoDefaultAction = function (childId) {
this.master.setValue(!this.master.getValue());
};
#endinitclip
boundingBox_mc._visible = false;
deadPreview._visible = false;
Symbol 142 MovieClip [player_run_reload_left] Frame 20
_root.player.reloaded();
Symbol 177 MovieClip [player_reload_left] Frame 15
_root.player.reloaded();
Symbol 182 MovieClip [player_reload_right] Frame 15
_root.player.reloaded();
Symbol 223 MovieClip [player_jump_left] Frame 15
_root.player.jumpready = true;
Symbol 223 MovieClip [player_jump_left] Frame 20
if (!_root.player.apogeereached) {
gotoAndPlay (20);
}
Symbol 223 MovieClip [player_jump_left] Frame 40
if (!_root.player.landed) {
gotoAndPlay (20);
}
Symbol 239 MovieClip [player_jump_right] Frame 15
_root.player.jumpready = true;
Symbol 239 MovieClip [player_jump_right] Frame 20
if (!_root.player.apogeereached) {
gotoAndPlay (20);
}
Symbol 239 MovieClip [player_jump_right] Frame 40
if (!_root.player.landed) {
gotoAndPlay (20);
}
Symbol 257 MovieClip [player_run_reload_right] Frame 20
_root.player.reloaded();
Symbol 327 MovieClip [vampire_hit_left] Frame 5
stop();
Symbol 341 MovieClip [vampire_dead_left] Frame 15
stop();
Symbol 350 MovieClip [vampire_dead_right] Frame 15
stop();
Symbol 358 MovieClip [vampire_hit_right] Frame 5
stop();
Symbol 390 MovieClip [gunflash_right] Frame 5
this.removeMovieClip();
Symbol 419 MovieClip [robot_explode_left] Frame 27
stop();
Symbol 425 MovieClip [robot_explode_right] Frame 27
stop();
Symbol 457 MovieClip [talk_bubble] Frame 1
showTimer = getTimer() + delay;
this.attachMovie(face, face, 1);
setProperty(face, _visible , false);
setProperty(face, _x , 32);
setProperty(face, _y , 25);
Symbol 457 MovieClip [talk_bubble] Frame 19
setProperty(face, _visible , true);
Symbol 457 MovieClip [talk_bubble] Frame 21
if (getTimer() < showTimer) {
gotoAndPlay (20);
} else {
play();
}
Symbol 457 MovieClip [talk_bubble] Frame 22
setProperty(face, _visible , false);
Symbol 457 MovieClip [talk_bubble] Frame 40
this.removeMovieClip();
Symbol 484 MovieClip [sparks] Frame 20
this.removeMovieClip();
Symbol 491 MovieClip [gunflash_left] Frame 5
this.removeMovieClip();
Symbol 553 MovieClip [blood] Frame 20
this.removeMovieClip();
stop();
Symbol 570 MovieClip Frame 10
stop();
Symbol 583 MovieClip Frame 31
stop();
Symbol 603 Button
on (release) {
_root.gotonextscene();
}
Symbol 607 Button
on (release) {
_root.gotomainmenu();
}
Symbol 608 MovieClip [level_end] Frame 1
kills = _root.kills;
shotsfired = _root.shotsfired;
accuracy = _root.accuracy;
accuracytext = accuracy + "%";
award1 = _root.award1;
award2 = _root.award2;
award3 = _root.award3;
ranking = _root.ranking;
Symbol 608 MovieClip [level_end] Frame 45
stop();
Symbol 612 MovieClip [explosion_area_1] Frame 20
this.removeMovieClip();
stop();
Symbol 619 MovieClip [powerup_health] Frame 60
gotoAndPlay (10);
Symbol 621 MovieClip [powerup_grenade] Frame 60
gotoAndPlay (10);
Symbol 623 MovieClip [powerup_ammo] Frame 60
gotoAndPlay (10);
Symbol 659 MovieClip [explosion_2] Frame 30
this.removeMovieClip();
stop();
Symbol 663 MovieClip [explosion_1] Frame 30
this.removeMovieClip();
stop();
Symbol 672 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 673 MovieClip [FScrollBarSymbol] Frame 1
#initclip 6
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 tmp = 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;
tmp = Math.min(tmp, this.maxPos);
this.setScrollPosition(Math.max(tmp, 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 wasEnabled = this.enable;
if (enabledFlag && (!wasEnabled)) {
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) && (wasEnabled)) {
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 delt = this.smallScroll;
if (inc != "one") {
delt = ((this.largeScroll == 0) ? (this.pageSize) : (this.largeScroll));
}
var newPos = (this.getScrollPosition() + (mode * delt));
if (newPos > this.maxPos) {
newPos = this.maxPos;
} else if (newPos < this.minPos) {
newPos = this.minPos;
}
this.setScrollPosition(newPos);
};
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 c = this.controller;
c.scrollPosition = Math.round(((c.maxPos - c.minPos) * (this._y - c.scrollTop)) / c.trackHeight) + c.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 pos = this.textField.hscroll;
this.setScrollProperties(this.textField._width, 0, this.textField.maxhscroll);
this.setScrollPosition(Math.min(pos, this.textField.maxhscroll));
} else {
var pos = this.textField.scroll;
var pageSize = (this.textField.bottomScroll - this.textField.scroll);
this.setScrollProperties(pageSize, 1, this.textField.maxscroll);
this.setScrollPosition(Math.min(pos, 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 674 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 eventObj = {event:"updateAll"};
viewRef.modelChanged(eventObj);
};
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 eventObj = {event:"addRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var tmpItm = this.items[index];
this.items.splice(index, 1);
var eventObj = {event:"deleteRows", firstRow:index, lastRow:index};
this.updateViews(eventObj);
return(tmpItm);
};
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 tmpID = this.getItemID(index);
if (typeof(itemObj) == "object") {
this.items[index] = itemObj;
} else {
this.items[index].label = itemObj;
}
this.items[index].__ID__ = tmpID;
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 i = 0;
while (i < this.views.length) {
this.views[i].modelChanged(eventObj);
i++;
}
};
#endinitclip
Symbol 675 MovieClip [FSelectableItemSymbol] Frame 1
#initclip 8
function FSelectableItemClass() {
this.init();
}
FSelectableItemClass.prototype = new FUIComponentClass();
FSelectableItemClass.prototype.init = function () {
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 LOWEST_DEPTH = -16384;
this.width = width;
this.layoutContent(width);
this.attachMovie("FHighlightSymbol", "highlight_mc", LOWEST_DEPTH);
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 tmpLabel = "";
if (itmObj.label != undefined) {
tmpLabel = itmObj.label;
} else if (typeof(itmObj) == "object") {
for (var i in itmObj) {
if (i != "__ID__") {
tmpLabel = (itmObj[i] + ", ") + tmpLabel;
}
}
tmpLabel = tmpLabel.substring(0, tmpLabel.length - 2);
} else {
tmpLabel = itmObj;
}
if (this.fLabel_mc.labelField.text != tmpLabel) {
this.fLabel_mc.setLabel(tmpLabel);
}
var clr = (selected ? (this.controller.styleTable.textSelected.value) : (this.controller.styleTable.textColor.value));
if (clr == undefined) {
clr = (selected ? 16777215 : 0);
}
this.fLabel_mc.setColor(clr);
};
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 676 MovieClip [FSelectableListSymbol] Frame 1
#initclip 5
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 item = this.getItemAt(index);
this.dataProvider.removeItemAt(index);
return(item);
};
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 uniqueID in this.selected) {
var tmpInd = this.selected[uniqueID].sIndex;
if (tmpInd != undefined) {
return(tmpInd);
}
}
};
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 item = this.getSelectedItem();
return(((item.data == undefined) ? (item.label) : (item.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 i = 0;
while (i < obj.length) {
var value = ((typeof(obj[i]) == "string") ? ({label:obj[i]}) : (obj[i]));
this.dataProvider.addItem(value);
i++;
}
} 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) {
super.setEnabled(enabledFlag);
this.enable = enabledFlag;
this.boundingBox_mc.gotoAndStop((this.enable ? "enabled" : "disabled"));
var limit = Math.min(this.numDisplayed, this.getLength());
var i = 0;
while (i < limit) {
this.container_mc[("fListItem" + i) + "_mc"].setEnabled(this.enable);
i++;
}
if (this.enable) {
this.invalidate("updateControl");
}
};
FSelectableListClass.prototype.updateControl = function () {
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].drawItem(this.getItemAt(this.topDisplayed + i), this.isSelected(this.topDisplayed + i));
i++;
}
};
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 i = 0;
while (i < this.numDisplayed) {
this.container_mc.attachMovie(this.itemSymbol, ("fListItem" + i) + "_mc", 10 + i, {controller:this, itemNum:i});
var item_mc = this.container_mc[("fListItem" + i) + "_mc"];
var offset = ((this.scrollOffset == undefined) ? 0 : (this.scrollOffset));
item_mc.setSize(this.width - offset, this.itmHgt);
item_mc._y = (this.itmHgt - 2) * i;
i++;
}
this.updateControl();
};
FSelectableListClass.prototype.modelChanged = function (eventObj) {
var firstRow = eventObj.firstRow;
var lastRow = eventObj.lastRow;
var event = eventObj.event;
if (event == "addRows") {
for (var i in this.selected) {
if ((this.selected[i].sIndex != undefined) && (this.selected[i].sIndex >= firstRow)) {
this.selected[i].sIndex = this.selected[i].sIndex + ((lastRow - firstRow) + 1);
this.setSelectedIndex(this.selected[i].sIndex, false);
}
}
} else if (event == "deleteRows") {
if (firstRow == lastRow) {
var index = firstRow;
if (this.selectHolder == index) {
this.selectionDeleted = true;
}
if (((this.topDisplayed + this.numDisplayed) >= this.getLength()) && (this.topDisplayed > 0)) {
this.topDisplayed--;
if (this.selectionDeleted && ((index - 1) >= 0)) {
this.setSelectedIndex(index - 1, false);
}
} else if (this.selectionDeleted) {
var len = this.getLength();
if (((index == (len - 1)) && (len > 1)) || (index > (len / 2))) {
this.setSelectedIndex(index - 1, false);
} else {
this.setSelectedIndex(index, false);
}
}
for (var i in this.selected) {
if (this.selected[i].sIndex > firstRow) {
this.selected[i].sIndex--;
}
}
} else {
this.clearSelected();
this.topDisplayed = 0;
}
} else if (event == "sort") {
var len = this.getLength();
var i = 0;
while (i < len) {
if (this.isSelected(i)) {
var id = this.dataProvider.getItemID(i);
if (id == this.lastSelID) {
this.lastSelected = i;
}
this.selected[String(id)].sIndex = i;
}
i++;
}
}
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 uniqueID in this.selected) {
var index = this.selected[uniqueID].sIndex;
if (((index != undefined) && (this.topDisplayed <= index)) && (index < (this.topDisplayed + this.numDisplayed))) {
this.container_mc[("fListItem" + (index - this.topDisplayed)) + "_mc"].drawItem(this.getItemAt(index), false);
}
}
delete this.selected;
this.selected = new Array();
};
FSelectableListClass.prototype.selectionHandler = function (itemNum) {
var tmpInd = (this.topDisplayed + itemNum);
if (this.getItemAt(tmpInd == undefined)) {
this.changeFlag = false;
return(undefined);
}
this.changeFlag = true;
this.clearSelected();
this.selectItem(tmpInd, true);
this.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(this.getItemAt(tmpInd), this.isSelected(tmpInd));
};
FSelectableListClass.prototype.moveSelBy = function (incr) {
var itmNum = this.getSelectedIndex();
var newItm = (itmNum + incr);
newItm = Math.max(0, newItm);
newItm = Math.min(this.getLength() - 1, newItm);
if (newItm == itmNum) {
return(undefined);
}
if ((itmNum < this.topDisplayed) || (itmNum >= (this.topDisplayed + this.numDisplayed))) {
this.setScrollPosition(itmNum);
}
if ((newItm >= (this.topDisplayed + this.numDisplayed)) || (newItm < this.topDisplayed)) {
this.setScrollPosition(this.topDisplayed + incr);
}
this.selectionHandler(newItm - 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 i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("enabled");
i++;
}
};
FSelectableListClass.prototype.myOnKillFocus = function () {
super.myOnKillFocus();
var i = 0;
while (i < this.numDisplayed) {
this.container_mc[("fListItem" + i) + "_mc"].highlight_mc.gotoAndStop("unfocused");
i++;
}
};
#endinitclip
Instance of Symbol 674 MovieClip [DataProviderSymbol] "dPAsset" in Symbol 676 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Instance of Symbol 675 MovieClip [FSelectableItemSymbol] "ItemAsset" in Symbol 676 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 677 MovieClip [FScrollSelectListSymbol] Frame 1
#initclip 7
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 pos = this.getScrollPosition();
super.setSize(w, h);
if (this.scrollBar_mc != undefined) {
this.removed = true;
}
this.scrollBar_mc = undefined;
this.initScrollBar();
this.setScrollPosition(pos);
};
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 pos = scrollBar.getScrollPosition();
this.topDisplayed = pos;
if (this.lastPosition != pos) {
this.updateControl();
}
this.lastPosition = pos;
};
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 i = 0;
while (i < this.keyCodes.length) {
if (Key.isDown(this.keyCodes[i])) {
this.moveSelBy(this.keyIncrs[i]);
return(undefined);
}
i++;
}
this.findInputText();
}
};
FScrollSelectListClass.prototype.findInputText = function () {
var tmpCode = Key.getAscii();
if ((tmpCode >= 33) && (tmpCode <= 126)) {
this.findString(String.fromCharCode(tmpCode));
}
};
FScrollSelectListClass.prototype.findString = function (str) {
if (this.getLength() == 0) {
return(undefined);
}
var itemNum = this.getSelectedIndex();
var jump = 0;
var i = (itemNum + 1);
while (i != itemNum) {
var itmStr = this.getItemAt(i).label.substring(0, str.length);
if ((str == itmStr) || (str.toUpperCase() == itmStr.toUpperCase())) {
var jump = (i - itemNum);
break;
}
if (i >= (this.getLength() - 1)) {
i = -1;
}
i++;
}
if (jump != 0) {
this.moveSelBy(jump);
}
};
#endinitclip
Instance of Symbol 673 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 677 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
onClipEvent (load) {
this._width = (this._height = 1);
}
Instance of Symbol 676 MovieClip [FSelectableListSymbol] "superClassAsset" in Symbol 677 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 678 MovieClip [FComboBoxItemSymbol] Frame 1
#initclip 10
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 681 MovieClip [FComboBoxSymbol] Frame 1
#initclip 9
function FComboBoxClass() {
_global._popUpLevel = ((_global._popUpLevel == undefined) ? 20000 : (_global._popUpLevel + 1));
this.superHolder = _root.createEmptyMovieClip("superHolder" + _popUpLevel, _popUpLevel);
var testContainer = this.superHolder.createEmptyMovieClip("testCont", 20000);
var testBox = testContainer.attachMovie("FBoundingBoxSymbol", "boundingBox_mc", 0);
if (testBox._name == undefined) {
this.superHolder.removeMovieClip();
this.superHolder = this._parent.createEmptyMovieClip("superHolder" + _popUpLevel, _popUpLevel);
} else {
testContainer.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 i = 0;
while (i < this.labels.length) {
this.addItem(this.labels[i], this.data[i]);
i++;
}
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 event = eventObj.event;
if ((event == "addRows") || (event == "deleteRows")) {
var diff = ((eventObj.lastRow - eventObj.firstRow) + 1);
var mode = ((event == "addRows") ? 1 : -1);
var len = this.getLength();
var lenBefore = (len - (mode * diff));
if ((this.rowCount > lenBefore) || (this.rowCount > len)) {
this.invalidate("setSize");
}
if (this.getSelectedIndex() == undefined) {
this.setSelectedIndex(0, false);
}
} else if (event == "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 len = this.getLength();
if ((len - this.getScrollPosition()) < this.rowCount) {
this.setScrollPosition(len - Math.min(this.rowCount, len));
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 point = {x:this._x, y:this._y + this.proxyBox_mc._height};
this._parent.localToGlobal(point);
mcRef._parent.globalToLocal(point);
mcRef._x = point.x;
mcRef._y = point.y;
if ((this.height + mcRef._y) >= Stage.height) {
this.upward = true;
mcRef._y = (point.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 onCombo = this.boundingBox_mc.hitTest(_root._xmouse, _root._ymouse);
if (this.changeFlag) {
if (onCombo) {
this.fireChange();
}
this.openOrClose(!this.opened);
} else if (onCombo) {
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 677 MovieClip [FScrollSelectListSymbol] "superClassAsset" in Symbol 681 MovieClip [FComboBoxSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 724 Button
on (release) {
i = 0;
while (i < 16) {
removeMovieClip("vam" + i);
i++;
}
gotoAndPlay (5);
}
Symbol 731 Button
on (release) {
i = 0;
while (i < 16) {
removeMovieClip("vam" + i);
i++;
}
gotoAndPlay (4);
}
Symbol 753 Button
on (release) {
i = 0;
while (i < 16) {
removeMovieClip("vam" + i);
i++;
}
_global.score = 0;
if (_global.difficulty == 0) {
_global.difficulty = 1;
}
gotoAndPlay (6);
}
Symbol 763 Button
on (release) {
gotoAndPlay (3);
}
Symbol 767 Button
on (release) {
_global._quality = "MEDIUM";
this._quality = "MEDIUM";
}
Symbol 771 Button
on (release) {
_global._quality = "LOW";
this._quality = "LOW";
}
Symbol 775 Button
on (release) {
_global._quality = "HIGH";
this._quality = "HIGH";
}
Symbol 805 Button
on (release) {
gotoAndPlay (1106);
}
Symbol 827 MovieClip Frame 30
stop();
Symbol 832 MovieClip Frame 30
stop();
Instance of Symbol 836 MovieClip "fader" in Symbol 837 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this._alpha > 0) && (getTimer() > this.fadetimer)) {
this._alpha = this._alpha - 2;
this.fadetimer = getTimer() + 10;
} else {
_root.play();
}
}
Symbol 860 MovieClip Frame 31
stop();
Symbol 861 MovieClip Frame 1
kills = _root.kills;
shotsfired = _root.shotsfired;
accuracy = _root.accuracy;
accuracytext = accuracy + "%";
award1 = _root.award1;
award2 = _root.award2;
award3 = _root.award3;
ranking = _root.ranking;
Symbol 861 MovieClip Frame 45
stop();
Symbol 870 Button
on (release) {
gotoAndPlay (1517);
}
Symbol 896 Button
on (release) {
gotoAndPlay (2629);
}
Symbol 921 Button
on (release) {
gotoAndPlay (3615);
}
Symbol 946 Button
on (release) {
gotoAndPlay (4697);
}
Symbol 977 Button
on (release) {
gotoAndPlay (8154);
}
Symbol 1009 MovieClip Frame 90
stop();
Symbol 1017 Button
on (release) {
gotoAndPlay (4709);
}
Symbol 1021 Button
on (release) {
gotoAndStop (8154);
}
Symbol 1035 Button
on (release) {
gotoAndPlay (3);
}