Frame 1
var land = (new util.Landings());
Frame 3
function intro() {
temp = attachMovie("intro", "intro", _root.getNextHighestDepth());
temp.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
mainmenu();
}
};
}
function mainmenu() {
gotoAndStop ("mainmenu");
temp = attachMovie("mainmenu", "mainmenu", _root.getNextHighestDepth());
temp.startgame_btn.onRelease = function () {
temp.play();
temp.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
gotoAndStop ("game");
this.removeMovieClip();
}
};
};
temp.quality_btn.onRelease = function () {
togglequality();
};
var _local3 = temp.soundControl_mc;
_local3.gotoAndStop(1);
_local3.onRelease = function () {
if (!_root.isMute) {
_root.isMute = true;
} else {
_root.isMute = false;
}
toggleSound(this);
};
}
function toggleSound(t) {
if (_root.isMute == true) {
t.gotoAndStop(2);
bg_snd.fnStop();
} else {
t.gotoAndStop(1);
bg_snd.fnPlay();
}
}
function gameover() {
temp = attachMovie("gameover", "gameover", _root.getNextHighestDepth());
temp.playagain_btn.onRelease = function () {
this._parent.removeMovieClip();
clear_enemies();
init();
mousecontrols();
spawn_player();
update_health();
};
temp.togglequality_btn.onRelease = function () {
togglequality();
};
temp.playmoregames_btn.onRelease = function () {
getURL ("http://www.jackpotjoy.com/jackpotjoy/home.do", "_blank");
};
}
function win() {
container_characters.player_mc.win = true;
container_characters.player_mc.alive = false;
controls_disable();
score = container_characters.player_mc.score;
temp = attachMovie("winscreen", "winscreen", _root.getNextHighestDepth());
temp.playagain_btn.onRelease = function () {
_root.container_characters.player_mc.removeMovieClip();
this._parent.removeMovieClip();
clear_enemies();
init();
mousecontrols();
spawn_player();
update_health();
};
temp.togglequality_btn.onRelease = function () {
togglequality();
};
temp.playmoregames_btn.onRelease = function () {
getURL ("http://www.jackpotjoy.com/jackpotjoy/home.do", "_blank");
};
}
function init() {
score = 0;
lane = [290, 360, 430];
enemies = [];
bgspeed = -128;
shooting_count = 0;
shooting_max = 2;
scenario = -1;
scenario_phase = 0;
scenario_delay = 0;
update_scenario();
}
function togglequality() {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else {
_quality = "HIGH";
}
}
function update_scenario() {
scenario_phase--;
}
function next_scenario() {
if (container_characters.player_mc.alive == true) {
scenario++;
switch (scenario) {
case 0 :
controls_disable();
scenario_phase = 1;
tutorial();
scenario_delay = 30;
break;
case 1 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(2, 75);
scenario_delay = 15;
break;
case 2 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(0, 75);
scenario_delay = 15;
break;
case 3 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 75);
scenario_delay = 15;
break;
case 4 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 75);
spawn_enemy_trafficshort(2, 75);
scenario_delay = 0;
break;
case 5 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(40, 10, 30, "safe", "safe");
scenario_delay = 30;
break;
case 6 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(0, 60);
scenario_delay = 0;
break;
case 7 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(1, 60);
spawn_enemy_trafficshort(2, 60);
scenario_delay = 0;
break;
case 8 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(60, 13, 20, "safe", "safe");
scenario_delay = 30;
break;
case 9 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(60, 13, 10, "player", "safe");
scenario_delay = 30;
break;
case 10 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 60);
scenario_delay = 0;
break;
case 11 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(2, 60);
scenario_delay = 90;
break;
case 12 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 20);
scenario_delay = 0;
break;
case 13 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(2, 20);
scenario_delay = 0;
break;
case 14 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(2, 20);
scenario_delay = 0;
break;
case 15 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(0, 20);
scenario_delay = 0;
break;
case 16 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 20);
scenario_delay = 0;
break;
case 17 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 30);
spawn_enemy_trafficshort(2, 30);
scenario_delay = 0;
break;
case 18 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 30);
spawn_enemy_trafficshort(1, 30);
scenario_delay = 0;
break;
case 19 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 0);
scenario_delay = 0;
break;
case 20 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(1, 0);
spawn_enemy_van(20, 15, 0, 0, 0);
scenario_delay = 60;
break;
case 21 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(2, 60);
spawn_enemy_van(20, 15, 0, 1, "safe");
scenario_delay = 15;
break;
case 22 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, 0, "safe");
scenario_delay = 0;
break;
case 23 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, 1, "safe");
scenario_delay = 0;
break;
case 24 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, 0, "safe");
scenario_delay = 0;
break;
case 25 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, 1, "safe");
scenario_delay = 60;
break;
case 26 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(100, 18, 0, 0, "safe");
spawn_enemy_van(100, 18, 0, 1, "safe");
scenario_delay = 60;
break;
case 27 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, 1, "safe");
scenario_delay = 30;
break;
case 28 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 60);
scenario_delay = 30;
break;
case 29 :
scenario_phase = scenario_phase + 2;
spawn_enemy_van(100, 18, 0, 0, "safe");
scenario_delay = 30;
break;
case 30 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(1, 30);
spawn_enemy_trafficshort(2, 30);
scenario_delay = 0;
break;
case 31 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 30);
spawn_enemy_trafficshort(1, 30);
scenario_delay = 0;
break;
case 32 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(2, 30);
scenario_delay = 0;
break;
case 33 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(1, 30);
scenario_delay = 0;
break;
case 34 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 30);
spawn_enemy_trafficshort(2, 30);
scenario_delay = 0;
break;
case 35 :
scenario_phase = scenario_phase + 2;
spawn_enemy_van(100, 18, 0, "safe", 1);
spawn_enemy_trafficshort(0, 0);
spawn_enemy_trafficshort(2, 0);
scenario_delay = 0;
break;
case 36 :
scenario_phase = scenario_phase + 3;
spawn_enemy_trafficshort(0, 0);
spawn_enemy_trafficshort(2, 0);
scenario_delay = 0;
break;
case 37 :
scenario_phase = scenario_phase + 2;
spawn_enemy_van(40, 10, 30, "safe", 1);
spawn_enemy_trafficshort(0, 30);
spawn_enemy_trafficshort(2, 30);
scenario_delay = 0;
break;
case 38 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, "safe", "safe");
scenario_delay = 0;
break;
case 39 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, "player", "safe");
scenario_delay = 0;
break;
case 40 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(20, 15, 0, "safe", "safe");
scenario_delay = 0;
break;
case 41 :
scenario_phase = scenario_phase + 2;
spawn_enemy_van(100, 20, 0, "player", "safe");
scenario_delay = 0;
break;
case 42 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 20);
spawn_enemy_trafficshort(2, 20);
scenario_delay = 0;
break;
case 43 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(0, 20);
spawn_enemy_trafficshort(1, 20);
scenario_delay = 0;
break;
case 44 :
scenario_phase = scenario_phase + 2;
spawn_enemy_trafficshort(1, 20);
spawn_enemy_trafficshort(2, 20);
scenario_delay = 0;
break;
case 45 :
scenario_phase = scenario_phase + 1;
spawn_enemy_van(100, 20, 0, "player", 0);
spawn_enemy_van(100, 20, 0, "player", 2);
spawn_enemy_trafficshort(1, 20);
scenario_delay = 90;
break;
case 46 :
scenario_phase = scenario_phase + 2;
spawn_enemy_van(20, 15, 0, "player", "safe");
scenario_delay = 0;
break;
case 47 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(0, 20);
scenario_delay = 0;
break;
case 48 :
scenario_phase = scenario_phase + 1;
spawn_enemy_trafficshort(0, 20);
scenario_delay = 0;
break;
case 49 :
scenario_phase = scenario_phase + 2;
spawn_enemy_van(100, 20, 0, "player", "safe");
scenario_delay = 90;
break;
case 50 :
scenario_phase = scenario_phase + 1;
bonus();
scenario_delay = 30;
break;
case 51 :
scenario_phase = scenario_phase + 1;
spawn_5bonuscoins(1);
scenario_delay = 0;
break;
case 52 :
scenario_phase = scenario_phase + 1;
spawn_5bonuscoins(0);
scenario_delay = 0;
break;
case 53 :
scenario_phase = scenario_phase + 1;
spawn_5bonuscoins(1);
scenario_delay = 0;
break;
case 54 :
scenario_phase = scenario_phase + 1;
spawn_5bonuscoins(2);
scenario_delay = 0;
break;
case 55 :
scenario_phase = scenario_phase + 1;
spawn_5bonuscoins(1);
scenario_delay = 30;
break;
case 56 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(1);
scenario_delay = 0;
break;
case 57 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(0);
scenario_delay = 0;
break;
case 58 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(1);
scenario_delay = 0;
break;
case 59 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(2);
scenario_delay = 0;
break;
case 60 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(0);
scenario_delay = 0;
break;
case 61 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(1);
scenario_delay = 0;
break;
case 62 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(2);
scenario_delay = 0;
break;
case 63 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(1);
scenario_delay = 0;
break;
case 64 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(0);
scenario_delay = 0;
break;
case 65 :
scenario_phase = scenario_phase + 1;
spawn_2bonuscoins(1);
scenario_delay = 30;
break;
case 66 :
win();
}
trace("Scenario " + scenario);
trace("-----------------");
}
}
function mousecontrols() {
onEnterFrame = function () {
if (shooting == true) {
container_mouseshots.mouseshots_mc._rotation = Math.random() * 360;
container_mouseshots.mouseshots_mc._x = (_xmouse - 10) + (Math.random() * 20);
container_mouseshots.mouseshots_mc._y = (_ymouse - 10) + (Math.random() * 20);
if (shooting_count >= shooting_max) {
shooting_count = 0;
i = 0;
while (i < enemies.length) {
if (enemies[i].targetbox_mc.hitTest(_xmouse, _ymouse)) {
enemies[i].healthbar_mc._visible = true;
enemies[i].healthbarbacking_mc._visible = true;
enemies[i].healthbar_mc._xscale = (enemies[i].health / enemies[i].healthmax) * 100;
enemies[i].health--;
enemies[i].gotoAndPlay("shot");
sparks(5, _xmouse, _ymouse);
if (enemies[i].health <= 0) {
container_characters.player_mc.score = container_characters.player_mc.score + (enemies[i].healthmax * 10);
update_scenario();
spawn_enemy_van_dead(enemies[i]._x, enemies[i]._y);
explosion_smoke(10, enemies[i]._x, enemies[i]._y);
explosion(enemies[i]._x, enemies[i]._y);
enemies[i].removeMovieClip();
enemies.splice(i, 1);
}
}
i++;
}
} else {
shooting_count++;
}
}
if (scenario_phase <= 0) {
scenario_delay--;
if (scenario_delay <= 0) {
next_scenario();
}
}
};
temp = container_crosshair.attachMovie("crosshair", "crosshair_mc", container_crosshair.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse, _visible:false});
temp = container_mouseshots.attachMovie("mouseshots", "mouseshots_mc", container_mouseshots.getNextHighestDepth(), {_visible:false});
onMouseDown = function () {
if (container_characters.player_mc.enable == true) {
if (!_root.isMute) {
shot_snd.fnPlay();
}
container_characters.player_mc.driver_mc._visible = false;
container_characters.player_mc.drivershooting_mc._visible = true;
container_mouseshots.mouseshots_mc._visible = true;
container_crosshair.crosshair_mc._visible = false;
shooting = true;
} else {
shot_snd.fnStop();
shooting = false;
}
};
onMouseUp = function () {
if (container_characters.player_mc.enable == true) {
container_characters.player_mc.driver_mc._visible = true;
container_characters.player_mc.drivershooting_mc._visible = false;
container_mouseshots.mouseshots_mc._visible = false;
container_crosshair.crosshair_mc._visible = true;
}
shot_snd.fnStop();
shooting = false;
};
onMouseMove = function () {
if (container_characters.player_mc.enable == true) {
container_crosshair.crosshair_mc._x = _xmouse;
container_crosshair.crosshair_mc._y = _ymouse;
container_mouseshots.mouseshots_mc._x = _xmouse;
container_mouseshots.mouseshots_mc._y = _ymouse;
updateAfterEvent();
}
};
}
function spawn_player() {
temp = container_characters.attachMovie("player", "player_mc", container_characters.getNextHighestDepth(), {_x:Stage.width / 2, _y:lane[1]});
temp.win = false;
temp.alive = true;
temp.enable = false;
temp.health = 100;
temp.score = 0;
temp.hitbox_mc._visible = false;
temp.drivershooting_mc._visible = false;
temp.changeanim = true;
temp.collision = false;
temp.collisionin = 8;
temp.vx = 0;
temp.vxcontrol = 4;
temp.vxmax = 20;
temp.vxfade = 0.7;
temp.vy = 5;
temp.vyfade = 3;
temp.tolerance = 50;
temp.keyup = false;
temp.keydown = false;
temp.lane = 1;
temp.lanechange = false;
temp.lanedist = 0;
temp.space = false;
temp.onEnterFrame = function () {
if (this.enable == true) {
if (Key.isDown(38)) {
if ((this.keyup == false) && (this.lane != 0)) {
this.keyup = true;
this.lanechange = true;
switch (this.lane) {
case 1 :
this.lane = 0;
break;
case 2 :
this.lane = 1;
}
}
} else if (Key.isDown(40)) {
if ((this.keydown == false) && (this.lane != 2)) {
this.keydown = true;
this.lanechange = true;
switch (this.lane) {
case 0 :
this.lane = 1;
break;
case 1 :
this.lane = 2;
}
}
} else {
this.keyup = false;
this.keydown = false;
}
}
if (this.enable == true) {
if (Key.isDown(37)) {
if (this._x > this.tolerance) {
if (this.vx < (-this.vxmax)) {
this.vx = -this.vxmax;
} else {
this.vx = this.vx - this.vxcontrol;
if (this.changeanim == true) {
this.changeanim = false;
this.gotoAndPlay("left");
}
}
} else {
this.vx = 0;
}
} else if (Key.isDown(39)) {
if (this._x < (Stage.width - this.tolerance)) {
if (this.vx > this.vxmax) {
this.vx = this.vxmax;
} else {
this.vx = this.vx + this.vxcontrol;
if (this.changeanim == true) {
this.changeanim = false;
this.gotoAndPlay("right");
}
}
} else if (this._x <= this.tolerance) {
this.vx = 0;
this._x == this.tolerance;
} else {
this.vx = 0;
}
} else {
if ((this.vx < 0) && (this.changeanim == false)) {
this.gotoAndPlay("leftstop");
} else if ((this.vx > 0) && (this.changeanim == false)) {
this.gotoAndPlay("rightstop");
}
this.changeanim = true;
if ((this.vx > 1) || (this.vx < -1)) {
this.vx = this.vx * this.vxfade;
} else {
this.vx = 0;
}
if ((this._x <= this.tolerance) || (this._x >= (Stage.width - this.tolerance))) {
this.vx = 0;
}
}
}
if (this.lanechange == true) {
this.lanedist = lane[this.lane] - this._y;
this._y = this._y + (this.lanedist / this.vyfade);
if ((this.lanedist < 1) && (this.lanedist > -1)) {
this._y = lane[this.lane];
this.lanechange = false;
}
if ((this.lanedist < 20) && (this.lanedist > -20)) {
this.keyup = false;
this.keydown = false;
}
}
this._x = this._x + this.vx;
if (this.enable == true) {
this.dx = this._xmouse - this.driverref_mc._x;
this.dy = this._ymouse - this.driverref_mc._y;
this.radians = Math.atan2(this.dy, this.dx);
this.degrees = (this.radians * 180) / Math.PI;
if ((this.degrees >= -180) && (this.degrees < -168)) {
this.driver_mc.gotoAndStop("left");
} else if ((this.degrees >= -168) && (this.degrees < -130)) {
this.driver_mc.gotoAndStop("upleft");
} else if ((this.degrees >= -130) && (this.degrees < -50)) {
this.driver_mc.gotoAndStop("up");
} else if ((this.degrees >= -50) && (this.degrees < -12)) {
this.driver_mc.gotoAndStop("upright");
} else if ((this.degrees >= -12) && (this.degrees < 12)) {
this.driver_mc.gotoAndStop("right");
} else if ((this.degrees >= 12) && (this.degrees < 50)) {
this.driver_mc.gotoAndStop("downright");
} else if ((this.degrees >= 50) && (this.degrees < 130)) {
this.driver_mc.gotoAndStop("down");
} else if ((this.degrees >= 130) && (this.degrees < 168)) {
this.driver_mc.gotoAndStop("downleft");
} else if ((this.degrees >= 168) && (this.degrees <= 180)) {
this.driver_mc.gotoAndStop("left");
}
this.drivershooting_mc.gotoAndStop(this.driver_mc._currentframe);
}
i = 0;
while (i < enemies.length) {
if ((this._y >= enemies[i]._y) && (this.getDepth() < enemies[i].getDepth())) {
this.swapDepths(enemies[i]);
} else if ((this._y < enemies[i]._y) && (this.getDepth() > enemies[i].getDepth())) {
this.swapDepths(enemies[i]);
}
if (this.collisionin <= 0) {
if (this.hitbox_mc.hitTest(enemies[i].hitbox_mc) == true) {
if (!_root.isMute) {
hit_snd.fnPlay();
}
if (this._y < enemies[i]._y) {
if (this.lane > 0) {
this.lanechange = true;
this.lane--;
}
} else if (this._y > enemies[i]._y) {
if (this.lane < 2) {
this.lanechange = true;
this.lane++;
}
}
this.changeanim = true;
this.gotoAndPlay("collision");
enemies[i].gotoAndPlay("collision");
this.health = this.health - 5;
update_health();
this.collisionin = 8;
if (this._x < enemies[i]._x) {
this.vx = -40;
} else {
this.vx = 40;
}
} else if (this.hitbox_mc.hitTest(enemies[i].badhitbox_mc) == true) {
if (!_root.isMute) {
hit_snd.fnPlay();
}
this.changeanim = true;
this.gotoAndPlay("collision");
this.health = this.health - 10;
update_health();
this.collisionin = 3;
this.vx = -60 + (Math.random() * 50);
} else {
this.collision = false;
this.collisionin = 0;
}
}
i++;
}
if (this.win == false) {
if (this._x <= this.tolerance) {
this._x = this.tolerance;
this.vx = 0;
if (this.changeanim == false) {
this.gotoAndPlay("leftstop");
this.changeanim = true;
}
} else if (this._x > (Stage.width - this.tolerance)) {
this._x = Stage.width - this.tolerance;
this.vx = 0;
if (this.changeanim == false) {
this.gotoAndPlay("rightstop");
this.changeanim = true;
}
}
this.collisionin--;
}
if (this.win == true) {
this.vx = this.vx + 2;
}
};
}
function update_health() {
health_mc._xscale = container_characters.player_mc.health;
if (container_characters.player_mc.health < 0) {
shot_snd.fnStop();
enemyshot_snd.fnStop();
hit_snd.fnStop();
pass_snd.fnStop();
horn_snd.fnStop();
score = container_characters.player_mc.score;
container_characters.player_mc.alive = false;
controls_disable();
health_mc._xscale = 0;
explosion_smoke(25, container_characters.player_mc._x, container_characters.player_mc._y);
explosion(container_characters.player_mc._x, container_characters.player_mc._y);
container_characters.player_mc.removeMovieClip();
container_mouseshots.mouseshots_mc._visible = false;
gameover();
}
}
function controls_enable() {
container_characters.player_mc.enable = true;
Mouse.hide();
container_crosshair._visible = true;
container_crosshair.crosshair_mc._visible = true;
container_crosshair.crosshair_mc._x = _xmouse;
container_crosshair.crosshair_mc._y = _ymouse;
}
function controls_disable() {
container_characters.player_mc.enable = false;
Mouse.show();
container_crosshair._visible = false;
}
function tutorial() {
temp = container_characters.attachMovie("tutorial", "tutorial", container_characters.getNextHighestDepth());
temp.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
update_scenario();
controls_enable();
}
};
}
function bonus() {
temp = container_characters.attachMovie("bonus", "bonus", container_characters.getNextHighestDepth());
temp.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
update_scenario();
}
};
}
function spawn_enemy_van(HEALTH, SPEED, THINKSPEED, SIDE, LANE) {
temp = container_characters.attachMovie("enemy_van", "enemy_mc" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth());
enemies.push(temp);
temp.healthbar_mc._visible = false;
temp.healthbarbacking_mc._visible = false;
temp.body_mc.gotoAndStop("intro");
temp.intro = true;
temp.health = HEALTH;
temp.healthmax = HEALTH;
if (temp.health >= 80) {
temp.body_mc.body_mc.gotoAndStop(3);
temp.body_mc.door_mc.gotoAndStop(3);
} else if (temp.health >= 40) {
temp.body_mc.body_mc.gotoAndStop(2);
temp.body_mc.door_mc.gotoAndStop(2);
}
temp.side = SIDE;
switch (temp.side) {
case undefined :
temp.side = Math.round(Math.random() * 1);
switch (temp.side) {
case 0 :
temp._x = -125;
temp.introstop = 100;
temp.vx = 10;
break;
case 1 :
temp._x = Stage.width + 125;
temp.introstop = Stage.width - 100;
temp.vx = -10;
}
break;
case "safe" :
if (container_characters.player_mc._x < (Stage.width / 2)) {
temp.side = 1;
temp._x = Stage.width + 125;
temp.introstop = Stage.width - 100;
temp.vx = -10;
} else {
temp.side = 0;
temp._x = -125;
temp.introstop = 100;
temp.vx = 10;
}
break;
case "player" :
if (container_characters.player_mc._x < (Stage.width / 2)) {
temp.side = 0;
temp._x = -125;
temp.introstop = 100;
temp.vx = 10;
} else {
temp.side = 1;
temp._x = Stage.width + 125;
temp.introstop = Stage.width - 100;
temp.vx = -10;
}
break;
case 0 :
temp._x = -125;
temp.introstop = 100;
temp.vx = 10;
break;
case 1 :
temp._x = Stage.width + 125;
temp.introstop = Stage.width - 100;
temp.vx = -10;
}
temp.lane = LANE;
switch (temp.lane) {
case undefined :
temp.lane = Math.round(Math.random() * 2);
break;
case "safe" :
temp.lane = Math.round(Math.random() * 2);
while (temp.lane == container_characters.player_mc.lane) {
temp.lane = Math.round(Math.random() * 2);
}
break;
case "player" :
temp.lane = container_characters.player_mc.lane;
}
temp._y = lane[temp.lane];
temp.vy = SPEED * 0.5;
temp.thinkfor = 30;
temp.hitbox_mc._visible = false;
temp.targetbox_mc._visible = false;
temp.onEnterFrame = function () {
if (this.health <= 0) {
this.removeMovieClip();
}
if (this.intro == true) {
this._x = this._x + this.vx;
if (this.side == 0) {
if (this._x > this.introstop) {
this.intro = false;
this.vx = SPEED;
this.body_mc.gotoAndPlay("intro");
}
} else if (this._x < this.introstop) {
this.intro = false;
this.vx = SPEED;
this.body_mc.gotoAndPlay("intro");
}
} else if (this.thinkfor <= 0) {
if (container_characters.player_mc.enabled == true) {
if (this.choice == undefined) {
this.choice = Math.round(Math.random() * 1);
}
if (this.choice == 0) {
if (this.dest == undefined) {
this.dest = container_characters.player_mc._x;
}
if (this.dest > this._x) {
this._x = this._x + this.vx;
if (this._x >= container_characters.player_mc._x) {
this.dest = undefined;
this.choice = 4;
}
} else {
this._x = this._x - this.vx;
if (this._x <= container_characters.player_mc._x) {
this.dest = undefined;
this.choice = 4;
}
}
} else if (this.choice == 1) {
if (this.dest == undefined) {
this.dest = lane[container_characters.player_mc.lane];
}
if (this.dest > this._y) {
this._y = this._y + this.vy;
if (this._y >= this.dest) {
this._y = this.dest;
this.dest = undefined;
this.choice = 3;
}
} else if (this.dest < this._y) {
this._y = this._y - this.vy;
if (this._y <= this.dest) {
this._y = this.dest;
this.dest = undefined;
this.choice = 3;
}
} else {
while (this.choice == 1) {
this.choice = Math.round(Math.random() * 2);
}
}
} else if (this.choice >= 2) {
this.body_mc.shootbox_mc._visible = false;
if (this.dest == undefined) {
this.dest = true;
if (this.choice == 2) {
if (this._y == lane[container_characters.player_mc.lane]) {
if (this._x < (container_characters.player_mc._x - (this._width / 2))) {
this.body_mc.gotoAndPlay("shootright");
} else if (this._x > (container_characters.player_mc._x + (this._width / 2))) {
this.body_mc.gotoAndPlay("shootleft");
}
} else {
this.dist = this._x - container_characters.player_mc._x;
if ((this.dist >= -100) && (this.dist <= 100)) {
if (this._y < container_characters.player_mc._y) {
this.body_mc.gotoAndPlay("shootdown");
} else {
this.body_mc.gotoAndPlay("shootup");
}
} else {
trace("huh? I can't shoot him from here!");
this.dest = undefined;
this.thinkfor = THINKSPEED;
this.choice = Math.round(Math.random() * 1);
}
}
} else if (this.choice == 3) {
if (!_root.isMute) {
enemyshot_snd.fnPlay();
}
if (this._x < container_characters.player_mc._x) {
this.body_mc.gotoAndPlay("shootright");
} else {
this.body_mc.gotoAndPlay("shootleft");
}
} else if (this.choice == 4) {
if (!_root.isMute) {
enemyshot_snd.fnPlay();
}
if (this._y < container_characters.player_mc._y) {
this.body_mc.gotoAndPlay("shootdown");
} else {
this.body_mc.gotoAndPlay("shootup");
}
}
} else {
if (this.body_mc.shootbox_mc.hitTest(container_characters.player_mc.hitbox_mc)) {
container_characters.player_mc.gotoAndPlay("shot");
container_characters.player_mc.health = container_characters.player_mc.health - 3;
update_health();
}
if (this.body_mc._currentframe == 1) {
this.thinkfor = THINKSPEED;
this.dest = undefined;
this.choice = undefined;
}
}
}
}
} else {
this.thinkfor--;
}
sortdepth(this);
};
}
function spawn_enemy_van_dead(X, Y) {
temp = container_characters.attachMovie("enemy_van_dead", "enemy_van_dead" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_x:X, _y:Y});
enemies.push(temp);
temp.badhitbox_mc._visible = false;
temp.vx = -5 + (Math.random() * 10);
temp.vy = -25;
temp.vr = -15 + (Math.random() * 30);
temp.gravity = 1;
temp.count = 2;
temp.countmax = 1;
temp.bounce = false;
temp.onEnterFrame = function () {
this.body_mc._rotation = this.body_mc._rotation + this.vr;
this.body_mc._x = this.body_mc._x + this.vx;
this.body_mc._y = this.body_mc._y + this.vy;
i = 0;
while (i < 5) {
this["dummy" + i]._x = this["dummy" + i]._x + this.vx;
this["dummy" + i]._y = this["dummy" + i]._y + this.vy;
i++;
}
this.vy = this.vy + this.gravity;
if (this.count >= this.countmax) {
this.count = 0;
this.randomi = Math.round(Math.random() * 4);
smoke(this, this["dummy" + this.randomi]._x, this["dummy" + this.randomi]._y);
} else {
this.count++;
}
if (this.body_mc._y > -70) {
this.body_mc._y = -70;
this.vy = this.vy * -0.85;
this.vx = this.vx - 10;
this.vr = this.vr + 10;
if (this.vr > 25) {
this.vr = 25;
}
}
if (this.body_mc._y < -70) {
this.badhitbox_mc._y = -1000;
} else {
this.badhitbox_mc._y = 0;
}
this.shadow_mc._x = this.body_mc._x;
this.badhitbox_mc._x = this.body_mc._x;
if (this.body_mc._x < ((-Stage.width) - 100)) {
i = 0;
while (i < enemies.length) {
if (enemies[i]._name == this._name) {
enemies.splice(i, 1);
}
i++;
}
this.removeMovieClip();
}
sortdepth(this);
};
}
function spawn_enemy_trafficshort(LANE, FRAMES) {
temp = container_characters.attachMovie("enemy_traffic_short", "enemy_mc" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_x:Stage.width + 100, _y:lane[LANE]});
enemies.push(temp);
temp.badhitbox_mc._visible = false;
i = 0;
while (i < 4) {
temp["car" + i].gotoAndStop(1 + Math.round(Math.random() * (temp["car" + i]._totalframes - 1)));
temp["car" + i].car_mc.gotoAndStop(1 + Math.round(Math.random() * (temp["car" + i].car_mc._totalframes - 1)));
i++;
}
temp.vx = bgspeed;
temp.run = false;
temp.onEnterFrame = function () {
if (this.run == true) {
this._x = this._x + this.vx;
sortdepth(this);
if (this._x <= (-this._width)) {
if (container_characters.player_mc.alive == true) {
container_characters.player_mc.score = container_characters.player_mc.score + 100;
}
update_scenario();
this.removeMovieClip();
i = 0;
while (i < enemies.length) {
if (enemies[i]._name == this._name) {
enemies.splice(i, 1);
}
i++;
}
}
}
};
temp2 = container_warnings.attachMovie("warning", "warning" + container_warnings.getNextHighestDepth(), container_warnings.getNextHighestDepth(), {_x:Stage.width - 100, _y:lane[LANE]});
temp2.frames = FRAMES;
temp2.onEnterFrame = function () {
if (this.frames <= 0) {
if (!_root.isMute) {
pass_snd.fnPlay();
horn_snd.fnPlay();
}
i = 0;
while (i < enemies.length) {
enemies[i].run = true;
i++;
}
this.removeMovieClip();
} else {
this.frames--;
}
};
}
function sortdepth(MC) {
i = 0;
while (i < enemies.length) {
if ((MC._y > enemies[i]._y) && (MC.getDepth() < enemies[i].getDepth())) {
MC.swapDepths(enemies[i]);
} else if ((MC._y < enemies[i]._y) && (MC.getDepth() > enemies[i].getDepth())) {
MC.swapDepths(enemies[i]);
}
i++;
}
}
function clear_enemies() {
i = 0;
while (i < enemies.length) {
enemies[i].removeMovieClip();
i++;
}
enemies = [];
}
function spawn_5bonuscoins(LANE) {
temp = container_characters.attachMovie("5bonuscoins", "5bonuscoins" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_y:lane[LANE]});
temp._x = Stage.width + temp._width;
temp.ok = false;
i = 0;
while (i < 5) {
temp["hitbox" + i]._visible = false;
i++;
}
temp.onEnterFrame = function () {
this._x = this._x + (bgspeed * 0.4);
i = 0;
while (i < 5) {
if (container_characters.player_mc.hitbox_mc.hitTest(this["hitbox" + i])) {
coincollected();
this["coin" + i]._visible = false;
this["hitbox" + i]._y = this["hitbox" + i]._y + 1000;
}
i++;
}
if ((this._x < (Stage.width / 2)) && (this.ok == false)) {
this.ok = true;
update_scenario();
}
if (this._x <= 0) {
this.removeMovieClip();
}
};
}
function spawn_2bonuscoins(LANE) {
temp = container_characters.attachMovie("2bonuscoins", "2bonuscoins" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_y:lane[LANE]});
temp._x = Stage.width + temp._width;
temp.ok = false;
i = 0;
while (i < 2) {
temp["hitbox" + i]._visible = false;
i++;
}
temp.onEnterFrame = function () {
this._x = this._x + (bgspeed * 0.4);
i = 0;
while (i < 2) {
if (container_characters.player_mc.hitbox_mc.hitTest(this["hitbox" + i])) {
coincollected();
this["coin" + i]._visible = false;
this["hitbox" + i]._y = this["hitbox" + i]._y + 1000;
}
i++;
}
if ((this._x < (Stage.width / 2)) && (this.ok == false)) {
this.ok = true;
update_scenario();
}
if (this._x <= 0) {
this.removeMovieClip();
}
};
}
function coincollected() {
coin_snd.fnPlay();
container_characters.player_mc.score = container_characters.player_mc.score + 250;
temp = container_characters.attachMovie("coincollected", "coincollected" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_x:container_characters.player_mc._x, _y:container_characters.player_mc._y});
temp.onEnterFrame = function () {
this._x = this._x - 5;
if (this._currentframe == this._totalframes) {
this.removeMovieClip();
}
};
}
function spawn_background() {
i = 0;
while (i < 5) {
temp = container_road.attachMovie("road", "road" + container_road.getNextHighestDepth(), container_road.getNextHighestDepth());
temp._y = Stage.height - temp._height;
temp._x = temp._width * i;
i++;
}
container_road.vx = bgspeed;
container_road.onEnterFrame = function () {
this._x = this._x + this.vx;
if (this._x <= (-this.road0._width)) {
this._x = 0;
}
};
i = 0;
while (i < 2) {
temp = container_bg.attachMovie("bg", "bg" + container_bg.getNextHighestDepth(), container_bg.getNextHighestDepth());
temp._x = temp._width * i;
i++;
}
container_bg.vx = bgspeed;
container_bg.onEnterFrame = function () {
this._x = this._x + this.vx;
if (this._x <= (-this.bg0._width)) {
this._x = 0;
}
};
}
function sparks(COUNT, X, Y) {
var _local2 = 0;
while (_local2 < COUNT) {
temp = container_fx.attachMovie("spark", "spark" + container_fx.getNextHighestDepth(), container_fx.getNextHighestDepth(), {_x:X, _y:Y});
temp._xscale = (temp._yscale = temp._yscale * (1 + (Math.random() * 0.5)));
temp.vx = -20 + (Math.random() * 30);
temp.vy = -20 + (Math.random() * 30);
temp.vs = -20;
temp.gravity = 5;
temp._rotation = Math.random() * 360;
temp.onEnterFrame = function () {
this.x1 = this._x;
this.y1 = this._y;
this._x = this._x + this.vx;
this._y = this._y + this.vy;
this.vy = this.vy + this.gravity;
this.x2 = this._x;
this.y2 = this._y;
this.dx = this.x1 - this.x2;
this.dy = this.y1 - this.y2;
this.radians = Math.atan2(this.dy, this.dx);
this._rotation = (this.radians * 180) / Math.PI;
this._xscale = (this._yscale = this._yscale + this.vs);
if (this._xscale <= 3) {
this.removeMovieClip();
}
};
_local2++;
}
}
function explosion(X, Y) {
if (!_root.isMute) {
explode_snd.fnPlay();
}
temp = container_characters.attachMovie("explosion", "explosion" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_x:X, _y:Y});
enemies.push(temp);
temp.vx = bgspeed * 0.25;
temp.onEnterFrame = function () {
sortdepth(this);
this._x = this._x + this.vx;
if (this._x < (-this._width)) {
this.removeMovieClip();
var _local2 = 0;
while (_local2 < enemies.length) {
if (enemies[_local2]._name == this._name) {
enemies.splice(_local2, 1);
}
_local2++;
}
}
};
}
function explosion_smoke(COUNT, X, Y) {
i = 0;
while (i < COUNT) {
temp = container_characters.attachMovie("smoke", "smoke" + container_characters.getNextHighestDepth(), container_characters.getNextHighestDepth(), {_x:X, _y:Y});
enemies.push(temp);
temp._rotation = Math.random() * 360;
temp.vbx = -25 + (Math.random() * 50);
temp.vby = -25 + (Math.random() * 25);
temp.vbdivide = 0.9;
temp.vr = -5 + (Math.random() * 10);
temp.vs = -2 - (Math.random() * 2);
temp.onEnterFrame = function () {
this._x = this._x + this.vbx;
this._y = this._y + this.vby;
this._rotation = this._rotation + this.vr;
this._xscale = (this._yscale = this._yscale + this.vs);
if (this._xscale <= 0) {
i = 0;
while (i < enemies.length) {
if (enemies[i]._name == this._name) {
enemies.splice(i, 1);
}
i++;
}
this.removeMovieClip();
}
sortdepth(this);
this.vbx = this.vbx * this.vbdivide;
this.vby = this.vby * this.vbdivide;
};
i++;
}
}
function smoke(MC, X, Y) {
temp = MC.attachMovie("smoke", "smoke" + MC.getNextHighestDepth(), MC.getNextHighestDepth(), {_x:X, _y:Y});
temp._rotation = Math.random() * 360;
temp.vx = -20;
temp.vr = -20 + (Math.random() * 40);
temp.vs = -10;
temp.onEnterFrame = function () {
this._x = this._x + this.vx;
this._rotation = this._rotation + this.vr;
this._xscale = (this._yscale = this._yscale + this.vs);
if (this._xscale <= 0) {
i = 0;
while (i < enemies.length) {
if (enemies[i]._name == this._name) {
enemies.splice(i, 1);
}
i++;
}
this.removeMovieClip();
}
};
}
var bg_snd = (new sound.SoundControl("bg_sound", true, null, 9000, 0.02, 13.7, 100));
var shot_snd = (new sound.SoundControl("gun", false, null, 90000, 0.15, 0.82, 100));
var explode_snd = (new sound.SoundControl("explode"));
var enemyshot_snd = (new sound.SoundControl("vangun", false, null, 0, 0, 1.82, 100));
var coin_snd = (new sound.SoundControl("coin"));
var hit_snd = (new sound.SoundControl("crash"));
var pass_snd = (new sound.SoundControl("pass"));
var horn_snd = (new sound.SoundControl("horn"));
stop();
init();
spawn_background();
intro();
Frame 4
init();
mousecontrols();
spawn_player();
Symbol 8 MovieClip Frame 7
gotoAndPlay (1);
Symbol 13 MovieClip Frame 4
gotoAndPlay (1);
Symbol 23 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 43 MovieClip [player] Frame 1
stop();
Symbol 43 MovieClip [player] Frame 18
stop();
Symbol 43 MovieClip [player] Frame 39
stop();
Symbol 43 MovieClip [player] Frame 64
stop();
Symbol 43 MovieClip [player] Frame 86
stop();
Symbol 43 MovieClip [player] Frame 91
gotoAndPlay ("idle");
Symbol 43 MovieClip [player] Frame 93
gotoAndPlay ("idle");
Symbol 53 MovieClip Frame 5
gotoAndPlay (1);
Symbol 69 MovieClip [preloader] Frame 1
#initclip 7
Object.registerClass("preloader", ui.Preloader);
#endinitclip
Symbol 386 MovieClip [__Packages.ui.Preloader] Frame 0
class ui.Preloader extends MovieClip
{
var onEnterFrame, filler_mc, msg_tf, handshakeUrl, errorFunction, frameName;
function Preloader () {
super();
_root.stop();
}
function onLoad() {
_root.stop();
onEnterFrame = check;
}
function check() {
var _local3 = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
filler_mc._xscale = _local3;
msg_tf.text = String(_local3) + "%";
if (filler_mc._xscale >= 100) {
delete onEnterFrame;
if (handshakeUrl == null) {
finishedLoading();
} else {
if (errorFunction == null) {
errorFunction = _root.fnError;
}
_root.handshake = new util.GetXML(handshakeUrl, finishedLoading, errorFunction, "There was an error\rcontacting the server");
msg_tf.text = "Contacting server...";
}
}
}
function finishedLoading() {
if (frameName == null) {
frameName = "intro";
}
if (animate == true) {
_root.gotoAndPlay(frameName);
} else {
_root.gotoAndStop(frameName);
}
}
var animate = false;
}
Symbol 387 MovieClip [__Packages.util.GetXML] Frame 0
class util.GetXML
{
var good, bad, param, theXML;
function GetXML (path, goodFunc, badFund, allParams) {
good = goodFunc;
bad = badFund;
param = allParams;
fnLoad(path);
}
function fnCallBack(func, param) {
func.apply(null, [param]);
}
function fnLoad(path) {
theXML = new XML();
theXML.ignoreWhite = true;
theXML.load(path);
theXML.onLoad = mx.utils.Delegate.create(this, fnLoaded);
}
function fnLoaded(success) {
if (success == true) {
fnCallBack(good, param);
} else {
fnCallBack(bad, param);
}
}
function fnShowXML() {
return(theXML);
}
}
Symbol 388 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 389 MovieClip [__Packages.util.Landings] Frame 0
class util.Landings
{
var iron;
function Landings () {
iron = new util.VarsIroning(["creativeURL", "theURL", "a", "g", "epi", "url", "pointsURL", "server", "partner", "page", "clickTag", "partnerId", "promotionId", "bannerId", "prizeWindowTarget"]);
}
function fnGetLandings() {
if (_root.creativeURL != undefined) {
return(_root.creativeURL);
}
if (_root.theURL != undefined) {
if (_root.a != undefined) {
_root.theURL = _root.theURL + ("&a=" + _root.a);
}
if (_root.g != undefined) {
_root.theURL = _root.theURL + ("&g=" + _root.g);
}
if (_root.epi != undefined) {
_root.theURL = _root.theURL + ("&epi=" + _root.epi);
}
if (_root.url != undefined) {
_root.theURL = _root.theURL + ("&url=" + _root.url);
}
return(_root.theURL);
}
if (_root.pointsURL != undefined) {
return(_root.pointsURL);
}
if (_root.clickTag != undefined) {
return(_root.clickTag);
}
var _local2 = ((_root.server != undefined) ? (_root.server) : "https://www.jackpotjoy.com/");
if (_root.server.indexOf("static") != -1) {
_local2 = "https://www.jackpotjoy.com/";
}
_local2 = _local2 + ((_root.partner != undefined) ? (_root.partner) : "jackpotjoy");
_local2 = _local2 + "/";
_local2 = _local2 + ((_root.page != undefined) ? (_root.page) : "register.do");
return(_local2);
}
function fnGetHome() {
var _local2 = ((_root.server != undefined) ? (_root.server) : "https://www.jackpotjoy.com/");
_local2 = _local2 + ((_root.partner != undefined) ? (_root.partner) : "jackpotjoy");
_local2 = _local2 + "/";
_local2 = _local2 + ((_root.page != undefined) ? (_root.page) : "home.do");
return(_local2);
}
function fnTargetWindow() {
var _local2 = ((_root.prizeWindowTarget != undefined) ? (_root.prizeWindowTarget) : "_blank");
return(_local2);
}
}
Symbol 390 MovieClip [__Packages.util.VarsIroning] Frame 0
class util.VarsIroning
{
function VarsIroning (all) {
for (var _local4 in _root) {
var _local2 = 0;
while (_local2 < all.length) {
if ((_local4.toLowerCase() == all[_local2].toLowerCase()) && (_local4 != all[_local2])) {
_root[all[_local2]] = _root[_local4];
delete _root[_local4];
}
_local2++;
}
}
}
}
Symbol 391 MovieClip [__Packages.sound.SoundControl] Frame 0
class sound.SoundControl
{
var offsetSeconds, mc, vol, mySound, loops, endTime, totalLoops, xsound, interval;
function SoundControl (_linkage_id, autoStart, _target_mc, _loops, _startOffset, _endTime, _vol) {
offsetSeconds = _startOffset;
mc = _target_mc;
vol = _vol;
mySound = _linkage_id;
loops = _loops;
endTime = _endTime * 1000;
totalLoops = _loops;
if (_root[mc] == undefined) {
mc = _root.createEmptyMovieClip(mySound + "_snd", _root.getNextHighestDepth());
}
xsound = new Sound(mc);
if ((loops == undefined) || (loops == null)) {
loops = 0;
}
if ((offsetSeconds == undefined) || (offsetSeconds == null)) {
offsetSeconds = 0;
}
if ((vol == undefined) || (vol == null)) {
vol = 100;
}
xsound.attachSound(mySound);
xsound.setVolume(vol);
if (isNaN(endTime) || (endTime == null)) {
endTime = xsound.duration - 70;
}
trace(endTime);
if (autoStart == true) {
fnPlay();
}
if ((endTime != undefined) && (endTime < xsound.duration)) {
interval = setInterval(this, "checkEnd", 20);
}
}
function checkEnd() {
if (xsound.getPosition() >= endTime) {
xsound.stop();
if (loops >= 0) {
fnPlay();
} else {
clearInterval(interval);
loops = totalLoops;
}
}
}
function fnPlay() {
xsound.start(offsetSeconds);
loops--;
}
function fnVol() {
var _local2 = xsound.getVolume();
xsound.setVolume(_local2 + 10);
}
function fnStop() {
xsound.stop();
}
function mute() {
xsound.setVolume(0);
}
function unmute() {
xsound.setVolume(vol);
}
function get movieHolder() {
return(mc);
}
function get volumeLevel() {
return(xsound.getVolume());
}
}
Symbol 105 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 18
stop();
Symbol 118 MovieClip Frame 77
gotoAndStop ("idle");
Symbol 118 MovieClip Frame 127
gotoAndStop ("idle");
Symbol 118 MovieClip Frame 174
gotoAndStop ("idle");
Symbol 118 MovieClip Frame 229
gotoAndStop ("idle");
Symbol 124 MovieClip Frame 13
gotoAndPlay (1);
Symbol 130 MovieClip [enemy_van] Frame 1
stop();
Symbol 130 MovieClip [enemy_van] Frame 3
gotoAndStop ("idle");
Symbol 202 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 1
function loadStuff() {
loaded = new util.GetXML("http://www.miceanddice-promotions.com/scoreboards/wanted_promo/load.php", showStuff, error);
}
function showStuff() {
var _local2 = 0;
loading_mc._visible = false;
var _local1 = loaded.fnShowXML().firstChild.firstChild;
while (_local1 != null) {
mc[("name" + _local2) + "_tf"].text = _local1.attributes.name;
mc[("points" + _local2) + "_tf"].text = _local1.attributes.points;
_local2++;
_local1 = _local1.nextSibling;
}
}
function error() {
loading_mc.gotoAndStop(2);
}
var loaded;
var mc = this;
loadStuff();
stop();
Symbol 216 MovieClip Frame 1
function save() {
if (name_tf.text.length > 0) {
name_tf.selectable = false;
msg_tf.text = "Sending...";
this.enabled = false;
var _local4 = new Color(send_mc);
var _local3 = {ra:40, rb:60, ga:40, gb:60, ba:40, bb:60};
_local4.setTransform(_local3);
saving = new util.GetXML((("http://www.miceanddice-promotions.com/scoreboards/wanted_promo/save.php?name=" + name_tf.text) + "&points=") + _root.score, finished, error);
} else {
msg_tf.text = "Enter your name";
}
}
function finished() {
if (saving.fnShowXML().firstChild.attributes.error == "0") {
_parent.scoreboard_mc.loadStuff();
msg_tf.text = "";
} else {
error();
}
}
function error() {
msg_tf.text = "Could not save score!";
}
var saving;
send_mc.send_bt.onRelease = save;
Symbol 250 MovieClip Frame 36
stop();
Symbol 251 MovieClip [gameover] Frame 92
stop();
Symbol 269 MovieClip Frame 51
stop();
Symbol 287 MovieClip [mainmenu] Frame 15
stop();
Symbol 305 MovieClip [explosion] Frame 27
stop();
Symbol 317 MovieClip Frame 1
car_mc.carshine_mc.stop();
Symbol 318 MovieClip Frame 1
car_mc.carshine_mc.stop();
player_mc.gotoAndStop(6);
player_mc.gunshots_mc.stop();
player_mc.gunflash_mc.stop();
Symbol 323 Button
on (release) {
nextFrame();
}
Symbol 327 Button
on (release) {
gotoAndPlay ("skip");
}
Symbol 342 MovieClip Frame 1
car_mc.carshine_mc.stop();
player_mc.gotoAndStop(5);
Symbol 345 MovieClip Frame 1
car0_mc.car_mc.carshine_mc.stop();
car1_mc.car_mc.carshine_mc.stop();
car2_mc.car_mc.carshine_mc.stop();
car0_mc.player_mc.gotoAndStop(5);
car1_mc.player_mc.gotoAndStop(5);
car2_mc.player_mc.gotoAndStop(5);
Symbol 347 MovieClip Frame 1
car0_mc.car_mc.carshine_mc.stop();
car1_mc.car_mc.carshine_mc.stop();
car2_mc.car_mc.carshine_mc.stop();
car0_mc.player_mc.gotoAndStop(5);
car1_mc.player_mc.gotoAndStop(5);
car2_mc.player_mc.gotoAndStop(5);
Symbol 351 MovieClip Frame 1
car_mc.car_mc.carshine_mc.stop();
enemy_mc.gunshots_mc.stop();
enemy_mc.gunflash_mc.stop();
enemy_mc.guntrail_mc.stop();
Symbol 354 MovieClip Frame 1
car_mc.car_mc.carshine_mc.stop();
enemy_mc.gunshots_mc.stop();
enemy_mc.gunflash_mc.stop();
enemy_mc.guntrail_mc.stop();
Symbol 359 MovieClip Frame 1
car_mc.car_mc.carshine_mc.stop();
car_mc.player_mc.gotoAndStop(5);
Symbol 364 Button
on (release) {
play();
}
Symbol 365 MovieClip [tutorial] Frame 10
stop();
Symbol 372 MovieClip [winscreen] Frame 93
stop();