Frame 1
mochi.as2.MochiAd.showPreGameAd({id:"1ff9e690ee0b32e0", res:"800x450"});
fscommand ("fullscreen", false);
Stage.showMenu = false;
Frame 2
LC = new LocalConnection();
domain = LC.domain();
_root._thisDomain = domain;
Frame 3
_global.root = _root;
stop();
onEnterFrame = function () {
ifFrameLoaded (5) {
gotoAndStop ("start");
delete onEnterFrame;
}
};
this.createEmptyMovieClip("testkeys", 100);
testkeys.onEnterFrame = function () {
if (keys == "listeners") {
if (listonce == undefined) {
listonce = true;
var _local3 = new KeyEvents();
var _local2 = new Object();
_local2.onKeyDown = function () {
if (Key.getCode() == 37) {
leftkey = true;
rightkey = false;
}
if (Key.getCode() == 39) {
rightkey = true;
leftkey = false;
}
if (Key.getCode() == 38) {
upkey = true;
}
if (Key.getCode() == 40) {
downkey = true;
}
if (Key.getCode() == 32) {
spacekey = true;
}
if (Key.getCode() == 90) {
zkey = true;
}
if (Key.getCode() == 88) {
xkey = true;
}
if (Key.getCode() == 67) {
ckey = true;
}
};
Key.addListener(_local2);
var _local1 = new Object();
_local1.onKeyUp = function () {
if (Key.getCode() == 37) {
leftkey = false;
}
if (Key.getCode() == 39) {
rightkey = false;
}
if (Key.getCode() == 38) {
upkey = false;
}
if (Key.getCode() == 40) {
downkey = false;
}
if (Key.getCode() == 32) {
spacekey = false;
}
if (Key.getCode() == 90) {
zkey = false;
}
if (Key.getCode() == 88) {
xkey = false;
}
if (Key.getCode() == 67) {
ckey = false;
}
};
Key.addListener(_local1);
}
} else {
Key.removeListener(keyListener1);
Key.removeListener(keyListener2);
listonce = undefined;
if (key != true) {
if (Key.isDown(37)) {
leftkey = true;
} else {
leftkey = false;
}
if (Key.isDown(39)) {
rightkey = true;
} else {
rightkey = false;
}
if (Key.isDown(38)) {
upkey = true;
} else {
upkey = false;
}
if (Key.isDown(40)) {
downkey = true;
} else {
downkey = false;
}
if (Key.isDown(32)) {
spacekey = true;
} else {
spacekey = false;
}
if (Key.isDown(90)) {
zkey = true;
} else {
zkey = false;
}
if (Key.isDown(88)) {
xkey = true;
} else {
xkey = false;
}
if (Key.isDown(67)) {
ckey = true;
} else {
ckey = false;
}
}
}
};
Instance of Symbol 244 MovieClip in Frame 4
onClipEvent (load) {
getver = getVersion();
if (getver.substring(0, 1) == "W") {
unloadMovie (this);
trace("Platform: PC");
} else if (getver.substring(0, 1) == "M") {
trace("Platform: MAC");
} else {
trace("Platform: UNKNOWN");
unloadMovie (this);
}
}
Frame 5
_global.root = _root;
onEnterFrame = function () {
ifFrameLoaded (7) {
fader.play();
fader.dest = "open";
delete onEnterFrame;
}
};
Frame 6
skipbut.gotoAndStop(2);
var listenerObject = new Object();
listenerObject.cuePoint = function (eventObject) {
trace("cue " + eventObject.info.name);
if (eventObject.info.name == "start") {
loader.gotoAndStop(2);
my_FLVPlybk.volume = 70;
trace("go");
} else if (eventObject.info.name == "startcheck1") {
loader.gotoAndStop(2);
my_FLVPlybk.volume = 70;
} else if (eventObject.info.name == "startcheck2") {
loader.gotoAndStop(2);
my_FLVPlybk.volume = 70;
} else if (eventObject.info.name == "startcheck3") {
loader.gotoAndStop(2);
my_FLVPlybk.volume = 70;
} else if (eventObject.info.name == "end") {
loader.gotoAndStop(3);
my_FLVPlybk.pause();
trace("end");
}
};
my_FLVPlybk.addEventListener("cuePoint", listenerObject);
Frame 7
function dove(me, you) {
_root[me + "_dovegrab"] = false;
_root[me + "_grabbite"] = 0;
_root[me + "_grabtime"] = 0;
if (me == "player") {
var _local3 = 9000;
} else {
var _local3 = 9050;
}
md = 1;
while (md <= 12) {
doveserial = md;
duplicateMovieClip (back.dove, "dove" + doveserial, md + _local3);
back["dove" + doveserial].serial = doveserial;
back["dove" + doveserial].wait = doveserial * 2;
back["dove" + doveserial]._x = back[me]._x;
back["dove" + doveserial]._y = back[me]._y - 250;
back["dove" + doveserial].action = "wait";
if (me == "player") {
back["dove" + doveserial].me = "player";
back["dove" + doveserial].you = "enemy";
} else {
back["dove" + doveserial].me = "enemy";
back["dove" + doveserial].you = "player";
}
md++;
}
}
function dove_fly(name, me, you) {
if (name.defined == undefined) {
name.lost = 0;
name.defined = true;
}
if (name._name != "dove") {
trace((name._name + " dove ") + name.action);
}
if (name._name == "dove1") {
}
if (name._x > _root.back[you]._x) {
name._xscale = 100;
} else {
name._xscale = -100;
}
if (name.action == "fly") {
name.dove_xdif = ((name._x - _root.back[you]._x) - _root.back[you].body["b" + name.serial]._x) / 7;
name.dove_ydif = ((name._y - _root.back[you]._y) - _root.back[you].body["b" + name.serial]._y) / 7;
if (_root[me + "_dovegrab"] == true) {
name._x = name._x - name.dove_xdif;
name._y = name._y - name.dove_ydif;
} else {
name.yspeed = name.yspeed - 2;
name._x = name._x + name.xspeed;
name._y = name._y + name.yspeed;
}
if ((Math.abs(name.dove_xdif) < 4) & (Math.abs(name.dove_ydif) < 4)) {
_root[me + "_dovebite"]++;
name.action = "grab";
}
if (name._y < -500) {
removeMovieClip(name);
}
if ((_root.back[you].body["b" + name.serial] == undefined) & (_root[me + "_dovegrab"] == true)) {
trace("----------------------------------");
trace(name._name + " lost dove");
trace(name.lost);
trace(_root.back[you]._currentframe);
trace(_root.back[you].body._currentframe);
trace("----------------------------------");
name.lost++;
if (name.lost > 30) {
removeMovieClip(name);
}
}
} else if (name.action == "grab") {
if (name.oncestop == undefined) {
_root[you + "_xspeed"] = 0;
}
if (name._y < -500) {
removeMovieClip(name);
}
name.nextFrame();
name._x = _root.back[you]._x - _root.back[you].body["b" + name.serial]._x;
name._y = _root.back[you]._y + _root.back[you].body["b" + name.serial]._y;
if ((_root[me + "_dovebite"] >= 8) & (_root[me + "_dovegrab"] == true)) {
if (name._name == "dove1") {
_root[me + "_grabtime"]++;
if (_root[me + "_grabtime"] < 6) {
_root.back[you].body.gotoAndPlay("up");
if (_root[you + "_yspeed"] > -2) {
_root[you + "_yspeed"] = -4;
}
_root[you + "_yspeed"] = _root[you + "_yspeed"] + (-0.03 - gravity);
} else {
_root[you + "_yspeed"] = (-gravity) / 2;
}
}
if (back[you]._x < back[me]._x) {
_root[you + "_xspeed"] = _root[you + "_xspeed"] + (dis / 100000);
} else {
_root[you + "_xspeed"] = _root[you + "_xspeed"] - (dis / 100000);
}
}
if (_root[me + "_grabtime"] > 150) {
_root[you + "_action"] = "stand";
name.ranx = random(80) - 40;
_root.back["dove" + name.serial].action = "flyaway";
}
if (_root[you + "_action"] != "doved") {
name.ranx = random(80) - 40;
_root.back["dove" + name.serial].action = "flyaway";
}
} else if (name.action == "flyaway") {
name.gotoAndStop("in");
name._y = name._y - 10;
name._x = name._x + name.ranx;
if (name._y < -1000) {
removeMovieClip(name);
}
} else if (name.action == "wait") {
name.wait--;
name.yspeed = random(10) + 20;
if (_root.back[me]._x < _root.back[you]._x) {
name.xspeed = 33;
} else {
name.xspeed = -33;
}
if (name.wait <= 0) {
name.play();
name.action = "fly";
}
}
}
function damage(pain, victem) {
if (match == 1) {
player_energy_offset = 0.8;
enemy_energy_offset = 1;
} else if (match == 2) {
player_energy_offset = 0.85;
enemy_energy_offset = 1;
} else if (match == 3) {
player_energy_offset = 0.9;
enemy_energy_offset = 1;
} else if (match == 4) {
player_energy_offset = 0.95;
enemy_energy_offset = 1;
} else if (match == 5) {
player_energy_offset = 1;
enemy_energy_offset = 1;
} else if (match == 6) {
player_energy_offset = 1.1;
enemy_energy_offset = 0.9;
} else if (match == 7) {
player_energy_offset = 1.3;
enemy_energy_offset = 0.7;
} else if (match == 8) {
player_energy_offset = 1;
enemy_energy_offset = 1;
} else if (match == 9) {
player_energy_offset = 1;
enemy_energy_offset = 1;
}
player_energy_offset = player_energy_offset + 0.6;
enemy_energy_offset = enemy_energy_offset + 0.6;
if (victem == "player") {
_root[victem + "_life"] = _root[victem + "_life"] - int(pain * player_energy_offset);
} else if (victem == "enemy") {
_root[victem + "_life"] = _root[victem + "_life"] - int(pain * enemy_energy_offset);
}
}
function blood(drops, distance, attacker, victem) {
bd = 0;
while (bd < drops) {
bdn++;
totaldrops++;
duplicateMovieClip (back.blooddrop, "blood" + bdn, bdn + 500);
back["blood" + bdn]._x = back[victem]._x;
if (back[attacker].body.hurt != undefined) {
back["blood" + bdn]._y = ((back[victem]._y + back[attacker].body.hurt._y) + back[attacker]._y) - bot;
} else {
back["blood" + bdn]._y = back[victem]._y - (back[victem]._height / 2);
}
var _local2 = random(distance);
back["blood" + bdn].xspeed = random(_local2) - (_local2 / 2);
back["blood" + bdn].yspeed = (-random(distance)) * 2;
bd++;
}
}
function bloodmovement(name) {
if ((name._name != "blooddrop") & (name.defined == undefined)) {
name.botvar = random(25);
name.fadecount = 0;
name.fadeout = false;
if (arena == 4) {
name.botvar = 5;
}
name.defined = "defined";
}
name.xx = name._x + name.xspeed;
name.yy = name._y + name.yspeed;
name.yspeed = name.yspeed + gravity;
name._x = name._x + name.xspeed;
if (name.yy < (bot + name.botvar)) {
name._y = name._y + name.yspeed;
name.x2 = name.xspeed;
name.y2 = name.yspeed;
if (name.x2 > 0) {
name.baseangle = -90;
name._xscale = 100;
} else if (x2 < 0) {
name.baseangle = 90;
name._xscale = -100;
}
if (name.x2 > 0) {
name.angleperc = name.y2 / name.x2;
if (name.angleperc > 2) {
name.angleperc = 2;
} else if (name.angleperc < -2) {
name.angleperc = -2;
}
name._rotation = (name.angleperc * 45) - 90;
} else if (name.x2 < 0) {
name.x2 = -name.x2;
name.angleperc = name.y2 / name.x2;
if (name.angleperc > 2) {
name.angleperc = 2;
} else if (name.angleperc < -2) {
name.angleperc = -2;
}
name._rotation = (name.angleperc * -45) + 90;
}
} else {
name.yspeed = 0;
name.xspeed = 0;
name.gotoAndStop("puddle");
name._rotation = 0;
name.fadeout = true;
}
if (name.fadeout == true) {
name.fadecount++;
if ((name.fadecount > 60) || (totaldrops > 30)) {
if (name._alpha > 40) {
name._alpha = name._alpha - 1;
}
}
if (name._alpha < 50) {
totaldrops--;
removeMovieClip(name);
}
}
}
function character(me, you) {
dis = Math.abs(back.player._x - back.enemy._x);
_root[me + "_lunge"] = false;
if (_root[me + "_life"] <= 0) {
_root[me + "_action"] = "fall";
}
back[me].gotoAndStop(_root[me + "_action"]);
if (me == "enemy") {
if (((enemy_action != "fall") || (enemy_action != "smallflinch")) || (enemy_action != "bigflinch")) {
ai(back.enemy);
}
}
if (_root[me + "_shorthitcounter"] > 0) {
_root[me + "_shorthitrundown"]--;
if (_root[me + "_shorthitrundown"] <= 0) {
_root[me + "_shorthitcounter"] = 0;
}
}
_root[me + "_yy"] = back[me]._y + int(_root[me + "_yspeed"]);
if (_root[me + "_yy"] <= bot) {
back[me]._y = back[me]._y + _root[me + "_yspeed"];
} else if ([me + "_yspeed"] != 0) {
back[me]._y = bot;
_root[me + "_yspeed"] = 0;
if (_root[me + "_jump"] == "jumping") {
_root[me + "_jump"] = "notjumping";
back[me].body.walkdir = "";
if (_root[me + "_action"] != "doved") {
_root[me + "_action"] = "stand";
}
}
}
_root[me + "_yspeed"] = _root[me + "_yspeed"] + gravity;
if ((D_delay > 0) & (ckey == true)) {
D_delay--;
} else if ((ckey == true) == false) {
D_delay = 0;
}
if (_root[me + "_action"] == "stand") {
_root[me + "+hardspeedoveride"] = false;
if (_root[me + "_oncereset"] == false) {
back[me].gotoAndStop("stand");
back[me].body.walkdir = "";
_root[me + "_oncereset"] = true;
}
_root[me + "_jumpedyet"] = false;
if (_root[me + "_xspeed"] > maxspeed) {
_root[me + "_xspeed"] = maxspeed;
} else if (_root[me + "_xspeed"] < (-maxspeed)) {
_root[me + "_xspeed"] = -maxspeed;
}
if (me == "player") {
if (back[me].body.walkdir == "b") {
back[me].body.prevFrame();
} else if (back[me].body.walkdir == "f") {
back[me].body.nextFrame();
}
if (back[me]._x < back[you]._x) {
back[me]._xscale = 100;
} else if (back[me]._x > back[you]._x) {
back[me]._xscale = -100;
}
if (downkey == true) {
back[me].body.walkdir = "";
_root[me + "_xspeed"] = 0;
_root[me + "_action"] = "duck";
} else if ((upkey == true) & ((player_yy + gravity) >= bot)) {
back[me].gotoAndStop("jump");
_root[me + "_action"] = "jump";
} else if (xkey == true) {
_root[me + "_action"] = "hard";
} else if (((fb_seq == true) & (back[me + "_fireball"]._currentframe == 1)) & (_root[you + "_action"] != "harpooned")) {
_root[me + "_oncereset"] = true;
_root[me + "_action"] = "fireball";
} else if ((ckey == true) & (D_delay <= 0)) {
_root[me + "_action"] = "short";
} else if (zkey == true) {
_root[me + "_action"] = "kick";
} else if (spacekey == true) {
_root[me + "_action"] = "block";
} else if (leftkey == true) {
_root[me + "_xspeed"] = _root[me + "_xspeed"] - 1;
} else if (rightkey == true) {
_root[me + "_xspeed"] = _root[me + "_xspeed"] + 1;
} else {
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.7;
if (Math.abs(_root[me + "_xspeed"]) < 1) {
_root[me + "_xspeed"] = 0;
}
}
} else if (me == "enemy") {
if (back.enemy.body.walkdir == "b") {
back.enemy.body.prevFrame();
} else if (back.enemy.body.walkdir == "f") {
back.enemy.body.nextFrame();
}
if (enemy_xspeed <= -1) {
if (back.enemy.body._currentframe == 1) {
back.enemy.body.gotoAndStop("set");
}
if (back.enemy._xscale == 100) {
back.enemy.body.walkdir = "b";
} else if (back.enemy._xscale == -100) {
back.enemy.body.walkdir = "f";
}
} else if (enemy_xspeed >= 1) {
if (back.enemy.body._currentframe == 1) {
back.enemy.body.gotoAndStop("set");
}
if (back.enemy._xscale == 100) {
back.enemy.body.walkdir = "f";
} else if (back.enemy._xscale == -100) {
back.enemy.body.walkdir = "b";
}
} else {
if (back.enemy.body.walkdir != "") {
back.enemy.body.gotoAndPlay("backtostance");
}
back.enemy.body.walkdir = "";
}
}
if (_root[me + "_xspeed"] < -1) {
if (back[me].body._currentframe == 1) {
back[me].body.gotoAndStop("set");
}
if (back[me]._xscale == 100) {
back[me].body.walkdir = "b";
} else if (back[me]._xscale == -100) {
back[me].body.walkdir = "f";
}
} else if (_root[me + "_xspeed"] > 1) {
if (back[me].body._currentframe == 1) {
back[me].body.gotoAndStop("set");
}
if (back[me]._xscale == 100) {
back[me].body.walkdir = "f";
} else if (back[me]._xscale == -100) {
back[me].body.walkdir = "b";
}
} else {
if (back[me].body.walkdir != "") {
back[me].body.gotoAndPlay("backtostance");
}
back[me].body.walkdir = "";
}
} else if (_root[me + "_action"] == "jump") {
back[me].body.walkdir = "";
if (_root[me + "_jumpedyet"] != true) {
_root[me + "_yspeed"] = _root[me + "_yspeed"] - jump;
_root[me + "_jump"] = "jumping";
_root[me + "_jumpedyet"] = true;
if (back[me]._xscale == 100) {
if (_root[me + "_xspeed"] >= 0) {
back[me].body.gotoAndPlay("for");
} else if (_root[me + "_xspeed"] < 0) {
back[me].body.gotoAndPlay("back");
}
} else if (back[me]._xscale == -100) {
if (_root[me + "_xspeed"] <= 0) {
back[me].body.gotoAndPlay("for");
} else if (_root[me + "_xspeed"] > 0) {
back[me].body.gotoAndPlay("back");
}
}
}
if (((xkey == true) || (ckey == true)) || (zkey == true)) {
_root[me + "_action"] = "jumpkick";
}
if (me == "player") {
if (leftkey == true) {
_root[me + "_xspeed"] = (-maxspeed) * 2;
} else if (rightkey == true) {
_root[me + "_xspeed"] = maxspeed * 2;
}
}
} else if (_root[me + "_action"] == "jumpkick") {
jkcount++;
if (back[me].body.hurt.hitTest(back[you].body.hit) & (_root[you + "_action"] != "blocking")) {
if (Math.abs(_root[me + "_xspeed"]) > 13) {
damage(20, you);
blood(4, 40, me, you);
_root.snd.genhit.play();
_root[you + "_action"] = "fall";
_root[you + "_yspeed"] = -15;
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -_root[me + "_xspeed"];
} else {
_root[you + "_xspeed"] = _root[me + "_xspeed"];
}
} else {
damage(10, you);
blood(4, 10, me, you);
_root[you + "_action"] = "smallflinch";
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -50;
} else {
_root[you + "_xspeed"] = 50;
}
}
} else if (back[me].body.hurt.hitTest(back[you].body.block)) {
_root.snd.block.play();
_root[me + "_xspeed"] = 0;
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -20;
} else {
_root[you + "_xspeed"] = 20;
}
}
} else if (_root[me + "_action"] == "duck") {
_root[me + "_oncereset"] = false;
_root[me + "_xspeed"] = 0;
if (me == "player") {
if (back[me]._x < back[you]._x) {
back[me]._xscale = 100;
} else if (back[me]._x > back[you]._x) {
back[me]._xscale = -100;
}
if (xkey == true) {
_root[me + "_action"] = "uppercut";
} else if (zkey == true) {
_root[me + "_action"] = "uppercut";
} else if (ckey == true) {
_root[me + "_action"] = "uppercut";
} else if (downkey == true) {
_root[me + "_action"] = "duck";
back[me].body.nextFrame();
} else {
back[me].body.prevFrame();
if (back[me].body._currentframe == 1) {
_root[me + "_action"] = "stand";
}
}
}
} else if (_root[me + "_action"] == "uppercut") {
if ((me == "player") & (enemy_nouppercut > 0)) {
if (back[me].body.hurt.hitTest(back[you].body.hit) || (back[me].body.hurt.hitTest(back[you].body.block))) {
trace("uppercut false blocker");
_root.snd.block.play();
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -20;
_root[me + "_xspeed"] = 20;
} else {
_root[you + "_xspeed"] = 20;
_root[me + "_xspeed"] = -20;
}
}
} else {
if ((player_lunge == true) & (me == "enemy")) {
if (back[me].body.lungehit.hitTest(back[you].body.hit)) {
trace("lunge hit");
_root.snd.hard.play();
_root.snd.scream.gotoAndPlay("scream" + _root[you + "_fbnum"]);
_root[you + "_yspeed"] = -30;
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -8;
} else {
_root[you + "_xspeed"] = 8;
}
damage(20, you);
blood(30, 30, me, you);
_root[you + "_action"] = "fall";
}
}
if (back[me].body.hurt.hitTest(back[you].body.hit)) {
_root.snd.hard.play();
_root.snd.scream.gotoAndPlay("scream" + _root[you + "_fbnum"]);
_root[you + "_yspeed"] = -60;
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -6;
} else {
_root[you + "_xspeed"] = 6;
}
damage(20, you);
blood(30, 30, me, you);
_root[you + "_action"] = "fall";
} else if (back[me].body.hurt.hitTest(back[you].body.block)) {
_root.snd.block.play();
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -20;
_root[me + "_xspeed"] = 20;
} else {
_root[you + "_xspeed"] = 20;
_root[me + "_xspeed"] = -20;
}
}
}
if (back[me].body._currentframe == back[me].body._totalframes) {
_root[me + "_action"] = "duck";
}
} else if (_root[me + "_action"] == "kick") {
if (_root[me + "_oncereset"] == true) {
_root[me + "_xspeed"] = 0;
_root[me + "_oncereset"] = false;
}
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.7;
if ((back[me].body.hurt.hitTest(back[you].body.hit) & (_root[you + "_action"] != "fall")) & (enemy_nokick == 0)) {
if (you == "enemy") {
turn_off_kick = true;
}
_root[you + "_action"] = "smallflinch";
_root.snd.genhit.play();
damage(20, you);
blood(4, 32, me, you);
kick1 = true;
} else if ((back[me].body.hurt2.hitTest(back[you].body.hit) & (_root[you + "_action"] != "fall")) & (enemy_nokick == 0)) {
_root.snd.genhit.play();
if (you == "enemy") {
turn_off_kick = true;
}
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -60;
} else {
_root[you + "_xspeed"] = 60;
}
_root[you + "_action"] = "bigflinch";
damage(20, you);
blood(4, 32, me, you);
} else if ((back[me].body.hurt.hitTest(back[you].body.block) || ((enemy_nokick > 0) & back[me].body.hurt2.hitTest(back[you].body.hit))) || ((enemy_nokick > 0) & back[me].body.hurt.hitTest(back[you].body.hit))) {
_root.snd.block.play();
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -20;
_root[me + "_xspeed"] = 20;
} else {
_root[you + "_xspeed"] = 20;
_root[me + "_xspeed"] = -20;
}
}
if (back[me].body._currentframe == back[me].body._totalframes) {
if ((turn_off_kick == true) & (me == "player")) {
enemy_nokick = 40;
}
_root[me + "_action"] = "stand";
}
} else if (_root[me + "_action"] == "short") {
if (_root[me + "_oncereset"] == true) {
if ((me == "player") & (fb_seq == true)) {
if ((_root.back.jail != undefined) & (_root[me + "_fbnum"] == 5)) {
_root[me + "_xspeed"] = 0;
_root[me + "_oncereset"] = false;
} else {
_root[me + "_oncereset"] = true;
player_action = "fireball";
}
} else {
_root[me + "_xspeed"] = 0;
_root[me + "_oncereset"] = false;
}
}
D_delay = 3;
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.7;
if (back[me].body.punch == "done") {
_root[me + "_action"] = "stand";
}
if (((back[me].body.hurt.hitTest(back[you].body.hit) & (_root[you + "_action"] != "smallflinch")) & (_root[you + "_action"] != "bigflinch")) & (_root[you + "_action"] != "fall")) {
damage(12, you);
blood(4, 20, me, you);
if (me == "player") {
short_add_dif = short_add_dif + 3;
}
_root.snd.soft.play();
if (_root[me + "_shorthitcounter"] < 5) {
_root[you + "_action"] = "smallflinch";
_root[me + "_shorthitcounter"]++;
_root[me + "_shorthitrundown"] = 90;
} else {
_root[me + "shorthitcounter"] = 0;
_root[me + "_shorthitrundown"] = 0;
_root[you + "_action"] = "fall";
}
} else if (back[me].body.hurt.hitTest(back[you].body.block)) {
_root.snd.block.play();
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -20;
_root[me + "_xspeed"] = 20;
} else {
_root[you + "_xspeed"] = 20;
_root[me + "_xspeed"] = -20;
}
}
} else if (_root[me + "_action"] == "hard") {
_root[me + "_oncereset"] = false;
if (me == "player") {
if ((rightkey == true) || (leftkey == true)) {
player_lunge = true;
} else {
player_lunge = false;
}
if (((rightkey == true) & (back.player._xscale == 100)) & (player_xspeed < 20)) {
player_lunge = true;
if (_root[me + "+hardspeedoveride"] != true) {
player_xspeed = 20;
}
} else if (((leftkey == true) & (back.player._xscale == -100)) & (player_xspeed > -20)) {
player_lunge = true;
if (_root[me + "+hardspeedoveride"] != true) {
player_xspeed = -20;
}
}
}
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.9;
if (back[me].body._currentframe == back[me].body._totalframes) {
player_lunge = false;
_root[me + "_action"] = "stand";
}
if (((back[me].body.hurt.hitTest(back[you].body.hit) & (_root[you + "_action"] != "smallflinch")) & (_root[you + "_action"] != "bigflinch")) & (_root[you + "_action"] != "fall")) {
_root.snd.hard.play();
_root.snd.scream.gotoAndPlay("scream" + _root[you + "_fbnum"]);
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -60;
} else {
_root[you + "_xspeed"] = 60;
}
_root[you + "_action"] = "bigflinch";
damage(40, you);
blood(8, 30, me, you);
} else if (back[me].body.hurt.hitTest(back[you].body.block)) {
_root.snd.block.play();
if (back[you]._xscale == 100) {
_root[you + "_xspeed"] = -20;
_root[me + "_xspeed"] = 10;
} else {
_root[you + "_xspeed"] = 20;
_root[me + "_xspeed"] = -10;
}
}
} else if (_root[me + "_action"] == "fireball") {
if (_root[me + "_oncereset"] == true) {
_root[me + "_oncereset"] = false;
}
if (back[me].body.shoot == true) {
back[me].body.shoot = false;
fbsn++;
_root.snd2.gotoAndPlay("fireball" + _root[me + "_fbnum"]);
trace("FBNUM " + _root[me + "_fbnum"]);
back.attachMovie("fireball" + _root[me + "_fbnum"], "fb" + fbsn, 100 + fbsn);
back["fb" + fbsn]._xscale = back[me]._xscale;
back["fb" + fbsn]._y = back[me]._y - 170;
back["fb" + fbsn].me = me;
back["fb" + fbsn].you = you;
if (back["fb" + fbsn]._xscale == 100) {
back["fb" + fbsn]._x = back[me]._x + 150;
} else if (back["fb" + fbsn]._xscale == -100) {
back["fb" + fbsn]._x = back[me]._x - 150;
}
back["fb" + fbsn].targ = you;
}
_root[me + "_xspeed"] = 0;
if (back[me].body._currentframe == back[me].body._totalframes) {
_root[me + "_action"] = "stand";
}
} else if (_root[me + "_action"] == "smallflinch") {
if (_root[me + "_oncereset"] == true) {
back[me].gotoAndStop("smallflinch");
_root[me + "_oncereset"] = false;
}
if (_root[me + "_jump"] == "jumping") {
_root[me + "_action"] = "fall";
}
if (me == "player") {
if ((upkey == true) & ((player_yy + gravity) >= bot)) {
back[me].gotoAndStop("jump");
_root[me + "_action"] = "jump";
} else if (spacekey == true) {
_root[me + "_action"] = "block";
}
}
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.7;
if (Math.abs(_root[me + "_xspeed"]) < 1) {
_root[me + "_xspeed"] = 0;
}
if (back[me].body._currentframe == back[me].body._totalframes) {
_root[me + "_action"] = "stand";
}
} else if (_root[me + "_action"] == "bigflinch") {
if (_root[me + "_oncereset"] == true) {
back[me].gotoAndStop("smallflinch");
_root[me + "_oncereset"] = false;
}
if (_root[me + "_jump"] == "jumping") {
_root[me + "_action"] = "fall";
}
if (me == "player") {
if (((upkey == true) & ((player_yy + gravity) >= bot)) & (player.body._currentframe >= 33)) {
back[me].gotoAndStop("jump");
_root[me + "_action"] = "jump";
}
}
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.7;
if (Math.abs(_root[me + "_xspeed"]) < 1) {
_root[me + "_xspeed"] = 0;
}
if (back[me].body._currentframe == back[me].body._totalframes) {
_root[me + "_action"] = "stand";
}
} else if (_root[me + "_action"] == "fall") {
_root[me + "_jump"] = "notjumping";
if (back[me].body.fallstatus == undefined) {
if (_root[me + "_yy"] >= bot) {
_root[me + "_xspeed"] = 0;
back[me].body.fallstatus = "ground";
}
} else if ((back[me].body.fallstatus == "deathtest") & (_root[me + "_life"] <= 0)) {
back[me].body.stop();
if ((_root[you + "_action"] == "stand") || (_root[you + "_action"] == "duck")) {
_root[you + "_action"] = "stand";
_root[you + "_xspeed"] = 0;
back[you].gotoAndStop("stand");
back[you].body.gotoAndStop(1);
action = "roundover";
}
} else if (back[me].body._currentframe == back[me].body._totalframes) {
if (me == "enemy") {
enemy_nouppercut = 30;
}
back[me].body.fallstatus = undefined;
if ((me == "enemy") & (player_action == "fireball")) {
trace("fireball on get up");
unblock = false;
enemy_action = "block";
aia = -2;
enemy.gotoAndStop("block");
} else {
_root[me + "_action"] = "stand";
}
}
} else if (_root[me + "_action"] == "block") {
if (_root[me + "_oncereset"] == true) {
_root[me + "_xspeed"] = 0;
_root[me + "_oncereset"] = false;
}
_root[me + "_xspeed"] = _root[me + "_xspeed"] * 0.9;
if (me == "player") {
if (spacekey == true) {
_root[me + "_action"] = "block";
back[me].body.nextFrame();
} else {
back[me].body.prevFrame();
if (back[me].body._currentframe == 1) {
_root[me + "_action"] = "stand";
}
}
}
} else if (_root[me + "_action"] == "harpooned") {
_root[me + "_xspeed"] = 0;
back[me].gotoAndStop("harpooned");
if (back[me].body._currentframe == back[me].body._totalframes) {
_root[me + "_action"] = "stand";
}
}
}
function fireballcode1(name) {
if (name.defined == undefined) {
if (name._xscale == 100) {
name.xspeed = 33;
} else {
name.xspeed = -33;
}
name.action = "fly";
name.fireballid = true;
name.defined = true;
}
if (name.action == "fly") {
name._x = name._x + name.xspeed;
if ((name._x < -100) || (name._x > 2100)) {
removeMovieClip(name);
}
if (name.targ == "player") {
name.from = "enemy";
} else {
name.from = "player";
}
if (((name.grab.hitTest(back[name.targ].body.hit) & (root[name.targ + "_action"] != "fall")) & (root[name.targ + "_action"] != "bigflinch")) & (root[name.targ + "_action"] != "block")) {
if (name.turnoff != true) {
fireballhit = fireballhit + _root.fireballhit_uplev;
root[name.targ + "_action"] = "harpooned";
name.gotoAndStop("grab");
name.action = "grab";
} else {
name.turnoff = true;
}
} else if (name.hitTest(back[name.targ].body.block)) {
root[name.targ + "_xspeed"] = name.xspeed / 2;
name.action = "dead";
}
} else if (name.action == "grab") {
_root[name.targ + "_yspeed"] = 0;
if (name.blood == true) {
name.blood = false;
if (name.targ == "enemy") {
name.attacker = "player";
} else {
name.attacker = "enemy";
}
blood(6, 20, name.attacker, name.targ);
root.back[name.targ].body.gotoAndPlay("flinch");
}
if (name._xscale == 100) {
_root.back[name.targ]._x = (name._x + 130) - billdisx;
} else {
_root.back[name.targ]._x = (name._x - 130) + billdisx;
}
_root.back[name.targ]._y = bot - 40;
if (name.bill.donehitting == true) {
root[name.targ + "_action"] = "fall";
name.action = "dead";
if (name._xscale == 100) {
root[name.targ + "_xspeed"] = 40;
root[name.targ + "_yspeed"] = -20;
} else {
root[name.targ + "_xspeed"] = -40;
root[name.targ + "_yspeed"] = -20;
}
_root.snd.scream.gotoAndPlay("scream" + _root[_root[name.targ] + "_charnum"]);
damage(20, name.targ);
blood(30, 30, back[name.from], back[name.targ]);
_root.snd.scream.gotoAndPlay("scream" + _root[name.targ + "_fbnum"]);
}
} else if (name.action == "dead") {
name.gotoAndPlay("out");
name.action = "waitdead";
} else if (name.action == "eject") {
removeMovieClip(name);
}
}
function fireballcode5(name) {
if (name.defined == undefined) {
name.count = 0;
name.unloadcount = 0;
if (name._xscale == 100) {
name.xspeed = 25;
} else {
name.xspeed = -25;
}
name.action = "fly";
name.fireballid = true;
name.defined = true;
}
if ((name.count > 1) & (name.head1.action == undefined)) {
name.head1.action = "fly";
} else if ((name.count > 8) & (name.head2.action == undefined)) {
name.head2.action = "fly";
} else if ((name.count > 16) & (name.head3.action == undefined)) {
name.head3.action = "fly";
}
name.count++;
if (((name.head1.action == "dead") & (name.head2.action == "dead")) & (name.head3.action == "dead")) {
name.unloadcount++;
if (name.unloadcount > 30) {
removeMovieClip(name);
}
}
if (((name.jail == true) & (back.jail == undefined)) & (name.jailonce == undefined)) {
_root.snd.gotojail.play();
name.jailonce = true;
fbsn++;
back.attachMovie("jail", "jail", 100 + fbsn);
back.jail._x = back[name.targ]._x;
back.jail._y = bot;
back.jail.targ = name.targ;
_root[name.targ + "_action"] = "harpooned";
_root.back[name.targ].gotoAndStop("harpooned");
_root.back[name.targ].body.gotoAndStop("jail");
}
}
function fireballcodebiden(name) {
if (name.defined == undefined) {
name.count = 0;
name.unloadcount = 0;
if (name._xscale == 100) {
name.xspeed = 25;
} else {
name.xspeed = -25;
}
name.action = "fly";
name.fireballid = true;
name.defined = true;
}
trace((name._name + " _ ") + name.count);
if ((name.count > 1) & (name.head1.action == undefined)) {
name.head1.action = "fly";
} else if ((name.count > 8) & (name.head2.action == undefined)) {
name.head2.action = "fly";
} else if ((name.count > 16) & (name.head3.action == undefined)) {
name.head3.action = "fly";
}
name.count++;
if (((name.head1.action == "dead") & (name.head2.action == "dead")) & (name.head3.action == "dead")) {
name.unloadcount++;
if (name.unloadcount > 30) {
removeMovieClip(name);
}
}
}
function ghead(name) {
if (name.defined == undefined) {
name.yspeed = random(20) - 10;
name.targ = name._parent.targ;
name.defined = true;
}
if ((name._x < -1000) || (name._x > 1000)) {
name.gotoAndStop("off");
name.action = "dead";
}
if (name.action == "fly") {
if (name._currentframe == 1) {
name.play();
}
name._x = name._x + 33;
name._y = name._y + name.yspeed;
} else if (name.action == "dead") {
}
if (name.hitTest(_root.back[name.targ].body.hit)) {
fireballhit = fireballhit + _root.fireballhit_uplev;
name.gotoAndStop("dead");
name.action = "dead";
name._parent.jail = true;
} else if (name.hitTest(_root.back[name.targ].body.block)) {
name.gotoAndStop("dead");
name.action = "dead";
}
}
function bfoot(name) {
if (name.defined == undefined) {
name.yspeed = random(10);
name.targ = name._parent.targ;
name.defined = true;
}
trace(name.action);
if ((name._x < -1000) || (name._x > 1000)) {
name.gotoAndStop("off");
name.action = "dead";
}
if (name.action == "fly") {
if (name._currentframe == 1) {
name.play();
}
name._x = name._x + 33;
name._y = name._y + name.yspeed;
} else if (name.action == "dead") {
}
if (name.hitTest(_root.back[name.targ].body.hit)) {
fireballhit = fireballhit + _root.fireballhit_uplev;
name.gotoAndStop("dead");
name.action = "dead";
_root[name.targ + "_action"] = "fall";
_root.back[name.targ].gotoAndStop("fall");
_root[name.targ + "_xspeed"] = (_root.back[name.me]._x - _root.back[name.you]._x) / 15;
_root[name.targ + "_yspeed"] = -60;
} else if (name.hitTest(_root.back[name.targ].body.block)) {
name.gotoAndStop("dead");
name.action = "dead";
}
}
function jailcode(name) {
if (name.defined == undefined) {
name.savex = back[name.targ]._x;
name.defined = true;
}
if (_root[name.targ + "_action"] == "harpooned") {
back[name.targ]._x = name.savex;
name._x = name.savex;
}
if (name.harpoonit != true) {
_root[name.targ + "_action"] = "harpooned";
_root.back[name.targ].body.gotoAndStop("jail");
}
if ((_root[name.targ + "_action"] != "harpooned") & (name.reached != true)) {
name.gotoAndPlay("out");
}
if (name._currentframe == name._totalframes) {
removeMovieClip(name);
}
}
function fireballcode2(name) {
if (name.defined == undefined) {
if (name._xscale == 100) {
name.xspeed = 24;
} else {
name.xspeed = -24;
}
name.action = "fly";
name.fireballid = true;
name.defined = true;
}
if (name.action == "fly") {
name._x = name._x + name.xspeed;
if ((name._x < -100) || (name._x > 2100)) {
removeMovieClip(name);
}
}
}
function fireballcode3(name) {
if (name.defined == undefined) {
if (name._xscale == 100) {
name.xspeed = 31;
} else {
name.xspeed = -31;
}
name.action = "fly";
name.fireballid = true;
name.defined = true;
}
if (name.action == "fly") {
name._x = name._x + name.xspeed;
if (name.hitTest(_root.back[name.targ].body.hit)) {
fireballhit = fireballhit + _root.fireballhit_uplev;
name.gotoAndPlay("dead");
name.action = "dead";
_root[name.you + "_action"] = "harpooned";
_root.back[name.you].gotoAndStop("harpooned");
_root.back[name.you].body.gotoAndStop("ice");
} else if (name.hitTest(_root.back[name.targ].body.block)) {
name.action = "dead";
name.gotoAndPlay("dead");
}
if ((name._x < -100) || (name._x > 2100)) {
removeMovieClip(name);
}
} else if (name.action == "unload") {
trace("iceunload");
removeMovieClip(name);
}
}
function fireballcode4(name) {
if (name.defined == undefined) {
shakecount = 0;
if (name._xscale == 100) {
name.xspeed = 31;
} else {
name.xspeed = -31;
}
name.action = "fly";
name.fireballid = true;
name.defined = true;
}
if (name.action == "fly") {
name._x = name._x + name.xspeed;
if (name.hitTest(_root.back[name.targ].body.hit)) {
fireballhit = fireballhit + _root.fireballhit_uplev;
name.gotoAndPlay("dead");
name.action = "dead";
_root[name.you + "_action"] = "fall";
_root.back[name.you].gotoAndStop("fall");
_root[name.you + "_xspeed"] = (_root.back[name.me]._x - _root.back[name.you]._x) / 15;
_root[name.you + "_yspeed"] = -60;
} else if (name.hitTest(_root.back[name.targ].body.block)) {
name.action = "dead";
name.gotoAndPlay("dead");
}
if ((name._x < -100) || (name._x > 2100)) {
removeMovieClip(name);
}
} else if (name.action == "unload") {
trace("iceunload");
removeMovieClip(name);
}
}
onEnterFrame = function () {
ifFrameLoaded (15) {
itsloaded = true;
_root.playbut.gotoAndStop(2);
}
if (itsloaded != true) {
_root.playbut.gotoAndStop(1);
}
};
if (dif_level == undefined) {
dif_level = "hard";
}
bdn = 0;
if (set_up_variables == undefined) {
gravity = 2.4;
maxspeed = 7;
walkspeed = 1;
player_xspeed = 0;
player_yspeed = 0;
enemy_xspeed = 0;
enemy_yspeed = 0;
jump = 36;
bot = 425;
set_up_variables = "defined";
D_delay = 0;
player_oncereset = true;
enemy_oncereset = true;
player_shorthitcounter = 0;
enemy_shorthitcounter = 0;
player_shorthitrundown = 0;
enemy_shorthitrundown = 0;
fbsn = 0;
}
Frame 8
stop();
_quality = "medium";
_root.player_charnum = 2;
ropeframe = undefined;
match = 1;
score = 0;
if (arena == undefined) {
arena = 1;
}
training = true;
musicvol = "on";
Frame 9
training = false;
if (player_charnum == 1) {
match1 = 14;
match2 = 12;
match3 = 2;
match4 = 7;
match5 = 10;
}
if (player_charnum == 2) {
match1 = 14;
match2 = 12;
match3 = 5;
match4 = 7;
match5 = 10;
}
if (player_charnum == 3) {
match1 = 14;
match2 = 12;
match3 = 5;
match4 = 7;
match5 = 10;
}
if (player_charnum == 4) {
match1 = 12;
match2 = 14;
match3 = 5;
match4 = 7;
match5 = 10;
}
if (player_charnum == 5) {
match1 = 13;
match2 = 11;
match3 = 1;
match4 = 2;
match5 = 10;
}
if (player_charnum == 6) {
match1 = 13;
match2 = 11;
match3 = 1;
match4 = 2;
match5 = 10;
}
if (player_charnum == 7) {
match1 = 13;
match2 = 11;
match3 = 1;
match4 = 2;
match5 = 10;
}
if (player_charnum == 8) {
match1 = 13;
match2 = 11;
match3 = 1;
match4 = 2;
match5 = 10;
}
if (player_charnum == 11) {
match1 = 12;
match2 = 14;
match3 = 5;
match4 = 7;
match5 = 10;
}
if (player_charnum == 12) {
match1 = 11;
match2 = 13;
match3 = 1;
match4 = 2;
match5 = 10;
}
if (player_charnum == 13) {
match1 = 14;
match2 = 12;
match3 = 5;
match4 = 7;
match5 = 10;
}
if (player_charnum == 14) {
match1 = 11;
match2 = 13;
match3 = 1;
match4 = 2;
match5 = 10;
}
_root.difficulty = _root.difficulty + 15;
_root.roundnum = 1;
if (nextround == true) {
nextround = false;
_root.match++;
_root.arena++;
_root.wins++;
}
if (arena > 6) {
arena = 1;
}
if (_root.match > 5) {
nextFrame();
}
player_roundswon = 0;
enemy_roundswon = 0;
Instance of Symbol 810 MovieClip in Frame 9
onClipEvent (load) {
addit = 0;
}
onClipEvent (enterFrame) {
addit = addit + 1;
if (addit == 20) {
stopAllSounds();
_root.gong.play();
}
}
Frame 10
stopAllSounds();
Instance of Symbol 742 MovieClip "char" in Frame 10
onClipEvent (enterFrame) {
this.gotoAndStop(_root.player_charnum);
}
Frame 12
function beginfight() {
action = "setcharacters";
trace("begin fight");
ready.play();
maxlife = 500;
wins = 0;
player_roundswon = 0;
enemy_roundswon = 0;
roundnum = 1;
ropeframe = 1;
}
function fix_stand() {
if (player_life <= 0) {
if (((((enemy_action == "duck") || (enemy_action == "stand")) || (enemy_action == "jump")) || (enemy_action == "block")) || (enemy_action == "short")) {
back.enemy.gotoAndStop("stand");
back.enemy.body.gotoAndStop(1);
}
} else if (enemy_life <= 0) {
if (((((player_action == "duck") || (player_action == "stand")) || (player_action == "jump")) || (enemy_action == "block")) || (enemy_action == "short")) {
back.player.gotoAndStop("stand");
back.player.body.gotoAndStop(1);
}
}
}
function engine() {
ropeframe++;
if (ropeframe >= 20) {
ropeframe = 1;
}
if (action == "fight") {
moveback();
character("player", "enemy");
character("enemy", "player");
} else if (action == "setcharacters") {
reset_round_difficulties();
if (player_charnum == undefined) {
player_charnum = 1;
}
if (training != true) {
enemy_charnum = _root["match" + match];
} else {
enemy_charnum = 9;
}
player_life = maxlife;
enemy_life = maxlife;
bars.playerbar.life._width = maxlife;
bars.enemybar.life._width = maxlife;
back.attachMovie(["fighter" + _root.player_charnum], "player", 1);
player_fbnum = _root.player_charnum;
back.player._x = 750;
back.player._y = bot;
back.attachMovie(["fighter" + _root.enemy_charnum], "enemy", 2);
enemy_fbnum = _root.enemy_charnum;
back.enemy._x = 1250;
back.enemy._y = bot;
back.enemy._xscale = -100;
if (training == true) {
back.player.swapDepths(back.enemy);
}
action = "ready";
} else if (action == "ready") {
if (ready._currentframe == ready._totalframes) {
action = "setmatch";
} else {
ready.play();
}
} else if (action == "setmatch") {
player_action = "stand";
enemy_action = "stand";
action = "fight";
} else if (action == "roundover") {
fix_stand();
if (enemy_life <= 0) {
player_roundswon++;
youwonlost.gotoAndPlay("win");
} else {
enemy_roundswon++;
youwonlost.gotoAndPlay("lose");
}
action = "whatsnext";
} else if (action == "whatsnext") {
fix_stand();
if (youwonlost.completed == true) {
if (player_roundswon >= 2) {
_root.fader.dest = "rank";
_root.fader.play();
nextround = true;
} else if (enemy_roundswon >= 2) {
if (_root.youwonlost._currentframe == 431) {
if (_root.dif_level == "easy") {
_root.youwonlost.gotoAndStop("gameover_easy");
} else if (_root.dif_level == "hard") {
_root.youwonlost.gotoAndStop("gameover_hard");
}
}
} else {
_root.fader.dest = "game" + arena;
_root.fader.play();
if (fader._currentframe >= 60) {
_root.roundnum++;
removeMovieClip(back.player);
removeMovieClip(back.enemy);
_root.back._x = -600;
ready.gotoAndStop(1);
youwonlost.gotoAndStop(1);
action = "setcharacters";
}
}
}
}
}
function moveback() {
if (shakenow != true) {
if (back.ytype == "scroll") {
if ((player_yy < 300) & ((back._y - player_yspeed) > 0)) {
back._y = back._y - player_yspeed;
} else {
back._y = 0;
}
} else if (((player_yy < 300) & (back._y < 200)) & ((back._y - player_yspeed) > 0)) {
back._y = back._y - player_yspeed;
} else if ((back._y >= 200) & (player_yy >= 300)) {
back._y = back._y - player_yspeed;
} else if ((back._y >= 200) & (player_yy < 300)) {
} else {
back._y = 0;
}
}
llim = 75;
rlim = 725;
bw = -1200;
px = back.player._x + back._x;
ex = back.enemy._x + back._x;
pxx = px + player_xspeed;
exx = ex + enemy_xspeed;
if (ex > rlim) {
back.enemy._x = ((-back._x) + rlim) - 40;
}
if ((pxx > llim) & (pxx < rlim)) {
back.player._x = back.player._x + player_xspeed;
} else if ((pxx <= llim) & ((back._x - player_xspeed) < 0)) {
if ((ex - player_xspeed) <= rlim) {
back.player._x = (-back._x) + llim;
back._x = back._x - player_xspeed;
} else if ((ex - player_xspeed) > rlim) {
frac = ex - rlim;
back._x = back._x - frac;
back.player._x = (-back._x) + llim;
}
} else if ((pxx >= rlim) & ((back._x - player_xspeed) > bw)) {
if ((ex - player_xspeed) >= llim) {
back.player._x = (-back._x) + rlim;
back._x = back._x - player_xspeed;
} else if ((ex - player_xspeed) < llim) {
frac = ex - llim;
back._x = back._x - frac;
back.player._x = (-back._x) + rlim;
}
}
if ((exx > llim) & (exx < rlim)) {
back.enemy._x = back.enemy._x + enemy_xspeed;
} else if (exx <= llim) {
if (((back._x - enemy_xspeed) < 0) & ((px - enemy_xspeed) <= rlim)) {
back.enemy._x = (-back._x) + llim;
back._x = back._x - enemy_xspeed;
back.player._x = back.player._x - enemy_xspeed;
}
} else if (exx >= rlim) {
if (((back._x - enemy_xspeed) > bw) & ((px - enemy_xspeed) >= llim)) {
back.enemy._x = (-back._x) + rlim;
back._x = back._x - enemy_xspeed;
back.player._x = back.player._x - enemy_xspeed;
}
}
if (back._x > 0) {
back._x = 0;
} else if (back._x < -1200) {
back._x = -1200;
}
if (back.player._x < llim) {
back.player._x = llim;
} else if (back.player._x > 1925) {
back.player._x = 1925;
}
if (back.enemy._x < llim) {
back.enemy._x = llim;
} else if (back.enemy._x > 1925) {
back.enemy._x = 1925;
}
}
function unloader(name) {
if (name.lastframe == undefined) {
name.lastframe = back._currentframe;
}
if (name.lastframe != back._currentframe) {
name.removeMovieClip();
} else {
name.lastframe = back._currentframe;
}
}
function reset_round_difficulties() {
short_add_dif = 0;
hard_add_dif = 0;
}
function ai(name) {
if (enemy_nouppercut > 0) {
enemy_nouppercut--;
if (player_action == "uppercut") {
unblock = false;
enemy_action = "block";
aia = -2;
enemy.gotoAndStop("block");
}
}
if ((enemy_nokick > 0) & (enemy_nokick < 30)) {
enemy_nokick--;
if (player_action == "kick") {
unblock = false;
enemy_action = "block";
aia = -2;
enemy.gotoAndStop("block");
}
} else if (enemy_nokick >= 30) {
enemy_nokick--;
}
difficulty = match * 9;
if (difficulty > 80) {
difficulty = 80;
}
if (training == true) {
enemy_action = "block";
enemy.gotoAndStop("block");
if (name._x < back.player._x) {
name._xscale = 100;
} else if (back.enemy._x > back.player._x) {
name._xscale = -100;
}
}
if ((enemy_action == "smallflinch") & (back.enemy.body._currentframe >= 13)) {
trace("small flinch end");
trace("shc " + player_shorthitcounter);
addmore = player_shorthitcounter * 10;
if (enemy_action != "block") {
unblock = false;
blockit = random(100);
trace((("2 short block " + blockit) + " to ") + ((blockdifficulty + short_add_dif) + addmore));
trace("2 short_add_dif " + short_add_dif);
trace("2 addmore " + addmore);
trace("------------");
}
if (blockit < ((blockdifficulty + short_add_dif) + addmore)) {
trace("BLOCK SUCCESS");
unblock = false;
enemy_action = "block";
back.enemy.gotoAndStop("block");
aia = -2;
}
}
if ((((((training != true) & (enemy_action != "smallflinch")) & (enemy_action != "bigflinch")) & (enemy_action != "fall")) & (enemy_action != "harpooned")) & (enemy_action != "doved")) {
dovereaction(name);
harpoonreaction(name);
enemydefense(name);
enemyreactstogettinghit(name);
checkforfall();
enemyface(name);
if (aia == 0) {
if (dis < 100) {
enemy_action = "uppercut";
} else {
aia = random(16);
}
shottry = 0;
fixlunge = false;
enemy_fixjump = false;
} else if (aia == -1) {
if (player_action != "fall") {
aia = 0;
}
enemyreactstofall(name);
} else if (aia == -2) {
if (unblock == true) {
blockercounter--;
}
if ((unblock == false) || (blockercounter > 0)) {
if (unblock == false) {
blockercounter = 9;
}
enemy_action = "block";
name.body.nextFrame();
} else {
name.body.prevFrame();
if (name.body._currentframe == 1) {
enemy_action = "stand";
aia = 0;
}
}
} else if (aia == -3) {
if (player_lunge != true) {
aia = 0;
}
} else if (aia == -4) {
if (player_action != "doved") {
aia = 0;
}
} else if (aia == -5) {
if (player_action != "harpooned") {
aia = 0;
}
} else if ((aia == 1) || (aia == 2)) {
timeout();
if (dis > 275) {
movedelay = random(base_enemy_delay - difficulty);
moveforward(name);
} else if (movedelay <= 0) {
enemy_xspeed = 0;
enemy_action = "short";
} else {
enemy_xspeed = 0;
movedelay--;
}
} else if ((aia == 3) || (aia == 4)) {
timeout();
if (dis > 200) {
movedelay = random(base_enemy_delay - difficulty);
moveforward(name);
} else if (movedelay <= 0) {
enemy_xspeed = 0;
enemy_action = "kick";
} else {
enemy_xspeed = 0;
movedelay--;
}
if ((player_action == "bigflinch") || (player_action == "fall")) {
aia = 0;
}
} else if ((aia == 5) || (aia == 6)) {
timeout();
if (dis >= 400) {
enemy_action = "hard";
if (name._x < back.player._x) {
enemy_xspeed = 80;
fixlunge = true;
} else if (back.enemy._x > back.player._x) {
enemy_xspeed = -80;
fixlunge = true;
}
} else if ((dis < 400) & (dis > 250)) {
if (fixlunge == false) {
moveforward(name);
}
} else {
enemy_action = "hard";
}
if ((player_action == "bigflinch") || (player_action == "fall")) {
aia = 0;
}
} else if (aia == 7) {
timeout();
if (dis > 275) {
movedelay = random(base_enemy_delay - difficulty);
movebackard(name);
} else if (movedelay <= 0) {
enemy_xspeed = 0;
enemy_action = "short";
} else {
enemy_xspeed = 0;
movedelay--;
}
if (shorttry == undefined) {
shorttry = 0;
}
} else if (aia == 8) {
timeout();
if (dis > 250) {
movedelay = random(base_enemy_delay - difficulty);
movebackward(name);
} else if (movedelay <= 0) {
enemy_xspeed = 0;
enemy_action = "kick";
} else {
enemy_xspeed = 0;
movedelay--;
}
if ((player_action == "bigflinch") || (player_action == "fall")) {
aia = 0;
}
} else if (aia == 9) {
aia = 5;
timeout();
if (shottry < 50) {
shottry = 50;
}
if (dis > 300) {
movebackward(name);
} else {
enemy_xspeed = 0;
enemy_action = "hard";
}
if ((player_action == "bigflinch") || (player_action == "fall")) {
aia = 0;
}
} else if ((aia == 10) || (aia == 11)) {
enemy_xspeed = (-maxspeed) * 2;
if ((enemy_action == "stand") & (enemy_fixjump == false)) {
enemy_action = "jump";
enemy_fixjump = true;
}
if ((dis < 250) & (enemy_jump == "jumping")) {
enemy_action = "jumpkick";
}
if ((enemy_action != "jump") & (enemy_action != "jumpkick")) {
enemy_jump = "notjumping";
enemy_fixjump = false;
aia = 0;
}
} else if (aia == 12) {
enemy_xspeed = maxspeed * 2;
if ((enemy_action == "stand") & (enemy_fixjump == false)) {
enemy_action = "jump";
enemy_fixjump = true;
}
if ((dis < 250) & (enemy_jump == "jumping")) {
enemy_action = "jumpkick";
}
if ((enemy_action != "jump") & (enemy_action != "jumpkick")) {
enemy_jump = "notjumping";
enemy_fixjump = false;
aia = 0;
}
} else if (aia >= 13) {
if (player_action == "harpooned") {
aia = 0;
trace("fireball harpoon out");
} else if (back.enemy._y < (bot - 20)) {
aia = 0;
trace("air fireball " + back.enemy._y);
} else if ((back.enemy.body._currentframe == back.enemy.body._totalframes) & (enemy_action == "fireball")) {
aia = 0;
} else if (dis > 300) {
enemy_action = "fireball";
} else {
movebackward(name);
}
}
}
if (enemy_action == "duck") {
enemy_action = "stand";
}
}
function dovereaction(name) {
if (player_action == "doved") {
aia = -4;
if (dis > 200) {
moveforward(name);
} else {
enemy_action = "uppercut";
}
}
}
function harpoonreaction(name) {
if ((player_action == "harpooned") & (back.player.body._currentframe > 5)) {
aia = -5;
if (dis > 200) {
moveforward(name);
} else {
enemy_action = "uppercut";
}
}
}
function checkforfall() {
if ((player_action == "fall") & (aia != -1)) {
fallreaction = random(3);
aia = -1;
}
}
function enemyreactstofall(name) {
if (enemy_action == "stand") {
if (fallreaction == 0) {
enemy_action = "jump";
back.enemy.gotoAndStop("jump");
if (dis < 500) {
if (name._x <= back.player._x) {
enemy_xspeed = (-maxspeed) * 2;
} else if (name._x > back.player._x) {
enemy_xspeed = maxspeed * 2;
}
} else {
fallreaction = 10;
}
} else if (fallreaction == 1) {
if (dis < 500) {
movebackward(name);
} else {
fallreaction = 10;
}
} else if (fallreaction == 2) {
if (dis < 100) {
movebackward(name);
} else {
fallreaction = 10;
}
}
}
}
function moveforward(name) {
if (walkintoshort != true) {
if (name._x < back.player._x) {
name._xscale = 100;
enemy_xspeed = 7;
} else if (back.enemy._x > back.player._x) {
name._xscale = -100;
enemy_xspeed = -7;
}
} else {
enemy_xspeed = 0;
}
}
function movebackward(name) {
if (((dis < 500) & ((back.enemy._x + enemy_xspeed) > 90)) & ((back.enemy._x + enemy_xspeed) < 1910)) {
if (walkoffset <= 0) {
if (name._x < back.player._x) {
name._xscale = 100;
enemy_xspeed = -7;
} else if (back.enemy._x > back.player._x) {
name._xscale = -100;
enemy_xspeed = 7;
}
} else {
walkoffset--;
}
} else {
enemy_xspeed = 0;
walkoffset = 20;
}
}
function timeout() {
shottry++;
if (shottry > 100) {
shottry = 0;
aia = 0;
}
}
function enemyreactstogettinghit(name) {
if ((enemy_action == "bigflinch") & (name.body._currentframe > 33)) {
bigreaction = 0;
if (bigreaction == 0) {
enemy_action = "stand";
enemy_fixjump = false;
aia = 12;
}
}
}
function enemydefense(name) {
if ((player_action == "short") & (dis > 250)) {
walkintoshort = true;
shorttoomuchfromfar++;
} else if ((player_action != "short") & (shorttoomuchfromfar > 0)) {
walkintoshort = false;
shorttoomuchfromfar--;
}
if (shorttoomuchfromfar >= 60) {
if ((enemy_action == "stand") || (enemy_action == "block")) {
aia = 14;
}
}
blockdifficulty = 10 + difficulty;
blockfireball = difficulty + fireballhit;
if ((player_life <= 0) || (enemy_life <= 0)) {
fireballhit = 0;
}
if (((((enemy_action != "fall") & (enemy_action != "jump")) & (enemy_action != "bigflinch")) & (enemy_action != "smallflinch")) & (enemy_action != "doved")) {
if ((enemy_action == "stand") || (enemy_action == "block")) {
if (player_lunge == true) {
lungedefend = random(200);
if (lungedefend < blockdifficulty) {
lungeuppercut = true;
}
if ((lungeuppercut == true) & (dis < 300)) {
enemy_action = "uppercut";
back.enemy.gotoAndStop("uppercut");
aia = -3;
}
} else if (lungeuppercut == true) {
lungeuppercut = false;
}
}
}
if (dis < 300) {
if ((((player_action == "short") || (player_action == "kick")) || (player_action == "jumpkick")) || ((player_action == "hard") & (player_lunge == false))) {
if (((((enemy_action != "fall") & (enemy_action != "jump")) & (enemy_action != "bigflinch")) & (enemy_action != "smallflinch")) & (enemy_action != "doved")) {
if ((enemy_action == "stand") || (enemy_action == "block")) {
if ((player_action == "hard") & (player_lunge == false)) {
trace("trying to block non lunge hard");
}
if (player_action == "short") {
if (enemy_action != "block") {
unblock = false;
blockit = random(100);
trace((("short block " + blockit) + " to ") + (blockdifficulty + short_add_dif));
trace("short_add_dif " + short_add_dif);
}
if (blockit < (blockdifficulty + short_add_dif)) {
unblock = false;
enemy_action = "block";
aia = -2;
}
} else {
if (enemy_action != "block") {
unblock = false;
blockit = random(100);
}
if (blockit < blockdifficulty) {
unblock = false;
enemy_action = "block";
aia = -2;
}
}
} else if (enemy_action == "block") {
unblock = true;
enemy_action = "stand";
aia = 0;
}
}
}
} else if (player_action == "fireball") {
if (((((enemy_action != "fall") & (enemy_action != "jump")) & (enemy_action != "bigflinch")) & (enemy_action != "smallflinch")) & (enemy_action != "doved")) {
if (enemy_action != "block") {
unblock = false;
if (match <= 1) {
blockit = random(900);
trace("m1 " + blockit);
} else if (match == 2) {
blockit = random(600);
trace("m2 " + blockit);
} else {
blockit = random(200);
}
}
if (blockit < blockfireball) {
unblock = false;
enemy_action = "block";
aia = -2;
}
}
} else if (unblock == false) {
unblock = true;
}
}
function enemyface(name) {
if (enemy_action == "stand") {
if (name._x < back.player._x) {
name._xscale = 100;
} else if (name._x > back.player._x) {
name._xscale = -100;
}
}
}
var jkcount = 0;
if (training == true) {
gotoAndStop ("training");
} else {
if (match == 5) {
arena = 4;
}
gotoAndStop("load" + arena);
}
stop();
fix = 0;
upper = 0;
base_enemy_delay = 120;
aia = 0;
_root.fireballhit_uplev = 20;
enemy_nouppercut = 0;
enemy_nokick = 0;
enemy_fixjump = false;
shorttry = 0;
fireballhit = 0;
shorttoomuchfromfar = 0;
Instance of Symbol 899 MovieClip in Frame 12
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 12
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Instance of Symbol 1419 MovieClip "shake" in Frame 12
onClipEvent (enterFrame) {
if (this._currentframe == 1) {
_root.shakenow = false;
} else {
_root.shakenow = true;
}
}
Frame 13
ready._visible = false;
ready.gotoAndPlay("training");
enemy_charnum = 9;
trace("train it");
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1499 MovieClip in Frame 13
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 1520 MovieClip in Frame 13
onClipEvent (enterFrame) {
if (_root.training != true) {
unloadMovie (this);
}
}
Instance of Symbol 1553 MovieClip "bars" in Frame 13
onClipEvent (enterFrame) {
if (_root.training == true) {
this._visible = false;
}
}
Frame 14
this.createEmptyMovieClip("loader", -6000);
loader.onEnterFrame = function () {
ifFrameLoaded (15) {
gotoAndStop ("game1");
delete loader.onEnterFrame;
}
};
Frame 15
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1574 MovieClip in Frame 15
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 899 MovieClip in Frame 15
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 15
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Frame 16
this.createEmptyMovieClip("loader", -6000);
loader.onEnterFrame = function () {
ifFrameLoaded (17) {
gotoAndStop ("game2");
delete loader.onEnterFrame;
}
};
Frame 17
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1585 MovieClip in Frame 17
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 899 MovieClip in Frame 17
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 17
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Frame 18
this.createEmptyMovieClip("loader", -6000);
loader.onEnterFrame = function () {
ifFrameLoaded (19) {
gotoAndStop ("game3");
delete loader.onEnterFrame;
}
};
Frame 19
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1499 MovieClip in Frame 19
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 899 MovieClip in Frame 19
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 19
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Frame 20
this.createEmptyMovieClip("loader", -6000);
loader.onEnterFrame = function () {
ifFrameLoaded (21) {
gotoAndStop ("game4");
delete loader.onEnterFrame;
}
};
Frame 21
bot = 405;
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1574 MovieClip in Frame 21
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 899 MovieClip in Frame 21
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 21
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Frame 22
this.createEmptyMovieClip("loader", -6000);
loader.onEnterFrame = function () {
ifFrameLoaded (23) {
gotoAndStop ("game5");
delete loader.onEnterFrame;
}
};
Frame 23
bot = 425;
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1499 MovieClip in Frame 23
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 899 MovieClip in Frame 23
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 23
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Frame 24
this.createEmptyMovieClip("loader", -6000);
loader.onEnterFrame = function () {
ifFrameLoaded (25) {
gotoAndStop ("game6");
delete loader.onEnterFrame;
}
};
Frame 25
beginfight();
onEnterFrame = function () {
engine();
};
Instance of Symbol 1585 MovieClip in Frame 25
onClipEvent (load) {
if (_root.musicvol == "on") {
gotoAndStop (2);
}
}
Instance of Symbol 899 MovieClip in Frame 25
onClipEvent (enterFrame) {
if (_root.back.player._x < _root.back.enemy._x) {
if (_root.rightkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.rightkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
} else {
if (_root.leftkey == true) {
this.play();
if (firstkeyup == true) {
secondkeyup = true;
} else {
secondkeyup = false;
}
}
if (((_root.ckey == true) & (secondkeyup == true)) & (this._currentframe > 1)) {
_root.fb_seq = true;
trace("fb");
secondkeyup = false;
firstkeyup = false;
}
if (this._currentframe > 1) {
if (_root.leftkey == false) {
firstkeyup = true;
}
} else {
_root.fb_seq = false;
secondkeyup = false;
firstkeyup = false;
}
}
}
Instance of Symbol 902 MovieClip in Frame 25
onClipEvent (enterFrame) {
total_time = getTimer();
cur_time = total_time - mark_time;
if (cur_time > 1000) {
mark_time = total_time;
this.fp = this._currentframe;
a = 45;
if (((fp / a) * 100) < 100) {
this.afps = (fp / a) * 100;
} else {
this.afps = 100;
}
this.gotoAndPlay(1);
}
_root.gamespeed = int(this.afps);
}
onClipEvent (load) {
mark_time = getTimer();
}
Symbol 1 MovieClip [VideoPlayer] Frame 1
#initclip 19
Object.registerClass("VideoPlayer", mx.video.VideoPlayer);
#endinitclip
Symbol 3 MovieClip [FLVPlayback] Frame 1
#initclip 18
Object.registerClass("FLVPlayback", mx.video.FLVPlayback);
#endinitclip
stop();
Symbol 29 MovieClip Frame 46
gotoAndPlay ("stanceloop");
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 2
gotoAndStop (1);
Symbol 32 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 32 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 32 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 32 MovieClip Frame 54
play();
Symbol 32 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 33 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 33 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 41 MovieClip Frame 2
_root.snd.woom.play();
Symbol 42 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 42 MovieClip Frame 38
fallstatus = "deathtest";
Symbol 42 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 45 MovieClip Frame 4
_root.snd.woom.play();
Symbol 45 MovieClip Frame 13
stop();
punch = "done";
Symbol 46 MovieClip Frame 3
_root.snd.woom.play();
Symbol 46 MovieClip Frame 11
_root.snd.woom.play();
Symbol 48 MovieClip Frame 4
if (_parent._name == "player") {
if (Key.isDown(37) || (Key.isDown(39))) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 40;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -40;
}
gotoAndPlay ("jump2");
}
} else if (_parent._name == "enemy") {
if (_root.enemy_xspeed == 0) {
gotoAndPlay ("jump");
}
}
Instance of Symbol 47 MovieClip in Symbol 48 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.dis < 200) {
_parent.gotoAndPlay("jump");
}
_root.enemy_xspeed = 50;
}
Symbol 48 MovieClip Frame 26
if (_parent._name == "player") {
_root.player_yspeed = -30;
if (_root.player_xspeed > 0) {
_root.player_xspeed = 40;
} else if (_root.player_xspeed < 0) {
_root.player_xspeed = -40;
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -30;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 48 MovieClip Frame 27
_root.snd.woom.play();
Symbol 50 MovieClip Frame 1
function fireball() {
_root.fbsn++;
_root.back.attachMovie("fireball10", "fb" + _root.fbsn, 100 + _root.fbsn);
_root.back["fb" + _root.fbsn].me = _parent._name;
_root.back["fb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["fb" + _root.fbsn]._x = _parent._x;
} else {
_root.back["fb" + _root.fbsn]._x = _parent._x;
}
_root.back["fb" + _root.fbsn]._y = _parent._y - 200;
}
Symbol 50 MovieClip Frame 9
fireball();
Symbol 50 MovieClip Frame 13
fireball();
Symbol 50 MovieClip Frame 17
fireball();
Symbol 50 MovieClip Frame 21
fireball();
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 10
gotoAndStop (1);
Symbol 63 MovieClip Frame 35
gotoAndStop ("out");
Symbol 63 MovieClip Frame 36
play();
Symbol 63 MovieClip Frame 54
stop();
Symbol 63 MovieClip Frame 55
stop();
Symbol 64 MovieClip [fighter10] Frame 1
stop();
stop();
Instance of Symbol 48 MovieClip in Symbol 64 MovieClip [fighter10] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 30) {
this._alpha = this._alpha + 10;
}
}
Symbol 1627 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local2}, clip._mochiad._containerLCName);
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
if (_local7._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 1628 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 1629 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.3 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 1630 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1631 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
static var gameStart, levelStart;
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function trigger(kind, obj) {
if (obj == undefined) {
obj = {};
} else if (obj.kind != undefined) {
trace("WARNING: optional arguements package contains key 'id', it will be overwritten");
obj.kind = kind;
}
mochi.as2.MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startGame() {
gameStart = new Date().getTime();
trigger("start_game");
}
static function endGame() {
var _local1 = new Date().getTime() - gameStart;
trigger("end_game", {time:_local1});
}
static function startLevel() {
levelStart = new Date().getTime();
trigger("start_level");
}
static function endLevel() {
var _local1 = new Date().getTime() - levelStart;
trigger("end_level", {time:_local1});
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1632 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1633 MovieClip [__Packages.mx.video.FLVPlayback] Frame 0
class mx.video.FLVPlayback extends MovieClip
{
var _autoPlay, _autoRewind, _autoSize, _bufferTime, _contentPath, _cuePoints, _idleTimeout, _isLive, _aspectRatio, _seekToPrevOffset, _playheadUpdateInterval, _progressInterval, _totalTime, _transform, _volume, _skinAutoHide, _bufferingBarHides, _origHeight, __height, _height, _origWidth, __width, _width, _scaleX, _scaleY, _xscale, _yscale, _preSeekTime, _firstStreamReady, _firstStreamShown, _activeVP, _visibleVP, _topVP, _vp, _vpState, _cpMgr, boundingBox_mc, preview_mc, dispatchEvent, _uiMgr, _bufferingBar, _backButton, __get__cuePoints, _forwardButton, _muteButton, _pauseButton, _playButton, _playPauseButton, _seekBar, _seekBarInterval, _seekBarScrubTolerance, _skin, _stopButton, _visible, _volumeBar, _volumeBarInterval, _volumeBarScrubTolerance, _x, _y, attachMovie, createEmptyMovieClip;
function FLVPlayback () {
super();
mx.events.EventDispatcher.initialize(this);
if (_autoPlay == undefined) {
_autoPlay = true;
}
if (_autoRewind == undefined) {
_autoRewind = true;
}
if (_autoSize == undefined) {
_autoSize = false;
}
if (_bufferTime == undefined) {
_bufferTime = 0.1;
}
if (_contentPath == undefined) {
_contentPath = "";
}
if (_cuePoints == undefined) {
_cuePoints = null;
}
if (_idleTimeout == undefined) {
_idleTimeout = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL;
}
if (_isLive == undefined) {
_isLive = false;
}
if (_aspectRatio == undefined) {
_aspectRatio = true;
}
if (_seekToPrevOffset == undefined) {
_seekToPrevOffset = SEEK_TO_PREV_OFFSET_DEFAULT;
}
if (_playheadUpdateInterval == undefined) {
_playheadUpdateInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL;
}
if (_progressInterval == undefined) {
_progressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL;
}
if (_totalTime == undefined) {
_totalTime = 0;
}
if (_transform == undefined) {
_transform = null;
}
if (_volume == undefined) {
_volume = 100;
}
if (_skinAutoHide == undefined) {
_skinAutoHide = false;
}
if (_bufferingBarHides == undefined) {
_bufferingBarHides = false;
}
_origHeight = (__height = _height);
_origWidth = (__width = _width);
_scaleX = 100;
_scaleY = 100;
_xscale = 100;
_yscale = 100;
_preSeekTime = -1;
_firstStreamReady = false;
_firstStreamShown = false;
createUIManager();
_activeVP = 0;
_visibleVP = 0;
_topVP = 0;
_vp = new Array();
_vpState = new Array();
_cpMgr = new Array();
createVideoPlayer(0);
_vp[0].visible = false;
_vp[0].volume = 0;
boundingBox_mc._visible = false;
boundingBox_mc.unloadMovie();
delete boundingBox_mc;
if (_global.isLivePreview) {
createLivePreviewMovieClip();
setSize(__width, __height);
}
_cpMgr[0].processCuePointsProperty(_cuePoints);
delete _cuePoints;
_cuePoints = null;
}
function setSize(w, h) {
if (_global.isLivePreview) {
if (preview_mc == undefined) {
createLivePreviewMovieClip();
}
preview_mc.box_mc._width = w;
preview_mc.box_mc._height = h;
if ((preview_mc.box_mc._width < preview_mc.icon_mc._width) || (preview_mc.box_mc._height < preview_mc.icon_mc._height)) {
preview_mc.icon_mc._visible = false;
} else {
preview_mc.icon_mc._visible = true;
preview_mc.icon_mc._x = (preview_mc.box_mc._width - preview_mc.icon_mc._width) / 2;
preview_mc.icon_mc._y = (preview_mc.box_mc._height - preview_mc.icon_mc._height) / 2;
}
}
if ((w == width) && (h == height)) {
return(undefined);
}
__width = w;
__height = h;
var _local3 = 0;
while (_local3 < _vp.length) {
if (_vp[_local3] != undefined) {
_vp[_local3].setSize(w, h);
}
_local3++;
}
dispatchEvent({type:"resize", x:x, y:y, width:w, height:h});
}
function setScale(xs, ys) {
if ((xs == scaleX) && (ys == scaleY)) {
return(undefined);
}
_scaleX = xs;
_scaleY = ys;
var _local2 = 0;
while (_local2 < _vp.length) {
if (_vp[_local2] != undefined) {
_vp[_local2].setSize((_origWidth * xs) / 100, (_origHeight * ys) / 100);
}
_local2++;
}
dispatchEvent({type:"resize", x:x, y:y, width:width, height:height});
}
function handleEvent(e) {
var _local3 = e.state;
if (((e.state != undefined) && (e.target._name == _visibleVP)) && (scrubbing)) {
_local3 = SEEKING;
}
if (e.type == "metadataReceived") {
_cpMgr[e.target._name].processFLVCuePoints(e.info.cuePoints);
dispatchEvent({type:e.type, info:e.info, vp:e.target._name});
} else if (e.type == "cuePoint") {
if (_cpMgr[e.target._name].isFLVCuePointEnabled(e.info)) {
dispatchEvent({type:e.type, info:e.info, vp:e.target._name});
}
} else if (e.type == "rewind") {
dispatchEvent({type:e.type, auto:true, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
_cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime);
} else if (e.type == "resize") {
dispatchEvent({type:e.type, x:x, y:y, width:width, height:height, auto:true, vp:e.target._name});
} else if (e.type == "playheadUpdate") {
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
if ((_preSeekTime >= 0) && (e.target.state != SEEKING)) {
var _local5 = _preSeekTime;
_preSeekTime = -1;
_cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime);
dispatchEvent({type:"seek", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
if (_local5 < e.playheadTime) {
dispatchEvent({type:"fastForward", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
} else if (_local5 > e.playheadTime) {
dispatchEvent({type:"rewind", auto:false, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
}
}
_cpMgr[e.target._name].dispatchASCuePoints();
} else if (e.type == "stateChange") {
var _local4 = e.target._name;
if ((_local4 == _visibleVP) && (scrubbing)) {
return(undefined);
}
if (e.state == mx.video.VideoPlayer.RESIZING) {
return(undefined);
}
if (((_vpState[_local4].prevState == LOADING) && (_vpState[_local4].autoPlay)) && (e.state == STOPPED)) {
return(undefined);
}
_vpState[_local4].prevState = e.state;
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
if (_vp[e.target._name].state != _local3) {
return(undefined);
}
switch (_local3) {
case BUFFERING :
dispatchEvent({type:"buffering", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
break;
case PAUSED :
dispatchEvent({type:"paused", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
break;
case PLAYING :
dispatchEvent({type:"playing", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
break;
case STOPPED :
dispatchEvent({type:"stopped", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
}
} else if (e.type == "progress") {
dispatchEvent({type:e.type, bytesLoaded:e.bytesLoaded, bytesTotal:e.bytesTotal, vp:e.target._name});
} else if (e.type == "ready") {
var _local4 = e.target._name;
if (!_firstStreamReady) {
if (_local4 == _visibleVP) {
_firstStreamReady = true;
if (_uiMgr.__get__skinReady() && (!_firstStreamShown)) {
_uiMgr.__set__visible(true);
showFirstStream();
}
}
} else if ((_firstStreamShown && (_local3 == STOPPED)) && _vpState[_local4].autoPlay) {
_vp[_local4].play();
}
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
} else if ((e.type == "close") || (e.type == "complete")) {
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
}
}
function load(contentPath, totalTime, isLive) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if ((contentPath == null) || (contentPath == "")) {
return(undefined);
}
autoPlay = (false);
if (totalTime != undefined) {
this.totalTime = (totalTime);
}
if (isLive != undefined) {
this.isLive = (isLive);
}
this.contentPath = (contentPath);
}
function play(contentPath, totalTime, isLive) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (contentPath == undefined) {
_vp[_activeVP].play();
} else {
autoPlay = (true);
if (totalTime != undefined) {
this.totalTime = (totalTime);
}
if (isLive != undefined) {
this.isLive = (isLive);
}
this.contentPath = (contentPath);
}
}
function pause() {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
_vp[_activeVP].pause();
}
function stop() {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
_vp[_activeVP].stop();
}
function seek(time) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
_preSeekTime = playheadTime;
_vp[_activeVP].seek(time);
}
function seekSeconds(time) {
seek(time);
}
function seekPercent(percent) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if ((((percent < 0) || (percent > 100)) || (_vp[_activeVP].totalTime == null)) || (_vp[_activeVP].totalTime <= 0)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
seek((_vp[_activeVP].totalTime * percent) / 100);
}
function get playheadPercentage() {
if ((_vp[_activeVP].totalTime == null) || (_vp[_activeVP].totalTime <= 0)) {
return(undefined);
}
return((_vp[_activeVP].playheadTime / _vp[_activeVP].totalTime) * 100);
}
function set playheadPercentage(percent) {
seekPercent(percent);
//return(playheadPercentage);
}
function seekToNavCuePoint(timeNameOrCuePoint) {
var _local3;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local3 = {name:timeNameOrCuePoint};
break;
case "number" :
_local3 = {time:timeNameOrCuePoint};
break;
case "object" :
_local3 = timeNameOrCuePoint;
}
if ((_local3.name == null) || (typeof(_local3.name) != "string")) {
seekToNextNavCuePoint(_local3.time);
return(undefined);
}
if (isNaN(_local3.time)) {
_local3.time = 0;
}
var _local2 = findNearestCuePoint(timeNameOrCuePoint, NAVIGATION);
while ((_local2 != null) && ((_local2.time < _local3.time) || (!isFLVCuePointEnabled(_local2)))) {
_local2 = findNextCuePointWithName(_local2);
}
if (_local2 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
seek(_local2.time);
}
function seekToNextNavCuePoint(time) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (isNaN(time) || (time < 0)) {
time = _vp[_activeVP].playheadTime + 0.001;
}
var _local3;
_local3 = findNearestCuePoint(time, NAVIGATION);
if (_local3 == null) {
seek(_vp[_activeVP].totalTime);
return(undefined);
}
var _local2 = _local3.index;
if (_local3.time < time) {
_local2++;
}
while ((_local2 < _local3.array.length) && (!isFLVCuePointEnabled(_local3.array[_local2]))) {
_local2++;
}
if (_local2 >= _local3.array.length) {
var _local5 = _vp[_activeVP].totalTime;
if (_local3.array[_local3.array.length - 1].time > _local5) {
_local5 = _local3.array[_local3.array.length - 1];
}
seek(_local5);
} else {
seek(_local3.array[_local2].time);
}
}
function seekToPrevNavCuePoint(time) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (isNaN(time) || (time < 0)) {
time = _vp[_activeVP].playheadTime;
}
var _local3 = findNearestCuePoint(time, NAVIGATION);
if (_local3 == null) {
seek(0);
return(undefined);
}
var _local2 = _local3.index;
while ((_local2 >= 0) && ((!isFLVCuePointEnabled(_local3.array[_local2])) || (_local3.array[_local2].time >= (time - _seekToPrevOffset)))) {
_local2--;
}
if (_local2 < 0) {
seek(0);
} else {
seek(_local3.array[_local2].time);
}
}
function addASCuePoint(timeOrCuePoint, name, parameters) {
return(_cpMgr[_activeVP].addASCuePoint(timeOrCuePoint, name, parameters));
}
function removeASCuePoint(timeNameOrCuePoint) {
return(_cpMgr[_activeVP].removeASCuePoint(timeNameOrCuePoint));
}
function findCuePoint(timeNameOrCuePoint, type) {
switch (type) {
case "event" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].eventCuePoints, false, timeNameOrCuePoint));
case "navigation" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].navCuePoints, false, timeNameOrCuePoint));
case "flv" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].flvCuePoints, false, timeNameOrCuePoint));
case "actionscript" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].asCuePoints, false, timeNameOrCuePoint));
case "all" :
}
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].allCuePoints, false, timeNameOrCuePoint));
}
function findNearestCuePoint(timeNameOrCuePoint, type) {
switch (type) {
case "event" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].eventCuePoints, true, timeNameOrCuePoint));
case "navigation" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].navCuePoints, true, timeNameOrCuePoint));
case "flv" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].flvCuePoints, true, timeNameOrCuePoint));
case "actionscript" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].asCuePoints, true, timeNameOrCuePoint));
case "all" :
}
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].allCuePoints, true, timeNameOrCuePoint));
}
function findNextCuePointWithName(cuePoint) {
return(_cpMgr[_activeVP].getNextCuePointWithName(cuePoint));
}
function setFLVCuePointEnabled(enabled, timeNameOrCuePoint) {
return(_cpMgr[_activeVP].setFLVCuePointEnabled(enabled, timeNameOrCuePoint));
}
function isFLVCuePointEnabled(timeNameOrCuePoint) {
return(_cpMgr[_activeVP].isFLVCuePointEnabled(timeNameOrCuePoint));
}
function getNextHighestDepth() {
var _local2 = super.getNextHighestDepth();
return(((_local2 < 1000) ? 1000 : (_local2)));
}
function bringVideoPlayerToFront(index) {
if ((index == _topVP) || (_vp[index] == undefined)) {
return(undefined);
}
_vp[_topVP].swapDepths(_vp[index].getDepth());
_topVP = index;
}
function getVideoPlayer(index) {
return(_vp[index]);
}
function closeVideoPlayer(index) {
if (_vp[index] == undefined) {
return(undefined);
}
if (index == 0) {
throw new mx.video.VideoError(mx.video.VideoError.DELETE_DEFAULT_PLAYER);
}
if (_visibleVP == index) {
visibleVideoPlayerIndex = (0);
}
if (_activeVP == index) {
activeVideoPlayerIndex = (0);
}
_vp[index].close();
_vp[index].unloadMovie();
delete _vp[index];
_vp[index] = undefined;
}
function get activeVideoPlayerIndex() {
return(_activeVP);
}
function set activeVideoPlayerIndex(i) {
if (_activeVP == i) {
return;
}
if (_vp[_activeVP].onEnterFrame != undefined) {
doContentPathConnect();
}
_activeVP = i;
if (_vp[_activeVP] == undefined) {
createVideoPlayer(_activeVP);
_vp[_activeVP].visible = false;
_vp[_activeVP].volume = 0;
}
//return(activeVideoPlayerIndex);
}
function get autoPlay() {
if (_vpState[_activeVP] == undefined) {
return(_autoPlay);
}
return(_vpState[_activeVP].autoPlay);
}
function set autoPlay(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_autoPlay = flag;
}
_vpState[_activeVP].autoPlay = flag;
//return(autoPlay);
}
function get autoRewind() {
if (_vp[_activeVP] == undefined) {
return(_autoRewind);
}
return(_vp[_activeVP].autoRewind);
}
function set autoRewind(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_autoRewind = flag;
}
_vp[_activeVP].autoRewind = flag;
//return(autoRewind);
}
function get autoSize() {
if (_vp[_activeVP] == undefined) {
return(_autoSize);
}
return(_vp[_activeVP].autoSize);
}
function set autoSize(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_autoSize = flag;
}
_vp[_activeVP].autoSize = flag;
//return(autoSize);
}
function get bitrate() {
return(ncMgr.getBitrate());
}
function set bitrate(b) {
ncMgr.setBitrate(b);
//return(bitrate);
}
function get buffering() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == BUFFERING);
}
function get bufferingBar() {
if (_uiMgr != null) {
_bufferingBar = _uiMgr.getControl(mx.video.UIManager.BUFFERING_BAR);
}
return(_bufferingBar);
}
function set bufferingBar(s) {
_bufferingBar = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, s);
}
//return(bufferingBar);
}
function get bufferingBarHidesAndDisablesOthers() {
if (_uiMgr != null) {
_bufferingBarHides = _uiMgr.bufferingBarHidesAndDisablesOthers;
}
return(_bufferingBarHides);
}
function set bufferingBarHidesAndDisablesOthers(b) {
_bufferingBarHides = b;
if (_uiMgr != null) {
_uiMgr.__set__bufferingBarHidesAndDisablesOthers(b);
}
//return(bufferingBarHidesAndDisablesOthers);
}
function get backButton() {
if (_uiMgr != null) {
_backButton = _uiMgr.getControl(mx.video.UIManager.BACK_BUTTON);
}
return(_backButton);
}
function set backButton(s) {
_backButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, s);
}
//return(backButton);
}
function get bufferTime() {
if (_vp[_activeVP] == undefined) {
return(_bufferTime);
}
return(_vp[_activeVP].bufferTime);
}
function set bufferTime(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_bufferTime = aTime;
}
_vp[_activeVP].bufferTime = aTime;
//return(bufferTime);
}
function get bytesLoaded() {
return(_vp[_activeVP].bytesLoaded);
}
function get bytesTotal() {
return(_vp[_activeVP].bytesTotal);
}
function get contentPath() {
if ((_vp[_activeVP] == undefined) || (_vp[_activeVP].onEnterFrame != undefined)) {
return(_contentPath);
}
return(_vp[_activeVP].url);
}
function set contentPath(url) {
if (_global.isLivePreview) {
return;
}
if (_vp[_activeVP] == undefined) {
if (url == _contentPath) {
return;
}
_contentPath = url;
} else {
if (_vp[_activeVP].url == url) {
return;
}
_vpState[_activeVP].minProgressPercent = undefined;
if (_vp[_activeVP].onEnterFrame != undefined) {
delete _vp[_activeVP].onEnterFrame;
_vp[_activeVP].onEnterFrame = undefined;
}
_cpMgr[_activeVP].reset();
if (_vpState[_activeVP].autoPlay && (_firstStreamShown)) {
_vp[_activeVP].play(url, _vpState[_activeVP].isLive, _vpState[_activeVP].totalTime);
} else {
_vp[_activeVP].load(url, _vpState[_activeVP].isLive, _vpState[_activeVP].totalTime);
}
_vpState[_activeVP].isLiveSet = false;
_vpState[_activeVP].totalTimeSet = false;
}
//return(contentPath);
}
function set cuePoints(cp) {
if (_cuePoints != undefined) {
return;
}
_cuePoints = cp;
//return(__get__cuePoints());
}
function get forwardButton() {
if (_uiMgr != null) {
_forwardButton = _uiMgr.getControl(mx.video.UIManager.FORWARD_BUTTON);
}
return(_forwardButton);
}
function set forwardButton(s) {
_forwardButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, s);
}
//return(forwardButton);
}
function get height() {
if (_global.isLivePreview) {
return(__height);
}
if (_vp[_visibleVP] != undefined) {
__height = _vp[_visibleVP].height;
}
return(__height);
}
function set height(h) {
setSize(width, h);
//return(height);
}
function get idleTimeout() {
if (_vp[_activeVP] == undefined) {
return(_idleTimeout);
}
return(_vp[_activeVP].idleTimeout);
}
function set idleTimeout(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_idleTimeout = aTime;
}
_vp[_activeVP].idleTimeout = aTime;
//return(idleTimeout);
}
function get isRTMP() {
if (_global.isLivePreview) {
return(true);
}
if (_vp[_activeVP] == undefined) {
return(undefined);
}
return(_vp[_activeVP].isRTMP);
}
function get isLive() {
if (_vp[_activeVP] == undefined) {
return(_isLive);
}
if (_vpState[_activeVP].isLiveSet) {
return(_vpState[_activeVP].isLive);
}
return(_vp[_activeVP].isLive);
}
function set isLive(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_isLive = flag;
}
_vpState[_activeVP].isLive = flag;
_vpState[_activeVP].isLiveSet = true;
//return(isLive);
}
function get maintainAspectRatio() {
if (_vp[_activeVP] == undefined) {
return(_aspectRatio);
}
return(_vp[_activeVP].maintainAspectRatio);
}
function set maintainAspectRatio(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_aspectRatio = flag;
}
_vp[_activeVP].maintainAspectRatio = flag;
//return(maintainAspectRatio);
}
function get metadata() {
if (_vp[_activeVP] == undefined) {
return(null);
}
return(_vp[_activeVP].metadata);
}
function get metadataLoaded() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_cpMgr[_activeVP].metadataLoaded);
}
function get muteButton() {
if (_uiMgr != null) {
_muteButton = _uiMgr.getControl(mx.video.UIManager.MUTE_BUTTON);
}
return(_muteButton);
}
function set muteButton(s) {
_muteButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, s);
}
//return(muteButton);
}
function get ncMgr() {
if (_vp[_activeVP] == undefined) {
return(null);
}
return(_vp[_activeVP].ncMgr);
}
function get pauseButton() {
if (_uiMgr != null) {
_pauseButton = _uiMgr.getControl(mx.video.UIManager.PAUSE_BUTTON);
}
return(_pauseButton);
}
function set pauseButton(s) {
_pauseButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, s);
}
//return(pauseButton);
}
function get paused() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == PAUSED);
}
function get playButton() {
if (_uiMgr != null) {
_playButton = _uiMgr.getControl(mx.video.UIManager.PLAY_BUTTON);
}
return(_playButton);
}
function set playButton(s) {
_playButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, s);
}
//return(playButton);
}
function get playheadTime() {
if (_vp[_activeVP] == undefined) {
return(0);
}
return(_vp[_activeVP].playheadTime);
}
function set playheadTime(position) {
seek(position);
//return(playheadTime);
}
function get playheadUpdateInterval() {
if (_vp[_activeVP] == undefined) {
return(_playheadUpdateInterval);
}
return(_vp[_activeVP].playheadUpdateInterval);
}
function set playheadUpdateInterval(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_playheadUpdateInterval = aTime;
}
_cpMgr[_activeVP].playheadUpdateInterval = aTime;
_vp[_activeVP].playheadUpdateInterval = aTime;
//return(playheadUpdateInterval);
}
function get playing() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == PLAYING);
}
function get playPauseButton() {
if (_uiMgr != null) {
_playPauseButton = _uiMgr.getControl(mx.video.UIManager.PLAY_PAUSE_BUTTON);
}
return(_playPauseButton);
}
function set playPauseButton(s) {
_playPauseButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, s);
}
//return(playPauseButton);
}
function get preferredHeight() {
if (_vp[_activeVP] == undefined) {
return(0);
}
return(_vp[_activeVP].videoHeight);
}
function get preferredWidth() {
if (_vp[_activeVP] == undefined) {
return(0);
}
return(_vp[_activeVP].videoWidth);
}
function get progressInterval() {
if (_vp[_activeVP] == undefined) {
return(_progressInterval);
}
return(_vp[_activeVP].progressInterval);
}
function set progressInterval(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_progressInterval = aTime;
}
_vp[_activeVP].progressInterval = aTime;
//return(progressInterval);
}
function get scaleX() {
if (_vp[_visibleVP] != undefined) {
_scaleX = (_vp[_visibleVP].width / _origWidth) * 100;
}
return(_scaleX);
}
function set scaleX(xs) {
setScale(xs, scaleY);
//return(scaleX);
}
function get scaleY() {
if (_vp[_visibleVP] != undefined) {
_scaleY = (_vp[_visibleVP].height / _origHeight) * 100;
}
return(_scaleY);
}
function set scaleY(ys) {
setScale(scaleX, ys);
//return(scaleY);
}
function get scrubbing() {
var _local2 = seekBar;
if ((_local2 == undefined) || (_local2.isDragging == undefined)) {
return(false);
}
return(_local2.isDragging);
}
function get seekBar() {
if (_uiMgr != null) {
_seekBar = _uiMgr.getControl(mx.video.UIManager.SEEK_BAR);
}
return(_seekBar);
}
function set seekBar(s) {
_seekBar = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.SEEK_BAR, s);
}
//return(seekBar);
}
function get seekBarInterval() {
if (_uiMgr != null) {
_seekBarInterval = _uiMgr.seekBarInterval;
}
return(_seekBarInterval);
}
function set seekBarInterval(s) {
_seekBarInterval = s;
if (_uiMgr != null) {
_uiMgr.__set__seekBarInterval(_seekBarInterval);
}
//return(seekBarInterval);
}
function get seekBarScrubTolerance() {
if (_uiMgr != null) {
_seekBarScrubTolerance = _uiMgr.seekBarScrubTolerance;
}
return(_seekBarScrubTolerance);
}
function set seekBarScrubTolerance(s) {
_seekBarScrubTolerance = s;
if (_uiMgr != null) {
_uiMgr.__set__seekBarScrubTolerance(_seekBarScrubTolerance);
}
//return(seekBarScrubTolerance);
}
function get seekToPrevOffset() {
return(_seekToPrevOffset);
}
function set seekToPrevOffset(s) {
_seekToPrevOffset = s;
//return(seekToPrevOffset);
}
function get skin() {
if (_uiMgr != null) {
_skin = _uiMgr.skin;
}
return(_skin);
}
function set skin(s) {
_skin = s;
if (_uiMgr != null) {
_uiMgr.__set__skin(s);
}
//return(skin);
}
function get skinAutoHide() {
if (_uiMgr != null) {
_skinAutoHide = _uiMgr.skinAutoHide;
}
return(_skinAutoHide);
}
function set skinAutoHide(b) {
if (_global.isLivePreview) {
return;
}
_skinAutoHide = b;
if (_uiMgr != null) {
_uiMgr.__set__skinAutoHide(b);
}
//return(skinAutoHide);
}
function get transform() {
return(_transform);
}
function set transform(s) {
_transform = s;
if (_vp[_activeVP] != undefined) {
_vp[_activeVP].transform = _transform;
}
//return(transform);
}
function get state() {
if (_global.isLivePreview) {
return(STOPPED);
}
if (_vp[_activeVP] == undefined) {
return(DISCONNECTED);
}
if ((_activeVP == _visibleVP) && (scrubbing)) {
return(SEEKING);
}
var _local3 = _vp[_activeVP].state;
if (_local3 == mx.video.VideoPlayer.RESIZING) {
return(LOADING);
}
if (((_vpState[_activeVP].prevState == LOADING) && (_vpState[_activeVP].autoPlay)) && (_local3 == STOPPED)) {
return(LOADING);
}
return(_local3);
}
function get stateResponsive() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].stateResponsive);
}
function get stopButton() {
if (_uiMgr != null) {
_stopButton = _uiMgr.getControl(mx.video.UIManager.STOP_BUTTON);
}
return(_stopButton);
}
function set stopButton(s) {
_stopButton = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, s);
}
//return(stopButton);
}
function get stopped() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == STOPPED);
}
function get totalTime() {
if (_global.isLivePreview) {
return(1);
}
if (_vp[_activeVP] == undefined) {
return(_totalTime);
}
if (_vpState[_activeVP].totalTimeSet) {
return(_vpState[_activeVP].totalTime);
}
return(_vp[_activeVP].totalTime);
}
function set totalTime(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_totalTime = aTime;
}
_vpState[_activeVP].totalTime = aTime;
_vpState[_activeVP].totalTimeSet = true;
//return(totalTime);
}
function get version_1_0_2() {
return("");
}
function set version_1_0_2(v) {
//return(version_1_0_2);
}
function get visible() {
return(_visible);
}
function set visible(v) {
_visible = v;
//return(visible);
}
function get visibleVideoPlayerIndex() {
return(_visibleVP);
}
function set visibleVideoPlayerIndex(i) {
if (_visibleVP == i) {
return;
}
var _local3 = _visibleVP;
if (_vp[i] == undefined) {
createVideoPlayer(i);
}
var _local5 = (_vp[i].height != _vp[_visibleVP].height) || (_vp[i].width != _vp[_visibleVP].width);
_vp[_visibleVP].visible = false;
_vp[_visibleVP].volume = 0;
_visibleVP = i;
if (_firstStreamShown) {
_uiMgr.setupSkinAutoHide();
_vp[_visibleVP].visible = true;
if (!scrubbing) {
_vp[_visibleVP].volume = _volume;
}
} else if ((_vp[_visibleVP].stateResponsive && (_vp[_visibleVP].state != DISCONNECTED)) && (_uiMgr.__get__skinReady())) {
_uiMgr.__set__visible(true);
_uiMgr.setupSkinAutoHide();
_firstStreamReady = true;
showFirstStream();
}
if ((_vp[_local3].height != _vp[_visibleVP].height) || (_vp[_local3].width != _vp[_visibleVP].width)) {
dispatchEvent({type:"resize", x:x, y:y, width:width, height:height, auto:false, vp:_visibleVP});
}
_uiMgr.handleEvent({type:"stateChange", state:_vp[_visibleVP].state, vp:_visibleVP});
_uiMgr.handleEvent({type:"playheadUpdate", playheadTime:_vp[_visibleVP].playheadTime, vp:_visibleVP});
if (_vp[_visibleVP].isRTMP) {
_uiMgr.handleEvent({type:"ready", vp:_visibleVP});
} else {
_uiMgr.handleEvent({type:"progress", bytesLoaded:_vp[_visibleVP].bytesLoaded, bytesTotal:_vp[_visibleVP].bytesTotal, vp:_visibleVP});
}
//return(visibleVideoPlayerIndex);
}
function get volume() {
return(_volume);
}
function set volume(aVol) {
if (_volume == aVol) {
return;
}
_volume = aVol;
if (!scrubbing) {
_vp[_visibleVP].volume = _volume;
}
dispatchEvent({type:"volumeUpdate", volume:aVol});
//return(volume);
}
function get volumeBar() {
if (_uiMgr != null) {
_volumeBar = _uiMgr.getControl(mx.video.UIManager.VOLUME_BAR);
}
return(_volumeBar);
}
function set volumeBar(s) {
_volumeBar = s;
if (_uiMgr != null) {
_uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, s);
}
//return(volumeBar);
}
function get volumeBarInterval() {
if (_uiMgr != null) {
_volumeBarInterval = _uiMgr.volumeBarInterval;
}
return(_volumeBarInterval);
}
function set volumeBarInterval(s) {
_volumeBarInterval = s;
if (_uiMgr != null) {
_uiMgr.__set__volumeBarInterval(_volumeBarInterval);
}
//return(volumeBarInterval);
}
function get volumeBarScrubTolerance() {
if (_uiMgr != null) {
_volumeBarScrubTolerance = _uiMgr.volumeBarScrubTolerance;
}
return(_volumeBarScrubTolerance);
}
function set volumeBarScrubTolerance(s) {
_volumeBarScrubTolerance = s;
if (_uiMgr != null) {
_uiMgr.__set__volumeBarScrubTolerance(_volumeBarScrubTolerance);
}
//return(volumeBarScrubTolerance);
}
function get width() {
if (_global.isLivePreview) {
return(__width);
}
if (_vp[_visibleVP] != undefined) {
__width = _vp[_visibleVP].width;
}
return(__width);
}
function set width(w) {
setSize(w, height);
//return(width);
}
function get x() {
return(_x);
}
function set x(xpos) {
_x = xpos;
//return(x);
}
function get y() {
return(_y);
}
function set y(ypos) {
_y = ypos;
//return(y);
}
function createVideoPlayer(index) {
if (_global.isLivePreview) {
return(undefined);
}
var _local4 = width;
var _local5 = height;
_vp[index] = mx.video.VideoPlayer(attachMovie("VideoPlayer", String(index), VP_DEPTH_OFFSET + index));
_vp[index].setSize(_local4, _local5);
_topVP = index;
_vp[index].autoRewind = _autoRewind;
_vp[index].autoSize = _autoSize;
_vp[index].bufferTime = _bufferTime;
_vp[index].idleTimeout = _idleTimeout;
_vp[index].maintainAspectRatio = _aspectRatio;
_vp[index].playheadUpdateInterval = _playheadUpdateInterval;
_vp[index].progressInterval = _progressInterval;
_vp[index].transform = _transform;
_vp[index].volume = _volume;
if (index == 0) {
_vpState[index] = {id:index, isLive:_isLive, isLiveSet:true, totalTime:_totalTime, totalTimeSet:true, autoPlay:_autoPlay};
if (((_contentPath != null) && (_contentPath != undefined)) && (_contentPath != "")) {
_vp[index].onEnterFrame = mx.utils.Delegate.create(this, doContentPathConnect);
}
} else {
_vpState[index] = {id:index, isLive:false, isLiveSet:true, totalTime:0, totalTimeSet:true, autoPlay:false};
}
_vp[index].addEventListener("resize", this);
_vp[index].addEventListener("close", this);
_vp[index].addEventListener("complete", this);
_vp[index].addEventListener("cuePoint", this);
_vp[index].addEventListener("playheadUpdate", this);
_vp[index].addEventListener("progress", this);
_vp[index].addEventListener("metadataReceived", this);
_vp[index].addEventListener("stateChange", this);
_vp[index].addEventListener("ready", this);
_vp[index].addEventListener("rewind", this);
_cpMgr[index] = new mx.video.CuePointManager(this, index);
_cpMgr[index].playheadUpdateInterval = _playheadUpdateInterval;
}
function createUIManager() {
_uiMgr = new mx.video.UIManager(this);
_uiMgr.__set__visible(false);
if (_backButton != null) {
_uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, _backButton);
}
if (_bufferingBar != null) {
_uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, _bufferingBar);
}
_uiMgr.__set__bufferingBarHidesAndDisablesOthers(_bufferingBarHides);
if (_forwardButton != null) {
_uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, _forwardButton);
}
if (_pauseButton != null) {
_uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, _pauseButton);
}
if (_playButton != null) {
_uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, _playButton);
}
if (_playPauseButton != null) {
_uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, _playPauseButton);
}
if (_stopButton != null) {
_uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, _stopButton);
}
if (_seekBar != null) {
_uiMgr.setControl(mx.video.UIManager.SEEK_BAR, _seekBar);
}
if (_seekBarInterval != null) {
_uiMgr.__set__seekBarInterval(_seekBarInterval);
}
if (_seekBarScrubTolerance != null) {
_uiMgr.__set__seekBarScrubTolerance(_seekBarScrubTolerance);
}
if (_skin != null) {
_uiMgr.__set__skin(_skin);
}
if (_skinAutoHide != null) {
_uiMgr.__set__skinAutoHide(_skinAutoHide);
}
if (_muteButton != null) {
_uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, _muteButton);
}
if (_volumeBar != null) {
_uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, _volumeBar);
}
if (_volumeBarInterval != null) {
_uiMgr.__set__volumeBarInterval(_volumeBarInterval);
}
if (_volumeBarScrubTolerance != null) {
_uiMgr.__set__volumeBarScrubTolerance(_volumeBarScrubTolerance);
}
}
function createLivePreviewMovieClip() {
preview_mc = createEmptyMovieClip("preview_mc", 10);
preview_mc.createEmptyMovieClip("box_mc", 10);
preview_mc.box_mc.beginFill(0);
preview_mc.box_mc.moveTo(0, 0);
preview_mc.box_mc.lineTo(0, 100);
preview_mc.box_mc.lineTo(100, 100);
preview_mc.box_mc.lineTo(100, 0);
preview_mc.box_mc.lineTo(0, 0);
preview_mc.box_mc.endFill();
preview_mc.attachMovie("Icon", "icon_mc", 20);
}
function doContentPathConnect() {
delete _vp[0].onEnterFrame;
_vp[0].onEnterFrame = undefined;
if (_global.isLivePreview) {
return(undefined);
}
if (_vpState[0].autoPlay && (_firstStreamShown)) {
_vp[0].play(_contentPath, _isLive, _totalTime);
} else {
_vp[0].load(_contentPath, _isLive, _totalTime);
}
_vpState[0].isLiveSet = false;
_vpState[0].totalTimeSet = false;
}
function showFirstStream() {
_firstStreamShown = true;
_vp[_visibleVP].visible = true;
if (!scrubbing) {
_vp[_visibleVP].volume = _volume;
}
var _local2 = 0;
while (_local2 < _vp.length) {
if (((_vp[_local2] != undefined) && (_vp[_local2].state == STOPPED)) && (_vpState[_local2].autoPlay)) {
_vp[_local2].play();
}
_local2++;
}
}
function _scrubStart() {
var _local2 = playheadTime;
_vp[_visibleVP].volume = 0;
dispatchEvent({type:"stateChange", state:SEEKING, playheadTime:_local2, vp:_visibleVP});
dispatchEvent({type:"scrubStart", state:SEEKING, playheadTime:_local2});
}
function _scrubFinish() {
var _local3 = playheadTime;
var _local2 = state;
_vp[_visibleVP].volume = _volume;
if (_local2 != SEEKING) {
dispatchEvent({type:"stateChange", state:_local2, playheadTime:_local3, vp:_visibleVP});
}
dispatchEvent({type:"scrubFinish", state:_local2, playheadTime:_local3});
}
function skinError(message) {
if (_firstStreamReady && (!_firstStreamShown)) {
showFirstStream();
}
dispatchEvent({type:"skinError", message:message});
}
function skinLoaded() {
if (_firstStreamReady) {
_uiMgr.__set__visible(true);
if (!_firstStreamShown) {
showFirstStream();
}
} else if ((_contentPath == null) || (_contentPath == "")) {
_uiMgr.__set__visible(true);
}
dispatchEvent({type:"skinLoaded"});
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
static var DISCONNECTED = "disconnected";
static var STOPPED = "stopped";
static var PLAYING = "playing";
static var PAUSED = "paused";
static var BUFFERING = "buffering";
static var LOADING = "loading";
static var CONNECTION_ERROR = "connectionError";
static var REWINDING = "rewinding";
static var SEEKING = "seeking";
static var ALL = "all";
static var EVENT = "event";
static var NAVIGATION = "navigation";
static var FLV = "flv";
static var ACTIONSCRIPT = "actionscript";
static var VP_DEPTH_OFFSET = 100;
static var SEEK_TO_PREV_OFFSET_DEFAULT = 1;
}
Symbol 1634 MovieClip [__Packages.mx.video.UIManager] Frame 0
class mx.video.UIManager
{
var _vc, _skin, _skinAutoHide, _skinReady, __visible, _bufferingBarHides, _controlsEnabled, _lastScrubPos, _lastVolumePos, cachedSoundLevel, _isMuted, controls, customClips, skin_mc, skinLoader, layout_mc, border_mc, _seekBarIntervalID, _seekBarInterval, _seekBarScrubTolerance, _volumeBarIntervalID, _volumeBarInterval, _volumeBarScrubTolerance, _bufferingDelayIntervalID, _bufferingDelayInterval, _bufferingOn, _skinAutoHideIntervalID, _progressPercent, placeholderLeft, placeholderRight, placeholderTop, placeholderBottom, videoLeft, videoRight, videoTop, videoBottom, _playAfterScrub;
function UIManager (vc) {
_vc = vc;
_skin = undefined;
_skinAutoHide = false;
_skinReady = true;
__visible = true;
_bufferingBarHides = false;
_controlsEnabled = true;
_lastScrubPos = 0;
_lastVolumePos = 0;
cachedSoundLevel = _vc.volume;
_isMuted = false;
controls = new Array();
customClips = undefined;
skin_mc = undefined;
skinLoader = undefined;
layout_mc = undefined;
border_mc = undefined;
_seekBarIntervalID = 0;
_seekBarInterval = SEEK_BAR_INTERVAL_DEFAULT;
_seekBarScrubTolerance = SEEK_BAR_SCRUB_TOLERANCE_DEFAULT;
_volumeBarIntervalID = 0;
_volumeBarInterval = VOLUME_BAR_INTERVAL_DEFAULT;
_volumeBarScrubTolerance = VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT;
_bufferingDelayIntervalID = 0;
_bufferingDelayInterval = BUFFERING_DELAY_INTERVAL_DEFAULT;
_bufferingOn = false;
_skinAutoHideIntervalID = 0;
_vc.addEventListener("metadataReceived", this);
_vc.addEventListener("playheadUpdate", this);
_vc.addEventListener("progress", this);
_vc.addEventListener("stateChange", this);
_vc.addEventListener("ready", this);
_vc.addEventListener("resize", this);
_vc.addEventListener("volumeUpdate", this);
}
function handleEvent(e) {
if ((e.vp != undefined) && (e.vp != _vc.__get__visibleVideoPlayerIndex())) {
return(undefined);
}
var _local9 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
if (e.type == "stateChange") {
if (e.state == mx.video.FLVPlayback.BUFFERING) {
if (!_bufferingOn) {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = setInterval(this, "doBufferingDelay", _bufferingDelayInterval);
}
} else {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = 0;
_bufferingOn = false;
}
if (e.state == mx.video.FLVPlayback.LOADING) {
_progressPercent = (_vc.getVideoPlayer(e.vp).__get__isRTMP() ? 100 : 0);
var _local2 = SEEK_BAR;
while (_local2 <= VOLUME_BAR) {
var _local4 = controls[_local2];
if (_local4.progress_mc != undefined) {
positionBar(_local4, "progress", _progressPercent);
}
_local2++;
}
}
var _local2 = 0;
while (_local2 < NUM_CONTROLS) {
if (controls[_local2] == undefined) {
} else {
setEnabledAndVisibleForState(_local2, e.state);
if (_local2 < NUM_BUTTONS) {
skinButtonControl(controls[_local2]);
}
}
_local2++;
}
} else if ((e.type == "ready") || (e.type == "metadataReceived")) {
var _local2 = 0;
while (_local2 < NUM_CONTROLS) {
if (controls[_local2] == undefined) {
} else {
setEnabledAndVisibleForState(_local2, _vc.__get__state());
if (_local2 < NUM_BUTTONS) {
skinButtonControl(controls[_local2]);
}
}
_local2++;
}
if (_vc.getVideoPlayer(e.vp).__get__isRTMP()) {
_progressPercent = 100;
_local2 = SEEK_BAR;
while (_local2 <= VOLUME_BAR) {
var _local4 = controls[_local2];
if (_local4.progress_mc != undefined) {
positionBar(_local4, "progress", _progressPercent);
}
_local2++;
}
}
} else if (e.type == "resize") {
layoutSkin();
setupSkinAutoHide();
} else if (e.type == "volumeUpdate") {
if (_isMuted && (e.volume > 0)) {
_isMuted = false;
setEnabledAndVisibleForState(MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_OFF_BUTTON]);
setEnabledAndVisibleForState(MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_ON_BUTTON]);
}
var _local5 = controls[VOLUME_BAR];
_local5.percentage = (_isMuted ? (cachedSoundLevel) : (e.volume));
if (_local5.percentage < 0) {
_local5.percentage = 0;
} else if (_local5.percentage > 100) {
_local5.percentage = 100;
}
positionHandle(VOLUME_BAR);
} else if ((e.type == "playheadUpdate") && (controls[SEEK_BAR] != undefined)) {
if ((!_vc.__get__isLive()) && (_vc.__get__totalTime() > 0)) {
var _local6 = (e.playheadTime / _vc.__get__totalTime()) * 100;
if (_local6 < 0) {
_local6 = 0;
} else if (_local6 > 100) {
_local6 = 100;
}
var _local10 = controls[SEEK_BAR];
_local10.percentage = _local6;
positionHandle(SEEK_BAR);
}
} else if (e.type == "progress") {
_progressPercent = ((e.bytesTotal <= 0) ? 100 : ((e.bytesLoaded / e.bytesTotal) * 100));
var _local7 = _vc._vpState[e.vp].minProgressPercent;
if ((!isNaN(_local7)) && (_local7 > _progressPercent)) {
_progressPercent = _local7;
}
if (_vc.__get__totalTime() > 0) {
var _local8 = (_vc.__get__playheadTime() / _vc.__get__totalTime()) * 100;
if (_local8 > _progressPercent) {
_progressPercent = _local8;
_vc._vpState[e.vp].minProgressPercent = _progressPercent;
}
}
var _local2 = SEEK_BAR;
while (_local2 <= VOLUME_BAR) {
var _local4 = controls[_local2];
if (_local4.progress_mc != undefined) {
positionBar(_local4, "progress", _progressPercent);
}
_local2++;
}
}
_vc.__set__activeVideoPlayerIndex(_local9);
}
function get bufferingBarHidesAndDisablesOthers() {
return(_bufferingBarHides);
}
function set bufferingBarHidesAndDisablesOthers(b) {
_bufferingBarHides = b;
//return(bufferingBarHidesAndDisablesOthers);
}
function get controlsEnabled() {
return(_controlsEnabled);
}
function set controlsEnabled(flag) {
if (_controlsEnabled == flag) {
return;
}
_controlsEnabled = flag;
var _local2 = 0;
while (_local2 < NUM_BUTTONS) {
if (controls[_local2] == undefined) {
} else {
controls[_local2].releaseCapture();
controls[_local2].enabled = _controlsEnabled && (controls[_local2].myEnabled);
skinButtonControl(controls[_local2]);
}
_local2++;
}
//return(controlsEnabled);
}
function get skin() {
return(_skin);
}
function set skin(s) {
if (s == _skin) {
return;
}
if (_skin != undefined) {
removeSkin();
}
_skin = s;
_skinReady = (_skin == null) || (_skin == "");
if (!_skinReady) {
downloadSkin();
}
//return(skin);
}
function get skinAutoHide() {
return(_skinAutoHide);
}
function set skinAutoHide(b) {
if (b == _skinAutoHide) {
return;
}
_skinAutoHide = b;
setupSkinAutoHide();
//return(skinAutoHide);
}
function get skinReady() {
return(_skinReady);
}
function get seekBarInterval() {
return(_seekBarInterval);
}
function set seekBarInterval(s) {
if (_seekBarInterval == s) {
return;
}
_seekBarInterval = s;
if (_seekBarIntervalID > 0) {
clearInterval(_seekBarIntervalID);
_seekBarIntervalID = setInterval(this, "seekBarListener", _seekBarInterval, false);
}
//return(seekBarInterval);
}
function get volumeBarInterval() {
return(_volumeBarInterval);
}
function set volumeBarInterval(s) {
if (_volumeBarInterval == s) {
return;
}
_volumeBarInterval = s;
if (_volumeBarIntervalID > 0) {
clearInterval(_volumeBarIntervalID);
_volumeBarIntervalID = setInterval(this, "volumeBarListener", _volumeBarInterval, false);
}
//return(volumeBarInterval);
}
function get bufferingDelayInterval() {
return(_bufferingDelayInterval);
}
function set bufferingDelayInterval(s) {
if (_bufferingDelayInterval == s) {
return;
}
_bufferingDelayInterval = s;
if (_bufferingDelayIntervalID > 0) {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = setInterval(this, "doBufferingDelay", _bufferingDelayIntervalID);
}
//return(bufferingDelayInterval);
}
function get volumeBarScrubTolerance() {
return(_volumeBarScrubTolerance);
}
function set volumeBarScrubTolerance(s) {
_volumeBarScrubTolerance = s;
//return(volumeBarScrubTolerance);
}
function get seekBarScrubTolerance() {
return(_seekBarScrubTolerance);
}
function set seekBarScrubTolerance(s) {
_seekBarScrubTolerance = s;
//return(seekBarScrubTolerance);
}
function get visible() {
return(__visible);
}
function set visible(v) {
if (__visible == v) {
return;
}
__visible = v;
if (!__visible) {
skin_mc._visible = false;
} else {
setupSkinAutoHide();
}
//return(visible);
}
function getControl(index) {
return(controls[index]);
}
function setControl(index, s) {
if (s == null) {
s = undefined;
}
if (s == controls[index]) {
return(undefined);
}
switch (index) {
case PAUSE_BUTTON :
case PLAY_BUTTON :
resetPlayPause();
break;
case PLAY_PAUSE_BUTTON :
if (s._parent != layout_mc) {
resetPlayPause();
setControl(PAUSE_BUTTON, s.pause_mc);
setControl(PLAY_BUTTON, s.play_mc);
}
break;
case MUTE_BUTTON :
if (s._parent == layout_mc) {
break;
}
setControl(MUTE_ON_BUTTON, s.on_mc);
setControl(MUTE_OFF_BUTTON, s.off_mc);
}
if (index >= NUM_BUTTONS) {
controls[index] = s;
switch (index) {
case SEEK_BAR :
addBarControl(SEEK_BAR);
break;
case VOLUME_BAR :
addBarControl(VOLUME_BAR);
controls[VOLUME_BAR].percentage = _vc.volume;
break;
case BUFFERING_BAR :
controls[BUFFERING_BAR].uiMgr = this;
controls[BUFFERING_BAR].controlIndex = BUFFERING_BAR;
if (controls[BUFFERING_BAR]._parent == skin_mc) {
finishAddBufferingBar();
} else {
controls[BUFFERING_BAR].onEnterFrame = function () {
this.uiMgr.finishAddBufferingBar();
};
}
}
setEnabledAndVisibleForState(index, _vc.__get__state());
} else {
removeButtonControl(index);
controls[index] = s;
addButtonControl(index);
}
}
function resetPlayPause() {
if (controls[PLAY_PAUSE_BUTTON] == undefined) {
return(undefined);
}
var _local2 = PAUSE_BUTTON;
while (_local2 <= PLAY_BUTTON) {
removeButtonControl(_local2);
_local2++;
}
controls[PLAY_PAUSE_BUTTON] = undefined;
}
function addButtonControl(index) {
var _local3 = controls[index];
if (_local3 == undefined) {
return(undefined);
}
var _local5 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
_local3.id = index;
_local3.state = UP_STATE;
_local3.uiMgr = this;
setEnabledAndVisibleForState(index, _vc.__get__state());
_local3.onRollOver = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.skinButtonControl(this);
};
_local3.onRollOut = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.skinButtonControl(this);
};
if ((index == SEEK_BAR_HANDLE) || (index == VOLUME_BAR_HANDLE)) {
_local3.onPress = function () {
if (_root.focusManager) {
this._focusrect = false;
Selection.setFocus(this);
}
this.state = mx.video.UIManager.DOWN_STATE;
this.uiMgr.dispatchMessage(this);
this.uiMgr.skinButtonControl(this);
};
_local3.onRelease = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.handleRelease(this.controlIndex);
this.uiMgr.skinButtonControl(this);
};
_local3.onReleaseOutside = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.handleRelease(this.controlIndex);
this.uiMgr.skinButtonControl(this);
};
} else {
_local3.onPress = function () {
if (_root.focusManager) {
this._focusrect = false;
Selection.setFocus(this);
}
this.state = mx.video.UIManager.DOWN_STATE;
this.uiMgr.skinButtonControl(this);
};
_local3.onRelease = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.dispatchMessage(this);
this.uiMgr.skinButtonControl(this);
};
_local3.onReleaseOutside = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.skinButtonControl(this);
};
}
if (_local3._parent == skin_mc) {
skinButtonControl(_local3);
} else {
_local3.onEnterFrame = function () {
this.uiMgr.skinButtonControl(this);
};
}
_vc.__set__activeVideoPlayerIndex(_local5);
}
function removeButtonControl(index) {
if (controls[index] == undefined) {
return(undefined);
}
controls[index].uiMgr = undefined;
controls[index].onRollOver = undefined;
controls[index].onRollOut = undefined;
controls[index].onPress = undefined;
controls[index].onRelease = undefined;
controls[index].onReleaseOutside = undefined;
controls[index] = undefined;
}
function downloadSkin() {
if (skinLoader == undefined) {
skinLoader = new MovieClipLoader();
skinLoader.addListener(this);
}
if (skin_mc == undefined) {
skin_mc = _vc.createEmptyMovieClip("skin_mc", _vc.getNextHighestDepth());
}
skin_mc._visible = false;
skin_mc._x = Stage.width + 100;
skin_mc._y = Stage.height + 100;
skinLoader.loadClip(_skin, skin_mc);
}
function onLoadError(target_mc, errorCode) {
_skinReady = true;
_vc.skinError("Unable to load skin swf");
}
function onLoadInit() {
try {
skin_mc._visible = false;
skin_mc._x = 0;
skin_mc._y = 0;
layout_mc = skin_mc.layout_mc;
if (layout_mc == undefined) {
throw new Error("No layout_mc");
}
layout_mc._visible = false;
customClips = new Array();
setCustomClips("bg");
if (layout_mc.playpause_mc != undefined) {
setSkin(PLAY_PAUSE_BUTTON, layout_mc.playpause_mc);
} else {
setSkin(PAUSE_BUTTON, layout_mc.pause_mc);
setSkin(PLAY_BUTTON, layout_mc.play_mc);
}
setSkin(STOP_BUTTON, layout_mc.stop_mc);
setSkin(BACK_BUTTON, layout_mc.back_mc);
setSkin(FORWARD_BUTTON, layout_mc.forward_mc);
setSkin(MUTE_BUTTON, layout_mc.volumeMute_mc);
setSkin(SEEK_BAR, layout_mc.seekBar_mc);
setSkin(VOLUME_BAR, layout_mc.volumeBar_mc);
setSkin(BUFFERING_BAR, layout_mc.bufferingBar_mc);
setCustomClips("fg");
layoutSkin();
setupSkinAutoHide();
skin_mc._visible = __visible;
_skinReady = true;
_vc.skinLoaded();
var _local4 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
var _local3 = _vc.__get__state();
var _local2 = 0;
while (_local2 < NUM_CONTROLS) {
if (controls[_local2] == undefined) {
} else {
setEnabledAndVisibleForState(_local2, _local3);
if (_local2 < NUM_BUTTONS) {
skinButtonControl(controls[_local2]);
}
}
_local2++;
}
_vc.__set__activeVideoPlayerIndex(_local4);
} catch(err:Error) {
_vc.skinError(err.message);
removeSkin();
}
}
function layoutSkin() {
if (layout_mc == undefined) {
return(undefined);
}
var _local3 = layout_mc.video_mc;
if (_local3 == undefined) {
throw new Error("No layout_mc.video_mc");
}
placeholderLeft = _local3._x;
placeholderRight = _local3._x + _local3._width;
placeholderTop = _local3._y;
placeholderBottom = _local3._y + _local3._height;
videoLeft = 0;
videoRight = _vc.width;
videoTop = 0;
videoBottom = _vc.height;
if (((!isNaN(layout_mc.minWidth)) && (layout_mc.minWidth > 0)) && (layout_mc.minWidth > videoRight)) {
videoLeft = videoLeft - ((layout_mc.minWidth - videoRight) / 2);
videoRight = layout_mc.minWidth + videoLeft;
}
if (((!isNaN(layout_mc.minHeight)) && (layout_mc.minHeight > 0)) && (layout_mc.minHeight > videoBottom)) {
videoTop = videoTop - ((layout_mc.minHeight - videoBottom) / 2);
videoBottom = layout_mc.minHeight + videoTop;
}
var _local2;
_local2 = 0;
while (_local2 < customClips.length) {
layoutControl(customClips[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < NUM_CONTROLS) {
layoutControl(controls[_local2]);
_local2++;
}
}
function layoutControl(ctrl) {
if (ctrl == undefined) {
return(undefined);
}
if (ctrl.skin.anchorRight) {
if (ctrl.skin.anchorLeft) {
ctrl._x = (ctrl.skin._x - placeholderLeft) + videoLeft;
ctrl._width = (((ctrl.skin._x + ctrl.skin._width) - placeholderRight) + videoRight) - ctrl._x;
if (ctrl.origWidth != undefined) {
ctrl.origWidth = undefined;
}
} else {
ctrl._x = (ctrl.skin._x - placeholderRight) + videoRight;
}
} else {
ctrl._x = (ctrl.skin._x - placeholderLeft) + videoLeft;
}
if (ctrl.skin.anchorTop) {
if (ctrl.skin.anchorBottom) {
ctrl._y = (ctrl.skin._y - placeholderTop) + videoTop;
ctrl._height = (((ctrl.skin._y + ctrl.skin._height) - placeholderBottom) + videoBottom) - ctrl._y;
if (ctrl.origHeight != undefined) {
ctrl.origHeight = undefined;
}
} else {
ctrl._y = (ctrl.skin._y - placeholderTop) + videoTop;
}
} else {
ctrl._y = (ctrl.skin._y - placeholderBottom) + videoBottom;
}
switch (ctrl.controlIndex) {
case SEEK_BAR :
case VOLUME_BAR :
if (ctrl.progress_mc != undefined) {
if (_progressPercent == undefined) {
_progressPercent = (_vc.__get__isRTMP() ? 100 : 0);
}
positionBar(ctrl, "progress", _progressPercent);
}
positionHandle(ctrl.controlIndex);
break;
case BUFFERING_BAR :
if (ctrl.fill_mc == undefined) {
break;
}
positionMaskedFill(ctrl, ctrl.fill_mc, 100);
}
if (ctrl.layoutSelf != undefined) {
ctrl.layoutSelf();
}
}
function removeSkin() {
if (skin_mc != undefined) {
var _local2 = 0;
while (_local2 < NUM_BUTTONS) {
removeButtonControl(_local2);
_local2++;
}
_local2 = NUM_BUTTONS;
while (_local2 < NUM_CONTROLS) {
controls[_local2] = undefined;
_local2++;
}
skin_mc.unloadMovie();
layout_mc = undefined;
border_mc = undefined;
}
}
function setCustomClips(prefix) {
var _local4 = 1;
while (true) {
var _local2 = layout_mc[(prefix + (_local4++)) + "_mc"];
if (_local2 == undefined) {
break;
}
var _local3 = _local2.mc;
if (_local3 == undefined) {
_local3 = _local2._parent._parent[_local2._name];
}
if (_local3 == undefined) {
throw new Error("Bad clip in skin: " + _local2);
}
_local3.skin = _local2;
customClips.push(_local3);
if ((prefix == "bg") && (_local4 == 2)) {
border_mc = _local3;
}
}
}
function setSkin(index, s) {
if (s == undefined) {
return(undefined);
}
var _local2 = s.mc;
if (_local2 == undefined) {
_local2 = s._parent._parent[s._name];
}
if (_local2 == undefined) {
throw new Error("Bad clip in skin: " + s);
}
_local2.skin = s;
if (index < NUM_BUTTONS) {
setupSkinStates(_local2);
} else {
switch (index) {
case PLAY_PAUSE_BUTTON :
setupSkinStates(_local2.play_mc);
setupSkinStates(_local2.pause_mc);
break;
case MUTE_BUTTON :
setupSkinStates(_local2.on_mc);
setupSkinStates(_local2.off_mc);
break;
case SEEK_BAR :
case VOLUME_BAR :
var _local4 = ((index == SEEK_BAR) ? "seekBar" : "volumeBar");
if (_local2.handle_mc == undefined) {
_local2.handle_mc = _local2.skin.handle_mc;
if (_local2.handle_mc == undefined) {
_local2.handle_mc = _local2.skin._parent._parent[_local4 + "Handle_mc"];
}
}
if (_local2.progress_mc == undefined) {
_local2.progress_mc = _local2.skin.progress_mc;
if (_local2.progress_mc == undefined) {
_local2.progress_mc = _local2.skin._parent._parent[_local4 + "Progress_mc"];
}
}
if (_local2.fullness_mc == undefined) {
_local2.fullness_mc = _local2.skin.fullness_mc;
if (_local2.fullness_mc == undefined) {
_local2.fullness_mc = _local2.skin._parent._parent[_local4 + "Fullness_mc"];
}
}
break;
case BUFFERING_BAR :
if (_local2.fill_mc != undefined) {
break;
}
_local2.fill_mc = _local2.skin.fill_mc;
if (_local2.fill_mc != undefined) {
break;
}
_local2.fill_mc = _local2.skin._parent._parent.bufferingBarFill_mc;
}
}
setControl(index, _local2);
}
function setupSkinStates(ctrl) {
if (ctrl.up_mc == undefined) {
ctrl.up_mc = ctrl;
ctrl.over_mc = ctrl;
ctrl.down_mc = ctrl;
ctrl.disabled_mc = ctrl;
} else {
ctrl._x = 0;
ctrl._y = 0;
ctrl.up_mc._x = 0;
ctrl.up_mc._y = 0;
ctrl.up_mc._visible = true;
if (ctrl.over_mc == undefined) {
ctrl.over_mc = ctrl.up_mc;
} else {
ctrl.over_mc._x = 0;
ctrl.over_mc._y = 0;
ctrl.over_mc._visible = false;
}
if (ctrl.down_mc == undefined) {
ctrl.down_mc = ctrl.up_mc;
} else {
ctrl.down_mc._x = 0;
ctrl.down_mc._y = 0;
ctrl.down_mc._visible = false;
}
if (ctrl.disabled_mc == undefined) {
ctrl.disabled_mc_mc = ctrl.up_mc;
} else {
ctrl.disabled_mc._x = 0;
ctrl.disabled_mc._y = 0;
ctrl.disabled_mc._visible = false;
}
}
}
function skinButtonControl(ctrl) {
if (ctrl.onEnterFrame != undefined) {
delete ctrl.onEnterFrame;
ctrl.onEnterFrame = undefined;
}
if (ctrl.enabled) {
switch (ctrl.state) {
case UP_STATE :
if (ctrl.up_mc == undefined) {
ctrl.up_mc = ctrl.attachMovie(ctrl.upLinkageID, "up_mc", ctrl.getNextHighestDepth());
}
applySkinState(ctrl, ctrl.up_mc);
break;
case OVER_STATE :
if (ctrl.over_mc == undefined) {
if (ctrl.overLinkageID == undefined) {
ctrl.over_mc = ctrl.up_mc;
} else {
ctrl.over_mc = ctrl.attachMovie(ctrl.overLinkageID, "over_mc", ctrl.getNextHighestDepth());
}
}
applySkinState(ctrl, ctrl.over_mc);
break;
case DOWN_STATE :
if (ctrl.down_mc == undefined) {
if (ctrl.downLinkageID == undefined) {
ctrl.down_mc = ctrl.up_mc;
} else {
ctrl.down_mc = ctrl.attachMovie(ctrl.downLinkageID, "down_mc", ctrl.getNextHighestDepth());
}
}
applySkinState(ctrl, ctrl.down_mc);
}
} else {
ctrl.state = UP_STATE;
if (ctrl.disabled_mc == undefined) {
if (ctrl.disabledLinkageID == undefined) {
ctrl.disabled_mc = ctrl.up_mc;
} else {
ctrl.disabled_mc = ctrl.attachMovie(ctrl.disabledLinkageID, "disabled_mc", ctrl.getNextHighestDepth());
}
}
applySkinState(ctrl, ctrl.disabled_mc);
}
if (ctrl.placeholder_mc != undefined) {
ctrl.placeholder_mc.unloadMovie();
delete ctrl.placeholder_mc;
ctrl.placeholder_mc = undefined;
}
}
function applySkinState(ctrl, state) {
if (state != ctrl.currentState_mc) {
if (state != undefined) {
state._visible = true;
}
if (ctrl.currentState_mc != undefined) {
ctrl.currentState_mc._visible = false;
}
ctrl.currentState_mc = state;
}
}
function addBarControl(controlIndex) {
var _local2 = controls[controlIndex];
_local2.isDragging = false;
_local2.percentage = 0;
_local2.uiMgr = this;
_local2.controlIndex = controlIndex;
if (_local2._parent == skin_mc) {
finishAddBarControl(controlIndex);
} else {
_local2.onEnterFrame = function () {
this.uiMgr.finishAddBarControl(this.controlIndex);
};
}
}
function finishAddBarControl(controlIndex) {
var _local2 = controls[controlIndex];
delete _local2.onEnterFrame;
_local2.onEnterFrame = undefined;
if (_local2.addBarControl != undefined) {
_local2.addBarControl();
}
calcBarMargins(_local2, "handle", true);
calcBarMargins(_local2, "progress", false);
calcBarMargins(_local2.progress_mc, "fill", false);
calcBarMargins(_local2.progress_mc, "mask", false);
calcBarMargins(_local2, "fullness", false);
calcBarMargins(_local2.fullness_mc, "fill", false);
calcBarMargins(_local2.fullness_mc, "mask", false);
_local2.origWidth = _local2._width;
_local2.origHeight = _local2._height;
fixUpBar(_local2, "progress");
if (_local2.progress_mc != undefined) {
fixUpBar(_local2, "progressBarFill");
if (_progressPercent == undefined) {
_progressPercent = (_vc.__get__isRTMP() ? 100 : 0);
}
positionBar(_local2, "progress", _progressPercent);
}
fixUpBar(_local2, "fullness");
if (_local2.fullness_mc != undefined) {
fixUpBar(_local2, "fullnessBarFill");
}
fixUpBar(_local2, "handle");
_local2.handle_mc.controlIndex = controlIndex;
switch (controlIndex) {
case SEEK_BAR :
setControl(SEEK_BAR_HANDLE, _local2.handle_mc);
break;
case VOLUME_BAR :
setControl(VOLUME_BAR_HANDLE, _local2.handle_mc);
}
positionHandle(controlIndex);
}
function fixUpBar(ctrl, type) {
if ((ctrl[type + "LinkageID"] != undefined) && (ctrl[type + "LinkageID"].length > 0)) {
var _local1;
if (ctrl[type + "Below"]) {
_local1 = -1;
while (ctrl._parent.getInstanceAtDepth(_local1) != undefined) {
_local1--;
}
} else {
ctrl[type + "Below"] = false;
_local1 = ctrl._parent.getNextHighestDepth();
}
var _local5 = ((ctrl.controlIndex == SEEK_BAR) ? "seekBar" : "volumeBar");
var _local4 = ((_local5 + type.substring(0, 1).toUpperCase()) + type.substring(1)) + "_mc";
ctrl[type + "_mc"] = ctrl._parent.attachMovie(ctrl[type + "LinkageID"], _local4, _local1);
}
}
function calcBarMargins(ctrl, type, symmetricMargins) {
var _local2 = ctrl[type + "_mc"];
if (_local2 == undefined) {
return(undefined);
}
if ((ctrl[type + "LeftMargin"] == undefined) && (_local2._parent == ctrl._parent)) {
ctrl[type + "LeftMargin"] = _local2._x - ctrl._x;
}
if (ctrl[type + "RightMargin"] == undefined) {
if (symmetricMargins) {
ctrl[type + "RightMargin"] = ctrl[type + "LeftMargin"];
} else if (_local2._parent == ctrl._parent) {
ctrl[type + "RightMargin"] = ((ctrl._width - _local2._width) - _local2._x) + ctrl._x;
}
}
if ((ctrl[type + "TopMargin"] == undefined) && (_local2._parent == ctrl._parent)) {
ctrl[type + "TopMargin"] = _local2._y - ctrl._y;
}
if (ctrl[type + "BottomMargin"] == undefined) {
if (symmetricMargins) {
ctrl[type + "BottomMargin"] = ctrl[type + "TopMargin"];
} else if (_local2._parent == ctrl._parent) {
ctrl[type + "BottomMargin"] = ((ctrl._height - _local2._height) - _local2._y) + ctrl._y;
}
}
if (ctrl[type + "X"] == undefined) {
if (_local2._parent == ctrl._parent) {
ctrl[type + "X"] = _local2._x - ctrl._x;
} else if (_local2._parent == ctrl) {
ctrl[type + "X"] = _local2._x;
}
}
if (ctrl[type + "Y"] == undefined) {
if (_local2._parent == ctrl._parent) {
ctrl[type + "Y"] = _local2._y - ctrl._y;
} else if (_local2._parent == ctrl) {
ctrl[type + "Y"] = _local2._y;
}
}
ctrl[type + "XScale"] = _local2._xscale;
ctrl[type + "YScale"] = _local2._yscale;
ctrl[type + "Width"] = _local2._width;
ctrl[type + "Height"] = _local2._height;
}
function finishAddBufferingBar() {
var _local2 = controls[BUFFERING_BAR];
delete _local2.onEnterFrame;
_local2.onEnterFrame = undefined;
calcBarMargins(_local2, "fill", true);
fixUpBar(_local2, "fill");
if (_local2.fill_mc != undefined) {
positionMaskedFill(_local2, _local2.fill_mc, 100);
}
}
function positionMaskedFill(ctrl, fill, percent) {
var _local5 = fill._parent;
var _local3 = ctrl.mask_mc;
if (_local3 == undefined) {
_local3 = _local5.createEmptyMovieClip(ctrl._name + "Mask_mc", _local5.getNextHighestDepth());
ctrl.mask_mc = _local3;
_local3.beginFill(16777215);
_local3.lineTo(0, 0);
_local3.lineTo(1, 0);
_local3.lineTo(1, 1);
_local3.lineTo(0, 1);
_local3.lineTo(0, 0);
_local3.endFill();
fill.setMask(_local3);
_local3._x = ctrl.fillX;
_local3._y = ctrl.fillY;
_local3._width = ctrl.fillWidth;
_local3._height = ctrl.fillHeight;
_local3._visible = false;
calcBarMargins(ctrl, "mask", true);
}
if (_local5 == ctrl) {
if (fill.slideReveal) {
fill._x = (ctrl.maskX - ctrl.fillWidth) + ((ctrl.fillWidth * percent) / 100);
} else {
_local3._width = (ctrl.fillWidth * percent) / 100;
}
} else if (_local5 == ctrl._parent) {
if (fill.slideReveal) {
_local3._x = ctrl._x + ctrl.maskLeftMargin;
_local3._y = ctrl._y + ctrl.maskTopMargin;
_local3._width = (ctrl._width - ctrl.maskRightMargin) - ctrl.maskLeftMargin;
_local3._height = (ctrl._height - ctrl.maskTopMargin) - ctrl.maskBottomMargin;
fill._x = (_local3._x - ctrl.fillWidth) + ((ctrl.maskWidth * percent) / 100);
fill._y = ctrl._y + ctrl.fillTopMargin;
} else {
fill._x = ctrl._x + ctrl.fillLeftMargin;
fill._y = ctrl._y + ctrl.fillTopMargin;
_local3._x = fill._x;
_local3._y = fill._y;
_local3._width = (((ctrl._width - ctrl.fillRightMargin) - ctrl.fillLeftMargin) * percent) / 100;
_local3._height = (ctrl._height - ctrl.fillTopMargin) - ctrl.fillBottomMargin;
}
}
}
function startHandleDrag(controlIndex) {
var _local2 = controls[controlIndex];
var _local5 = _local2.handle_mc;
if ((_local2.startHandleDrag == undefined) || (!_local2.startHandleDrag())) {
var _local3 = _local2._y + _local2.handleY;
var _local4 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth));
_local5.startDrag(false, _local2._x + _local2.handleLeftMargin, _local3, (_local2._x + _local4) - _local2.handleRightMargin, _local3);
}
_local2.isDragging = true;
}
function stopHandleDrag(controlIndex) {
var _local2 = controls[controlIndex];
var _local3 = _local2.handle_mc;
if ((_local2.stopHandleDrag == undefined) || (!_local2.stopHandleDrag())) {
_local3.stopDrag();
}
_local2.isDragging = false;
}
function positionHandle(controlIndex) {
var _local2 = controls[controlIndex];
var _local3 = _local2.handle_mc;
if (_local3 == undefined) {
return(undefined);
}
if ((_local2.positionHandle != undefined) && (_local2.positionHandle())) {
return(undefined);
}
var _local4 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth));
var _local5 = (_local4 - _local2.handleRightMargin) - _local2.handleLeftMargin;
_local3._x = (_local2._x + _local2.handleLeftMargin) + ((_local5 * _local2.percentage) / 100);
_local3._y = _local2._y + _local2.handleY;
if (_local2.fullness_mc != undefined) {
positionBar(_local2, "fullness", _local2.percentage);
}
}
function positionBar(ctrl, type, percent) {
if ((ctrl.positionBar != undefined) && (ctrl.positionBar(type, percent))) {
return(undefined);
}
var _local2 = ctrl[type + "_mc"];
if (_local2._parent == ctrl) {
if (_local2.fill_mc == undefined) {
_local2._xscale = (ctrl[type + "XScale"] * percent) / 100;
} else {
positionMaskedFill(_local2, _local2.fill_mc, percent);
}
} else {
_local2._x = ctrl._x + ctrl[type + "LeftMargin"];
_local2._y = ctrl._y + ctrl[type + "Y"];
if (_local2.fill_mc == undefined) {
_local2._width = (((ctrl._width - ctrl[type + "LeftMargin"]) - ctrl[type + "RightMargin"]) * percent) / 100;
} else {
positionMaskedFill(_local2, _local2.fill_mc, percent);
}
}
}
function calcPercentageFromHandle(controlIndex) {
var _local2 = controls[controlIndex];
var _local5 = _local2.handle_mc;
if ((_local2.calcPercentageFromHandle == undefined) || (!_local2.calcPercentageFromHandle())) {
var _local3 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth));
var _local6 = (_local3 - _local2.handleRightMargin) - _local2.handleLeftMargin;
var _local4 = _local5._x - (_local2._x + _local2.handleLeftMargin);
_local2.percentage = (_local4 / _local6) * 100;
if (_local2.fullness_mc != undefined) {
positionBar(_local2, "fullness", _local2.percentage);
}
}
if (_local2.percentage < 0) {
_local2.percentage = 0;
}
if (_local2.percentage > 100) {
_local2.percentage = 100;
}
}
function handleRelease(controlIndex) {
var _local3 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
if (controlIndex == SEEK_BAR) {
seekBarListener(true);
} else if (controlIndex == VOLUME_BAR) {
volumeBarListener(true);
}
stopHandleDrag(controlIndex);
_vc.__set__activeVideoPlayerIndex(_local3);
if (controlIndex == SEEK_BAR) {
_vc._scrubFinish();
}
}
function seekBarListener(finish) {
var _local3 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
var _local4 = controls[SEEK_BAR];
calcPercentageFromHandle(SEEK_BAR);
var _local2 = _local4.percentage;
if (finish) {
clearInterval(_seekBarIntervalID);
_seekBarIntervalID = 0;
if (_local2 != _lastScrubPos) {
_vc.seekPercent(_local2);
}
_vc.addEventListener("playheadUpdate", this);
if (_playAfterScrub) {
_vc.play();
}
} else if (_vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex()).__get__state() == mx.video.VideoPlayer.SEEKING) {
} else if ((((_seekBarScrubTolerance <= 0) || (Math.abs(_local2 - _lastScrubPos) > _seekBarScrubTolerance)) || (_local2 < _seekBarScrubTolerance)) || (_local2 > (100 - _seekBarScrubTolerance))) {
if (_local2 != _lastScrubPos) {
_lastScrubPos = _local2;
_vc.seekPercent(_local2);
}
}
_vc.__set__activeVideoPlayerIndex(_local3);
}
function volumeBarListener(finish) {
var _local3 = controls[VOLUME_BAR];
calcPercentageFromHandle(VOLUME_BAR);
var _local2 = _local3.percentage;
if (finish) {
clearInterval(_volumeBarIntervalID);
_volumeBarIntervalID = 0;
_vc.addEventListener("volumeUpdate", this);
}
if ((((finish || (_volumeBarScrubTolerance <= 0)) || (Math.abs(_local2 - _lastVolumePos) > _volumeBarScrubTolerance)) || (_local2 < _volumeBarScrubTolerance)) || (_local2 > (100 - _volumeBarScrubTolerance))) {
if (_local2 != _lastVolumePos) {
if (_isMuted) {
cachedSoundLevel = _local2;
} else {
_vc.__set__volume(_local2);
}
_lastVolumePos = _local2;
}
}
}
function doBufferingDelay() {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = 0;
var _local2 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
if (_vc.__get__state() == mx.video.FLVPlayback.BUFFERING) {
_bufferingOn = true;
handleEvent({type:"stateChange", state:mx.video.FLVPlayback.BUFFERING, vp:_vc.__get__visibleVideoPlayerIndex()});
}
_vc.__set__activeVideoPlayerIndex(_local2);
}
function dispatchMessage(ctrl) {
if (ctrl.id == SEEK_BAR_HANDLE) {
_vc._scrubStart();
}
var _local2 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
switch (ctrl.id) {
case PAUSE_BUTTON :
_vc.pause();
break;
case PLAY_BUTTON :
_vc.play();
break;
case STOP_BUTTON :
_vc.stop();
break;
case SEEK_BAR_HANDLE :
calcPercentageFromHandle(SEEK_BAR);
_lastScrubPos = controls[SEEK_BAR].percentage;
_vc.removeEventListener("playheadUpdate", this);
if (_vc.__get__playing() || (_vc.__get__buffering())) {
_playAfterScrub = true;
} else if (_vc.__get__state() != mx.video.VideoPlayer.SEEKING) {
_playAfterScrub = false;
}
_seekBarIntervalID = setInterval(this, "seekBarListener", _seekBarInterval, false);
startHandleDrag(SEEK_BAR);
_vc.pause();
break;
case VOLUME_BAR_HANDLE :
calcPercentageFromHandle(VOLUME_BAR);
_lastVolumePos = controls[VOLUME_BAR].percentage;
_vc.removeEventListener("volumeUpdate", this);
_volumeBarIntervalID = setInterval(this, "volumeBarListener", _volumeBarInterval, false);
startHandleDrag(VOLUME_BAR);
break;
case BACK_BUTTON :
_vc.seekToPrevNavCuePoint();
break;
case FORWARD_BUTTON :
_vc.seekToNextNavCuePoint();
break;
case MUTE_ON_BUTTON :
case MUTE_OFF_BUTTON :
if (!_isMuted) {
_isMuted = true;
cachedSoundLevel = _vc.volume;
_vc.__set__volume(0);
} else {
_isMuted = false;
_vc.__set__volume(cachedSoundLevel);
}
setEnabledAndVisibleForState(MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_OFF_BUTTON]);
setEnabledAndVisibleForState(MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_ON_BUTTON]);
break;
default :
throw new Error("Unknown ButtonControl");
}
_vc.__set__activeVideoPlayerIndex(_local2);
}
function setEnabledAndVisibleForState(index, state) {
var _local5 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
var _local3 = state;
if ((_local3 == mx.video.FLVPlayback.BUFFERING) && (!_bufferingOn)) {
_local3 = mx.video.FLVPlayback.PLAYING;
}
switch (index) {
case VOLUME_BAR :
case VOLUME_BAR_HANDLE :
controls[index].myEnabled = true;
controls[index].enabled = _controlsEnabled;
break;
case MUTE_ON_BUTTON :
controls[index].myEnabled = !_isMuted;
if (controls[MUTE_BUTTON] != undefined) {
controls[index]._visible = controls[index].myEnabled;
}
break;
case MUTE_OFF_BUTTON :
controls[index].myEnabled = _isMuted;
if (controls[MUTE_BUTTON] != undefined) {
controls[index]._visible = controls[index].myEnabled;
}
break;
default :
switch (_local3) {
case mx.video.FLVPlayback.LOADING :
case mx.video.FLVPlayback.CONNECTION_ERROR :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.DISCONNECTED :
controls[index].myEnabled = _vc.__get__contentPath() != undefined;
break;
case mx.video.FLVPlayback.SEEKING :
break;
default :
controls[index].myEnabled = true;
}
}
switch (index) {
case SEEK_BAR :
switch (_local3) {
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PLAYING :
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.REWINDING :
case mx.video.FLVPlayback.SEEKING :
controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
break;
default :
controls[index].myEnabled = false;
}
if (controls[index].myEnabled) {
controls[index].myEnabled = (!isNaN(_vc.__get__totalTime())) && (_vc.__get__totalTime() > 0);
}
controls[index].handle_mc.myEnabled = controls[index].myEnabled;
controls[index].handle_mc.enabled = controls[index].handle_mc.myEnabled;
controls[index].handle_mc._visible = controls[index].myEnabled;
var _local4 = (((!_bufferingBarHides) || (controls[index].myEnabled)) || (controls[BUFFERING_BAR] == undefined)) || (!controls[BUFFERING_BAR]._visible);
controls[index]._visible = _local4;
controls[index].progress_mc._visible = _local4;
controls[index].progress_mc.fill_mc._visible = _local4;
controls[index].fullness_mc._visible = _local4;
controls[index].fullness_mc.fill_mc._visible = _local4;
break;
case BUFFERING_BAR :
switch (_local3) {
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PLAYING :
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.REWINDING :
case mx.video.FLVPlayback.SEEKING :
controls[index].myEnabled = false;
break;
default :
controls[index].myEnabled = true;
}
controls[index]._visible = controls[index].myEnabled;
controls[index].fill_mc._visible = controls[index].myEnabled;
break;
case PAUSE_BUTTON :
switch (_local3) {
case mx.video.FLVPlayback.DISCONNECTED :
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.REWINDING :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.PLAYING :
controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
}
if (controls[PLAY_PAUSE_BUTTON] != undefined) {
controls[index]._visible = controls[index].myEnabled;
}
break;
case PLAY_BUTTON :
switch (_local3) {
case mx.video.FLVPlayback.PLAYING :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PAUSED :
controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
}
if (controls[PLAY_PAUSE_BUTTON] != undefined) {
controls[index]._visible = !controls[PAUSE_BUTTON]._visible;
}
break;
case STOP_BUTTON :
switch (_local3) {
case mx.video.FLVPlayback.DISCONNECTED :
case mx.video.FLVPlayback.STOPPED :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.PLAYING :
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = true;
}
break;
case BACK_BUTTON :
case FORWARD_BUTTON :
if (!(_local3 === mx.video.FLVPlayback.BUFFERING)) {
} else {
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
}
}
controls[index].enabled = _controlsEnabled && (controls[index].myEnabled);
_vc.__set__activeVideoPlayerIndex(_local5);
}
function setupSkinAutoHide() {
if (_skinAutoHide && (skin_mc != undefined)) {
skinAutoHideHitTest();
if (_skinAutoHideIntervalID == 0) {
_skinAutoHideIntervalID = setInterval(this, "skinAutoHideHitTest", SKIN_AUTO_HIDE_INTERVAL);
}
} else {
skin_mc._visible = __visible;
clearInterval(_skinAutoHideIntervalID);
_skinAutoHideIntervalID = 0;
}
}
function skinAutoHideHitTest() {
if (!__visible) {
skin_mc._visible = false;
} else {
var _local4 = _vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex());
var _local3 = _local4.hitTest(_root._xmouse, _root._ymouse, true);
if ((!_local3) && (border_mc != undefined)) {
_local3 = border_mc.hitTest(_root._xmouse, _root._ymouse, true);
}
skin_mc._visible = _local3;
}
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
static var PAUSE_BUTTON = 0;
static var PLAY_BUTTON = 1;
static var STOP_BUTTON = 2;
static var SEEK_BAR_HANDLE = 3;
static var BACK_BUTTON = 4;
static var FORWARD_BUTTON = 5;
static var MUTE_ON_BUTTON = 6;
static var MUTE_OFF_BUTTON = 7;
static var VOLUME_BAR_HANDLE = 8;
static var NUM_BUTTONS = 9;
static var PLAY_PAUSE_BUTTON = 9;
static var MUTE_BUTTON = 10;
static var BUFFERING_BAR = 11;
static var SEEK_BAR = 12;
static var VOLUME_BAR = 13;
static var NUM_CONTROLS = 14;
static var UP_STATE = 0;
static var OVER_STATE = 1;
static var DOWN_STATE = 2;
static var SKIN_AUTO_HIDE_INTERVAL = 200;
static var VOLUME_BAR_INTERVAL_DEFAULT = 250;
static var VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT = 0;
static var SEEK_BAR_INTERVAL_DEFAULT = 250;
static var SEEK_BAR_SCRUB_TOLERANCE_DEFAULT = 5;
static var BUFFERING_DELAY_INTERVAL_DEFAULT = 1000;
}
Symbol 1635 MovieClip [__Packages.mx.video.VideoPlayer] Frame 0
class mx.video.VideoPlayer extends MovieClip
{
var _state, _cachedState, _bufferState, _sawPlayStop, _cachedPlayheadTime, _metadata, _startingPlay, _invalidSeekTime, _invalidSeekRecovery, _currentPos, _atEnd, _cmdQueue, _readyDispatched, _autoResizeDone, _lastUpdateTime, _sawSeekNotify, _updateTimeIntervalID, _updateTimeInterval, _updateProgressIntervalID, _updateProgressInterval, _idleTimeoutIntervalID, _idleTimeoutInterval, _autoResizeIntervalID, _rtmpDoStopAtEndIntervalID, _rtmpDoSeekIntervalID, _httpDoSeekIntervalID, _httpDoSeekCount, _finishAutoResizeIntervalID, _delayedBufferingIntervalID, _delayedBufferingInterval, _isLive, _autoSize, _aspectRatio, _autoPlay, _autoRewind, _bufferTime, _volume, _sound, __visible, _hiddenForResize, _hiddenForResizeMetadataDelay, _contentPath, _video, _ncMgr, _ns, attachAudio, _prevVideoWidth, _prevVideoHeight, _streamLength, _videoWidth, _videoHeight, dispatchEvent, _x, _y, _visible, _hiddenRewindPlayheadTime, ncMgrClassName, _height, _width;
function VideoPlayer () {
super();
mx.events.EventDispatcher.initialize(this);
_state = DISCONNECTED;
_cachedState = _state;
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
_cachedPlayheadTime = 0;
_metadata = null;
_startingPlay = false;
_invalidSeekTime = false;
_invalidSeekRecovery = false;
_currentPos = 0;
_atEnd = false;
_cmdQueue = new Array();
_readyDispatched = false;
_autoResizeDone = false;
_lastUpdateTime = -1;
_sawSeekNotify = false;
_updateTimeIntervalID = 0;
_updateTimeInterval = DEFAULT_UPDATE_TIME_INTERVAL;
_updateProgressIntervalID = 0;
_updateProgressInterval = DEFAULT_UPDATE_PROGRESS_INTERVAL;
_idleTimeoutIntervalID = 0;
_idleTimeoutInterval = DEFAULT_IDLE_TIMEOUT_INTERVAL;
_autoResizeIntervalID = 0;
_rtmpDoStopAtEndIntervalID = 0;
_rtmpDoSeekIntervalID = 0;
_httpDoSeekIntervalID = 0;
_httpDoSeekCount = 0;
_finishAutoResizeIntervalID = 0;
_delayedBufferingIntervalID = 0;
_delayedBufferingInterval = HTTP_DELAYED_BUFFERING_INTERVAL;
if (_isLive == undefined) {
_isLive = false;
}
if (_autoSize == undefined) {
_autoSize = false;
}
if (_aspectRatio == undefined) {
_aspectRatio = true;
}
if (_autoPlay == undefined) {
_autoPlay = true;
}
if (_autoRewind == undefined) {
_autoRewind = true;
}
if (_bufferTime == undefined) {
_bufferTime = 0.1;
}
if (_volume == undefined) {
_volume = 100;
}
_sound = new Sound(this);
_sound.setVolume(_volume);
__visible = true;
_hiddenForResize = false;
_hiddenForResizeMetadataDelay = 0;
_contentPath = "";
}
function setSize(w, h) {
if (((w == _video._width) && (h == _video._height)) || (_autoSize)) {
return(undefined);
}
_video._width = w;
_video._height = h;
if (_aspectRatio) {
startAutoResize();
}
}
function setScale(xs, ys) {
if (((xs == _video._xscale) && (ys == _video._yscale)) || (_autoSize)) {
return(undefined);
}
_video._xscale = xs;
_video._yscale = ys;
if (_aspectRatio) {
startAutoResize();
}
}
function play(url, isLive, totalTime) {
if (url != null) {
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if ((!stateResponsive) && (_state != CONNECTION_ERROR)) {
queueCmd(PLAY, url, isLive, totalTime);
return(undefined);
}
execQueuedCmds();
}
_autoPlay = true;
_load(url, isLive, totalTime);
return(undefined);
}
if (!isXnOK()) {
if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
flushQueuedCmds();
queueCmd(PLAY);
setState(LOADING);
_cachedState = LOADING;
_ncMgr.reconnect();
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(PLAY);
return(undefined);
}
execQueuedCmds();
}
if (_ns == null) {
_createStream();
_video.attachVideo(_ns);
attachAudio(_ns);
}
switch (_state) {
case BUFFERING :
if (_ncMgr.isRTMP()) {
_play(0);
if (_atEnd) {
_atEnd = false;
_currentPos = 0;
setState(REWINDING);
} else if (_currentPos > 0) {
_seek(_currentPos);
_currentPos = 0;
}
}
case PLAYING :
return(undefined);
case STOPPED :
if (_ncMgr.isRTMP()) {
if (_isLive) {
_play(-1);
setState(BUFFERING);
} else {
_play(0);
if (_atEnd) {
_atEnd = false;
_currentPos = 0;
_state = BUFFERING;
setState(REWINDING);
} else if (_currentPos > 0) {
_seek(_currentPos);
_currentPos = 0;
setState(BUFFERING);
} else {
setState(BUFFERING);
}
}
} else {
_pause(false);
if (_atEnd) {
_atEnd = false;
_seek(0);
_state = BUFFERING;
setState(REWINDING);
} else if (_bufferState == BUFFER_EMPTY) {
setState(BUFFERING);
} else {
setState(PLAYING);
}
}
break;
case PAUSED :
_pause(false);
if (!_ncMgr.isRTMP()) {
if (_bufferState == BUFFER_EMPTY) {
setState(BUFFERING);
} else {
setState(PLAYING);
}
} else {
setState(BUFFERING);
}
}
}
function load(url, isLive, totalTime) {
if (url == null) {
throw new Error("null url sent to VideoPlayer.load");
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if ((!stateResponsive) && (_state != CONNECTION_ERROR)) {
queueCmd(LOAD, url, isLive, totalTime);
return(undefined);
}
execQueuedCmds();
}
_autoPlay = false;
_load(url, isLive, totalTime);
}
function _load(url, isLive, totalTime) {
_prevVideoWidth = videoWidth;
if (_prevVideoWidth == undefined) {
_prevVideoWidth = _video.width;
if (_prevVideoWidth == undefined) {
_prevVideoWidth = 0;
}
}
_prevVideoHeight = videoHeight;
if (_prevVideoHeight == undefined) {
_prevVideoHeight = _video.height;
if (_prevVideoHeight == undefined) {
_prevVideoHeight = 0;
}
}
_autoResizeDone = false;
_cachedPlayheadTime = 0;
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
_metadata = null;
_startingPlay = false;
_invalidSeekTime = false;
_invalidSeekRecovery = false;
_isLive = ((isLive == undefined) ? false : (isLive));
_contentPath = url;
_currentPos = 0;
_streamLength = totalTime;
_atEnd = false;
_videoWidth = undefined;
_videoHeight = undefined;
_readyDispatched = false;
_lastUpdateTime = -1;
_sawSeekNotify = false;
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = 0;
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = 0;
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = 0;
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = 0;
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
clearInterval(_httpDoSeekIntervalID);
_httpDoSeekIntervalID = 0;
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = 0;
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
closeNS(false);
if (_ncMgr == null) {
createINCManager();
}
var _local2 = _ncMgr.connectToURL(_contentPath);
setState(LOADING);
_cachedState = LOADING;
if (_local2) {
_createStream();
_setUpStream();
}
if (!_ncMgr.isRTMP()) {
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = setInterval(this, "doUpdateProgress", _updateProgressInterval);
}
}
function pause() {
if (!isXnOK()) {
if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(PAUSE);
return(undefined);
}
execQueuedCmds();
}
if (((_state == PAUSED) || (_state == STOPPED)) || (_ns == null)) {
return(undefined);
}
_pause(true);
setState(PAUSED);
}
function stop() {
if (!isXnOK()) {
if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(STOP);
return(undefined);
}
execQueuedCmds();
}
if ((_state == STOPPED) || (_ns == null)) {
return(undefined);
}
if (_ncMgr.isRTMP()) {
if (_autoRewind && (!_isLive)) {
_currentPos = 0;
_play(0, 0);
_state = STOPPED;
setState(REWINDING);
} else {
closeNS(true);
setState(STOPPED);
}
} else {
_pause(true);
if (_autoRewind) {
_seek(0);
_state = STOPPED;
setState(REWINDING);
} else {
setState(STOPPED);
}
}
}
function seek(time) {
if (_invalidSeekTime) {
return(undefined);
}
if (isNaN(time) || (time < 0)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
if (!isXnOK()) {
if (((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr.getNetConnection() == null)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
flushQueuedCmds();
queueCmd(SEEK, null, false, time);
setState(LOADING);
_cachedState = LOADING;
_ncMgr.reconnect();
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(SEEK, null, false, time);
return(undefined);
}
execQueuedCmds();
}
if (_ns == null) {
_createStream();
_video.attachVideo(_ns);
attachAudio(_ns);
}
if (_atEnd && (time < playheadTime)) {
_atEnd = false;
}
switch (_state) {
case PLAYING :
_state = BUFFERING;
case BUFFERING :
case PAUSED :
_seek(time);
setState(SEEKING);
break;
case STOPPED :
if (_ncMgr.isRTMP()) {
_play(0);
_pause(true);
}
_seek(time);
_state = PAUSED;
setState(SEEKING);
}
}
function close() {
closeNS(true);
if ((_ncMgr != null) && (_ncMgr.isRTMP())) {
_ncMgr.close();
}
setState(DISCONNECTED);
dispatchEvent({type:"close", state:_state, playheadTime:playheadTime});
}
function get x() {
return(_x);
}
function set x(xpos) {
_x = xpos;
//return(x);
}
function get y() {
return(_y);
}
function set y(ypos) {
_y = ypos;
//return(y);
}
function get scaleX() {
return(_video._xscale);
}
function set scaleX(xs) {
setScale(xs, scaleY);
//return(scaleX);
}
function get scaleY() {
return(_video._yscale);
}
function set scaleY(ys) {
setScale(scaleX, ys);
//return(scaleY);
}
function get width() {
return(_video._width);
}
function set width(w) {
setSize(w, _video._height);
//return(width);
}
function get height() {
return(_video._height);
}
function set height(h) {
setSize(_video._width, h);
//return(height);
}
function get videoWidth() {
if (_readyDispatched) {
_videoWidth = _video.width;
}
return(_videoWidth);
}
function get videoHeight() {
if (_readyDispatched) {
_videoHeight = _video.height;
}
return(_videoHeight);
}
function get visible() {
if (!_hiddenForResize) {
__visible = _visible;
}
return(__visible);
}
function set visible(v) {
__visible = v;
if (!_hiddenForResize) {
_visible = __visible;
}
//return(visible);
}
function get autoSize() {
return(_autoSize);
}
function set autoSize(flag) {
if (_autoSize != flag) {
_autoSize = flag;
if (_autoSize) {
startAutoResize();
}
}
//return(autoSize);
}
function get maintainAspectRatio() {
return(_aspectRatio);
}
function set maintainAspectRatio(flag) {
if (_aspectRatio != flag) {
_aspectRatio = flag;
if (_aspectRatio && (!_autoSize)) {
startAutoResize();
}
}
//return(maintainAspectRatio);
}
function get autoRewind() {
return(_autoRewind);
}
function set autoRewind(flag) {
_autoRewind = flag;
//return(autoRewind);
}
function get playheadTime() {
var _local2 = ((_ns == null) ? (_currentPos) : (_ns.time));
if (_metadata.audiodelay != undefined) {
_local2 = _local2 - _metadata.audiodelay;
if (_local2 < 0) {
_local2 = 0;
}
}
return(_local2);
}
function set playheadTime(position) {
seek(position);
//return(playheadTime);
}
function get url() {
return(_contentPath);
}
function get volume() {
return(_volume);
}
function set volume(aVol) {
_volume = aVol;
if (!_hiddenForResize) {
_sound.setVolume(_volume);
}
//return(volume);
}
function get transform() {
return(_sound.getTransform());
}
function set transform(s) {
_sound.setTransform(s);
//return(transform);
}
function get isRTMP() {
if (_ncMgr == null) {
return(undefined);
}
return(_ncMgr.isRTMP());
}
function get isLive() {
return(_isLive);
}
function get state() {
return(_state);
}
function get stateResponsive() {
switch (_state) {
case DISCONNECTED :
case STOPPED :
case PLAYING :
case PAUSED :
case BUFFERING :
return(true);
}
return(false);
}
function get bytesLoaded() {
if ((_ns == null) || (_ncMgr.isRTMP())) {
return(-1);
}
return(_ns.bytesLoaded);
}
function get bytesTotal() {
if ((_ns == null) || (_ncMgr.isRTMP())) {
return(-1);
}
return(_ns.bytesTotal);
}
function get totalTime() {
return(_streamLength);
}
function get bufferTime() {
return(_bufferTime);
}
function set bufferTime(aTime) {
_bufferTime = aTime;
if (_ns != null) {
_ns.setBufferTime(_bufferTime);
}
//return(bufferTime);
}
function get idleTimeout() {
return(_idleTimeoutInterval);
}
function set idleTimeout(aTime) {
_idleTimeoutInterval = aTime;
if (_idleTimeoutIntervalID > 0) {
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = setInterval(this, "doIdleTimeout", _idleTimeoutInterval);
}
//return(idleTimeout);
}
function get playheadUpdateInterval() {
return(_updateTimeInterval);
}
function set playheadUpdateInterval(aTime) {
_updateTimeInterval = aTime;
if (_updateTimeIntervalID > 0) {
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = setInterval(this, "doUpdateTime", _updateTimeInterval);
}
//return(playheadUpdateInterval);
}
function get progressInterval() {
return(_updateProgressInterval);
}
function set progressInterval(aTime) {
_updateProgressInterval = aTime;
if (_updateProgressIntervalID > 0) {
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = setInterval(this, "doUpdateProgress", _updateProgressInterval);
}
//return(progressInterval);
}
function get ncMgr() {
if (_ncMgr == null) {
createINCManager();
}
return(_ncMgr);
}
function get metadata() {
return(_metadata);
}
function doUpdateTime() {
var _local2 = playheadTime;
switch (_state) {
case STOPPED :
case PAUSED :
case DISCONNECTED :
case CONNECTION_ERROR :
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = 0;
}
if (_lastUpdateTime != _local2) {
dispatchEvent({type:"playheadUpdate", state:_state, playheadTime:_local2});
_lastUpdateTime = _local2;
}
}
function doUpdateProgress() {
if (_ns == null) {
return(undefined);
}
if ((_ns.bytesTotal >= 0) && (_ns.bytesTotal >= 0)) {
dispatchEvent({type:"progress", bytesLoaded:_ns.bytesLoaded, bytesTotal:_ns.bytesTotal});
}
if (((_state == DISCONNECTED) || (_state == CONNECTION_ERROR)) || (_ns.bytesLoaded == _ns.bytesTotal)) {
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = 0;
}
}
function rtmpOnStatus(info) {
if (_state == CONNECTION_ERROR) {
return(undefined);
}
switch (info.code) {
case "NetStream.Play.Stop" :
if (_startingPlay) {
return(undefined);
}
switch (_state) {
case RESIZING :
if (_hiddenForResize) {
finishAutoResize();
}
break;
case LOADING :
case STOPPED :
case PAUSED :
break;
default :
_sawPlayStop = true;
}
break;
case "NetStream.Buffer.Empty" :
if (!(_bufferState === BUFFER_FULL)) {
} else if (_sawPlayStop) {
rtmpDoStopAtEnd(true);
} else if (_state == PLAYING) {
setState(BUFFERING);
}
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
break;
case "NetStream.Buffer.Flush" :
if (_sawSeekNotify && (_state == SEEKING)) {
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
setStateFromCachedState();
doUpdateTime();
}
if (_sawPlayStop && ((_bufferState == BUFFER_EMPTY) || ((_bufferTime <= 0.1) && (_ns.bufferLength <= 0.1)))) {
_cachedPlayheadTime = playheadTime;
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = setInterval(this, "rtmpDoStopAtEnd", RTMP_DO_STOP_AT_END_INTERVAL);
}
switch (_bufferState) {
case BUFFER_EMPTY :
if (!_hiddenForResize) {
if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) {
setState(PLAYING);
} else if (_cachedState == BUFFERING) {
_cachedState = PLAYING;
}
}
_bufferState = BUFFER_FLUSH;
break;
default :
if (_state != BUFFERING) {
break;
}
setStateFromCachedState();
}
break;
case "NetStream.Buffer.Full" :
if (_sawSeekNotify && (_state == SEEKING)) {
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
setStateFromCachedState();
doUpdateTime();
}
switch (_bufferState) {
case BUFFER_EMPTY :
_bufferState = BUFFER_FULL;
if (!_hiddenForResize) {
if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) {
setState(PLAYING);
} else if (_cachedState == BUFFERING) {
_cachedState = PLAYING;
}
if (_rtmpDoStopAtEndIntervalID != 0) {
_sawPlayStop = true;
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
}
}
break;
case BUFFER_FLUSH :
_bufferState = BUFFER_FULL;
if (_rtmpDoStopAtEndIntervalID == 0) {
break;
}
_sawPlayStop = true;
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
}
if (_state == BUFFERING) {
setStateFromCachedState();
}
break;
case "NetStream.Pause.Notify" :
if ((_state == RESIZING) && (_hiddenForResize)) {
finishAutoResize();
}
break;
case "NetStream.Unpause.Notify" :
if (_state == PAUSED) {
_state = PLAYING;
setState(BUFFERING);
} else {
_cachedState = PLAYING;
}
break;
case "NetStream.Play.Start" :
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
if (_startingPlay) {
_startingPlay = false;
_cachedPlayheadTime = playheadTime;
} else if (_state == PLAYING) {
setState(BUFFERING);
}
break;
case "NetStream.Play.Reset" :
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
if (_state == REWINDING) {
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
if ((playheadTime == 0) || (playheadTime < _cachedPlayheadTime)) {
setStateFromCachedState();
} else {
_cachedPlayheadTime = playheadTime;
_rtmpDoSeekIntervalID = setInterval(this, "rtmpDoSeek", RTMP_DO_SEEK_INTERVAL);
}
}
break;
case "NetStream.Seek.Notify" :
if (playheadTime != _cachedPlayheadTime) {
setStateFromCachedState();
doUpdateTime();
} else {
_sawSeekNotify = true;
if (_rtmpDoSeekIntervalID == 0) {
_rtmpDoSeekIntervalID = setInterval(this, "rtmpDoSeek", RTMP_DO_SEEK_INTERVAL);
}
}
break;
case "Netstream.Play.UnpublishNotify" :
break;
case "Netstream.Play.PublishNotify" :
break;
case "NetStream.Play.StreamNotFound" :
closeNS(false);
if (!_ncMgr.connectAgain()) {
setState(CONNECTION_ERROR);
}
break;
case "NetStream.Play.Failed" :
case "NetStream.Failed" :
case "NetStream.Play.FileStructureInvalid" :
case "NetStream.Play.NoSupportedTrackFound" :
setState(CONNECTION_ERROR);
}
}
function httpOnStatus(info) {
switch (info.code) {
case "NetStream.Play.Stop" :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
if (_invalidSeekTime) {
_invalidSeekTime = false;
_invalidSeekRecovery = true;
setState(_cachedState);
seek(playheadTime);
} else {
switch (_state) {
case SEEKING :
httpDoSeek();
case PLAYING :
case BUFFERING :
httpDoStopAtEnd();
}
}
break;
case "NetStream.Seek.InvalidTime" :
if (_invalidSeekRecovery) {
_invalidSeekTime = false;
_invalidSeekRecovery = false;
setState(_cachedState);
seek(0);
} else {
_invalidSeekTime = true;
}
break;
case "NetStream.Buffer.Empty" :
_bufferState = BUFFER_EMPTY;
if (_state == PLAYING) {
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = setInterval(this, "doDelayedBuffering", _delayedBufferingInterval);
}
break;
case "NetStream.Buffer.Full" :
case "NetStream.Buffer.Flush" :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
_bufferState = BUFFER_FULL;
if (!_hiddenForResize) {
if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) {
setState(PLAYING);
} else if (_cachedState == BUFFERING) {
_cachedState = PLAYING;
}
}
break;
case "NetStream.Seek.Notify" :
_invalidSeekRecovery = false;
switch (_state) {
case SEEKING :
case REWINDING :
if (_httpDoSeekIntervalID != 0) {
break;
}
_httpDoSeekCount = 0;
_httpDoSeekIntervalID = setInterval(this, "httpDoSeek", HTTP_DO_SEEK_INTERVAL);
}
break;
case "NetStream.Play.StreamNotFound" :
case "NetStream.Play.FileStructureInvalid" :
case "NetStream.Play.NoSupportedTrackFound" :
setState(CONNECTION_ERROR);
}
}
function ncConnected() {
if ((_ncMgr == null) || (_ncMgr.getNetConnection() == null)) {
setState(CONNECTION_ERROR);
} else if (_ns == null) {
_createStream();
_setUpStream();
}
}
function ncReconnected() {
if ((_ncMgr == null) || (_ncMgr.getNetConnection() == null)) {
setState(CONNECTION_ERROR);
} else {
_ns = null;
_state = STOPPED;
execQueuedCmds();
}
}
function onMetaData(info) {
if (_metadata != null) {
return(undefined);
}
_metadata = info;
if ((_streamLength == null) || (_streamLength <= 0)) {
_streamLength = info.duration;
}
if (isNaN(_videoWidth) || (_videoWidth <= 0)) {
_videoWidth = info.width;
}
if (isNaN(_videoHeight) || (_videoHeight <= 0)) {
_videoHeight = info.height;
}
dispatchEvent({type:"metadataReceived", info:info});
}
function onCuePoint(info) {
if ((!_hiddenForResize) || ((!isNaN(_hiddenRewindPlayheadTime)) && (playheadTime < _hiddenRewindPlayheadTime))) {
dispatchEvent({type:"cuePoint", info:info});
}
}
function setState(s) {
if (s == _state) {
return(undefined);
}
_hiddenRewindPlayheadTime = undefined;
_cachedState = _state;
_cachedPlayheadTime = playheadTime;
_state = s;
var _local2 = _state;
dispatchEvent({type:"stateChange", state:_local2, playheadTime:playheadTime});
if (!_readyDispatched) {
switch (_local2) {
case STOPPED :
case PLAYING :
case PAUSED :
case BUFFERING :
_readyDispatched = true;
dispatchEvent({type:"ready", state:_local2, playheadTime:playheadTime});
}
}
if (!(_cachedState === REWINDING)) {
} else {
dispatchEvent({type:"rewind", state:_local2, playheadTime:playheadTime});
if (_ncMgr.isRTMP() && (_local2 == STOPPED)) {
closeNS();
}
}
switch (_local2) {
case STOPPED :
case PAUSED :
if (_ncMgr.isRTMP() && (_idleTimeoutIntervalID == 0)) {
_idleTimeoutIntervalID = setInterval(this, "doIdleTimeout", _idleTimeoutInterval);
}
break;
case SEEKING :
case REWINDING :
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
case PLAYING :
case BUFFERING :
if (_updateTimeIntervalID == 0) {
_updateTimeIntervalID = setInterval(this, "doUpdateTime", _updateTimeInterval);
}
case LOADING :
case RESIZING :
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = 0;
}
execQueuedCmds();
}
function setStateFromCachedState() {
switch (_cachedState) {
case PLAYING :
case PAUSED :
setState(_cachedState);
break;
case BUFFERING :
if (_bufferState == BUFFER_EMPTY) {
setState(BUFFERING);
} else {
setState(_cachedState);
}
break;
default :
setState(STOPPED);
}
}
function createINCManager() {
if (ncMgrClassName == null) {
ncMgrClassName = DEFAULT_INCMANAGER;
}
var ncMgrConstructor = eval (this.ncMgrClassName);
_ncMgr = new ncMgrConstructor();
_ncMgr.setVideoPlayer(this);
}
function rtmpDoStopAtEnd(force) {
if (_rtmpDoStopAtEndIntervalID > 0) {
switch (_state) {
case DISCONNECTED :
case CONNECTION_ERROR :
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
return(undefined);
}
if (force || (_cachedPlayheadTime == playheadTime)) {
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
} else {
_cachedPlayheadTime = playheadTime;
return(undefined);
}
}
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
_atEnd = true;
setState(STOPPED);
if (_state != STOPPED) {
return(undefined);
}
doUpdateTime();
if (_state != STOPPED) {
return(undefined);
}
dispatchEvent({type:"complete", state:_state, playheadTime:playheadTime});
if (_state != STOPPED) {
return(undefined);
}
if ((_autoRewind && (!_isLive)) && (playheadTime != 0)) {
_atEnd = false;
_currentPos = 0;
_play(0, 0);
setState(REWINDING);
} else {
closeNS();
}
}
function rtmpDoSeek() {
if ((_state != REWINDING) && (_state != SEEKING)) {
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
_sawSeekNotify = false;
} else if (playheadTime != _cachedPlayheadTime) {
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
_sawSeekNotify = false;
setStateFromCachedState();
doUpdateTime();
}
}
function httpDoStopAtEnd() {
_atEnd = true;
if ((_streamLength == null) || (_streamLength <= 0)) {
_streamLength = _ns.time;
}
_pause(true);
setState(STOPPED);
if (_state != STOPPED) {
return(undefined);
}
doUpdateTime();
if (_state != STOPPED) {
return(undefined);
}
dispatchEvent({type:"complete", state:_state, playheadTime:playheadTime});
if (_state != STOPPED) {
return(undefined);
}
if (_autoRewind) {
_atEnd = false;
_pause(true);
_seek(0);
setState(REWINDING);
}
}
function httpDoSeek() {
var _local2 = (_state == REWINDING) || (_state == SEEKING);
if ((_local2 && (_httpDoSeekCount < HTTP_DO_SEEK_MAX_COUNT)) && ((_cachedPlayheadTime == playheadTime) || (_invalidSeekTime))) {
_httpDoSeekCount++;
return(undefined);
}
_httpDoSeekCount = 0;
clearInterval(_httpDoSeekIntervalID);
_httpDoSeekIntervalID = 0;
if (!_local2) {
return(undefined);
}
setStateFromCachedState();
if (_invalidSeekTime) {
_invalidSeekTime = false;
_invalidSeekRecovery = true;
seek(playheadTime);
} else {
doUpdateTime();
}
}
function closeNS(updateCurrentPos) {
if ((_ns != null) && (_ns != undefined)) {
if (updateCurrentPos) {
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = 0;
doUpdateTime();
_currentPos = _ns.time;
}
delete _ns.onStatus;
_ns.onStatus = null;
_ns.close();
_ns = null;
}
}
function doDelayedBuffering() {
switch (_state) {
case LOADING :
case RESIZING :
break;
case PLAYING :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
setState(BUFFERING);
break;
default :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
}
}
function _pause(doPause) {
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
_ns.pause(doPause);
}
function _play() {
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
_startingPlay = true;
switch (arguments.length) {
case 0 :
_ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : 0), -1);
break;
case 1 :
_ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : (arguments[0])), -1);
break;
case 2 :
_ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : (arguments[0])), arguments[1]);
break;
default :
throw new Error("bad args to _play");
}
}
function _seek(time) {
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
if ((_metadata.audiodelay != undefined) && ((time + _metadata.audiodelay) < _streamLength)) {
time = time + _metadata.audiodelay;
}
_ns.seek(time);
_invalidSeekTime = false;
_bufferState = BUFFER_EMPTY;
_sawPlayStop = false;
_sawSeekNotify = false;
}
function isXnOK() {
if (_state == LOADING) {
return(true);
}
if (_state == CONNECTION_ERROR) {
return(false);
}
if (_state != DISCONNECTED) {
if (((_ncMgr == null) || (_ncMgr.getNetConnection() == null)) || (!_ncMgr.getNetConnection().isConnected)) {
setState(DISCONNECTED);
return(false);
}
return(true);
}
return(false);
}
function startAutoResize() {
switch (_state) {
case DISCONNECTED :
case CONNECTION_ERROR :
return(undefined);
}
_autoResizeDone = false;
if ((stateResponsive && (_videoWidth != undefined)) && (_videoHeight != undefined)) {
doAutoResize();
} else {
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = setInterval(this, "doAutoResize", AUTO_RESIZE_INTERVAL);
}
}
function doAutoResize() {
if (_autoResizeIntervalID > 0) {
switch (_state) {
case RESIZING :
case LOADING :
break;
case DISCONNECTED :
case CONNECTION_ERROR :
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = 0;
return(undefined);
default :
if (stateResponsive) {
break;
}
return(undefined);
}
if (((((_video.width != _prevVideoWidth) || (_video.height != _prevVideoHeight)) || (_bufferState == BUFFER_FULL)) || (_bufferState == BUFFER_FLUSH)) || (_ns.time > AUTO_RESIZE_PLAYHEAD_TIMEOUT)) {
if ((_hiddenForResize && (_metadata == null)) && (_hiddenForResizeMetadataDelay < AUTO_RESIZE_METADATA_DELAY_MAX)) {
_hiddenForResizeMetadataDelay++;
return(undefined);
}
_videoWidth = _video.width;
_videoHeight = _video.height;
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = 0;
} else {
return(undefined);
}
}
if (((!_autoSize) && (!_aspectRatio)) || (_autoResizeDone)) {
setState(_cachedState);
return(undefined);
}
_autoResizeDone = true;
if (_autoSize) {
_video._width = _videoWidth;
_video._height = _videoHeight;
} else if (_aspectRatio) {
var _local3 = (_videoWidth * height) / _videoHeight;
var _local2 = (_videoHeight * width) / _videoWidth;
if (_local2 < height) {
_video._height = _local2;
} else if (_local3 < width) {
_video._width = _local3;
}
}
if (_hiddenForResize) {
_hiddenRewindPlayheadTime = playheadTime;
if (_state == LOADING) {
_cachedState = PLAYING;
}
if (!_ncMgr.isRTMP()) {
_pause(true);
_seek(0);
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = setInterval(this, "finishAutoResize", FINISH_AUTO_RESIZE_INTERVAL);
} else if (!_isLive) {
_currentPos = 0;
_play(0, 0);
setState(RESIZING);
} else if (_autoPlay) {
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = setInterval(this, "finishAutoResize", FINISH_AUTO_RESIZE_INTERVAL);
} else {
finishAutoResize();
}
} else {
dispatchEvent({type:"resize", x:_x, y:_y, width:_width, height:_height});
}
}
function finishAutoResize() {
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = 0;
if (stateResponsive) {
return(undefined);
}
_visible = __visible;
_sound.setVolume(_volume);
_hiddenForResize = false;
dispatchEvent({type:"resize", x:_x, y:_y, width:_width, height:_height});
if (_autoPlay) {
if (_ncMgr.isRTMP()) {
if (!_isLive) {
_currentPos = 0;
_play(0);
}
if (_state == RESIZING) {
setState(LOADING);
_cachedState = PLAYING;
}
} else {
_pause(false);
_cachedState = PLAYING;
}
} else {
setState(STOPPED);
}
}
function _createStream() {
_ns = new NetStream(_ncMgr.getNetConnection());
_ns.mc = this;
if (_ncMgr.isRTMP()) {
_ns.onStatus = function (info) {
this.mc.rtmpOnStatus(info);
};
} else {
_ns.onStatus = function (info) {
this.mc.httpOnStatus(info);
};
}
_ns.onMetaData = function (info) {
this.mc.onMetaData(info);
};
_ns.onCuePoint = function (info) {
this.mc.onCuePoint(info);
};
_ns.setBufferTime(_bufferTime);
}
function _setUpStream() {
_video.attachVideo(_ns);
attachAudio(_ns);
if ((!isNaN(_ncMgr.getStreamLength())) && (_ncMgr.getStreamLength() >= 0)) {
_streamLength = _ncMgr.getStreamLength();
}
if ((!isNaN(_ncMgr.getStreamWidth())) && (_ncMgr.getStreamWidth() >= 0)) {
_videoWidth = _ncMgr.getStreamWidth();
} else {
_videoWidth = undefined;
}
if ((!isNaN(_ncMgr.getStreamHeight())) && (_ncMgr.getStreamHeight() >= 0)) {
_videoHeight = _ncMgr.getStreamHeight();
} else {
_videoHeight = undefined;
}
if (((_autoSize || (_aspectRatio)) && (_videoWidth != undefined)) && (_videoHeight != undefined)) {
_prevVideoWidth = undefined;
_prevVideoHeight = undefined;
doAutoResize();
}
if (((!_autoSize) && (!_aspectRatio)) || ((_videoWidth != undefined) && (_videoHeight != undefined))) {
if (_autoPlay) {
if (!_ncMgr.isRTMP()) {
_cachedState = BUFFERING;
_play();
} else if (_isLive) {
_cachedState = BUFFERING;
_play(-1);
} else {
_cachedState = BUFFERING;
_play(0);
}
} else {
_cachedState = STOPPED;
if (_ncMgr.isRTMP()) {
_play(0, 0);
} else {
_play();
_pause(true);
_seek(0);
}
}
} else {
if (!_hiddenForResize) {
__visible = _visible;
_visible = false;
_volume = _sound.getVolume();
_sound.setVolume(0);
_hiddenForResize = true;
}
_hiddenForResizeMetadataDelay = 0;
_play(0);
if (_currentPos > 0) {
_seek(_currentPos);
_currentPos = 0;
}
}
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = setInterval(this, "doAutoResize", AUTO_RESIZE_INTERVAL);
}
function doIdleTimeout() {
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = 0;
close();
}
function flushQueuedCmds() {
while (_cmdQueue.length > 0) {
_cmdQueue.pop();
}
}
function execQueuedCmds() {
while (((_cmdQueue.length > 0) && (stateResponsive || (_state == CONNECTION_ERROR))) && ((_cmdQueue[0].url != null) || ((_state != DISCONNECTED) && (_state != CONNECTION_ERROR)))) {
var _local2 = _cmdQueue.shift();
_cachedState = _state;
_state = EXEC_QUEUED_CMD;
switch (_local2.type) {
case PLAY :
play(_local2.url, _local2.isLive, _local2.time);
break;
case LOAD :
load(_local2.url, _local2.isLive, _local2.time);
break;
case PAUSE :
pause();
break;
case STOP :
stop();
break;
case SEEK :
seek(_local2.time);
}
}
}
function queueCmd(type, url, isLive, time) {
_cmdQueue.push({type:type, url:url, isLive:isLive, time:time});
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
static var DISCONNECTED = "disconnected";
static var STOPPED = "stopped";
static var PLAYING = "playing";
static var PAUSED = "paused";
static var BUFFERING = "buffering";
static var LOADING = "loading";
static var CONNECTION_ERROR = "connectionError";
static var REWINDING = "rewinding";
static var SEEKING = "seeking";
static var RESIZING = "resizing";
static var EXEC_QUEUED_CMD = "execQueuedCmd";
static var BUFFER_EMPTY = "bufferEmpty";
static var BUFFER_FULL = "bufferFull";
static var BUFFER_FLUSH = "bufferFlush";
static var DEFAULT_INCMANAGER = "mx.video.NCManager";
static var DEFAULT_UPDATE_TIME_INTERVAL = 250;
static var DEFAULT_UPDATE_PROGRESS_INTERVAL = 250;
static var DEFAULT_IDLE_TIMEOUT_INTERVAL = 300000;
static var AUTO_RESIZE_INTERVAL = 100;
static var AUTO_RESIZE_PLAYHEAD_TIMEOUT = 0.5;
static var AUTO_RESIZE_METADATA_DELAY_MAX = 5;
static var FINISH_AUTO_RESIZE_INTERVAL = 250;
static var RTMP_DO_STOP_AT_END_INTERVAL = 500;
static var RTMP_DO_SEEK_INTERVAL = 100;
static var HTTP_DO_SEEK_INTERVAL = 250;
static var HTTP_DO_SEEK_MAX_COUNT = 4;
static var CLOSE_NS_INTERVAL = 0.25;
static var HTTP_DELAYED_BUFFERING_INTERVAL = 100;
static var PLAY = 0;
static var LOAD = 1;
static var PAUSE = 2;
static var STOP = 3;
static var SEEK = 4;
}
Symbol 1636 MovieClip [__Packages.mx.video.INCManager] Frame 0
interface mx.video.INCManager
{
}
Symbol 1637 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 1638 MovieClip [__Packages.mx.video.VideoError] Frame 0
class mx.video.VideoError extends Error
{
var _code, message, name;
function VideoError (errCode, msg) {
super();
_code = errCode;
message = ((("" + errCode) + ": ") + ERROR_MSG[errCode - BASE_ERROR_CODE]) + ((msg == undefined) ? "" : (": " + msg));
name = "VideoError";
}
function get code() {
return(_code);
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
static var BASE_ERROR_CODE = 1000;
static var NO_CONNECTION = 1000;
static var NO_CUE_POINT_MATCH = 1001;
static var ILLEGAL_CUE_POINT = 1002;
static var INVALID_SEEK = 1003;
static var INVALID_CONTENT_PATH = 1004;
static var INVALID_XML = 1005;
static var NO_BITRATE_MATCH = 1006;
static var DELETE_DEFAULT_PLAYER = 1007;
static var ERROR_MSG = ["Unable to make connection to server or to find FLV on server", "No matching cue point found", "Illegal cue point", "Invalid seek", "Invalid contentPath", "Invalid xml", "No bitrate match, must be no default flv", "Cannot delete default VideoPlayer"];
}
Symbol 1639 MovieClip [__Packages.mx.video.NCManager] Frame 0
class mx.video.NCManager implements mx.video.INCManager
{
var _timeoutIntervalId, _tryNCIntervalId, _timeout, _nc, _ncConnected, _isRTMP, _serverName, _wrappedURL, _portNumber, _appName, _contentPath, _streamName, _streamLength, _streamWidth, _streamHeight, _streams, _autoSenseBW, fpadZone, _payload, _connTypeCounter, _bitrate, _owner, _protocol, _smilMgr, _ncUri, _fpadMgr, fallbackServerName, _tryNC;
function NCManager () {
initNCInfo();
initOtherInfo();
_timeoutIntervalId = 0;
_tryNCIntervalId = 0;
_timeout = DEFAULT_TIMEOUT;
_nc = undefined;
_ncConnected = false;
}
function initNCInfo() {
_isRTMP = undefined;
_serverName = undefined;
_wrappedURL = undefined;
_portNumber = undefined;
_appName = undefined;
}
function initOtherInfo() {
_contentPath = undefined;
_streamName = undefined;
_streamLength = undefined;
_streamWidth = undefined;
_streamHeight = undefined;
_streams = undefined;
_autoSenseBW = false;
fpadZone = undefined;
_payload = 0;
_connTypeCounter = 0;
cleanConns();
}
function getTimeout() {
return(_timeout);
}
function setTimeout(t) {
_timeout = t;
if (_timeoutIntervalId != 0) {
clearInterval(_timeoutIntervalId);
_timeoutIntervalId = setInterval(this, "_onFCSConnectTimeOut", _timeout);
}
}
function getBitrate() {
return(_bitrate);
}
function setBitrate(b) {
if ((_isRTMP == undefined) || (!_isRTMP)) {
_bitrate = b;
}
}
function getVideoPlayer() {
return(_owner);
}
function setVideoPlayer(v) {
_owner = v;
}
function getNetConnection() {
return(_nc);
}
function getStreamName() {
return(_streamName);
}
function isRTMP() {
return(_isRTMP);
}
function getStreamLength() {
return(_streamLength);
}
function getStreamWidth() {
return(_streamWidth);
}
function getStreamHeight() {
return(_streamHeight);
}
function connectToURL(url) {
initOtherInfo();
_contentPath = url;
if ((_contentPath == null) || (_contentPath == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH);
}
var _local2 = parseURL(_contentPath);
if ((_local2.streamName == undefined) || (_local2.streamName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
if (_local2.isRTMP) {
var _local4 = canReuseOldConnection(_local2);
_isRTMP = true;
_protocol = _local2.protocol;
_streamName = _local2.streamName;
_serverName = _local2.serverName;
_wrappedURL = _local2.wrappedURL;
_portNumber = _local2.portNumber;
_appName = _local2.appName;
if ((((_appName == undefined) || (_appName == "")) || (_streamName == undefined)) || (_streamName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
_autoSenseBW = _streamName.indexOf(",") >= 0;
return(_local4 || (connectRTMP()));
}
var _local3 = _local2.streamName;
if ((((_local3.indexOf("?") < 0) && ((_local3.length < 4) || (_local3.slice(-4).toLowerCase() != ".txt"))) && ((_local3.length < 4) || (_local3.slice(-4).toLowerCase() != ".xml"))) && ((_local3.length < 5) || (_local3.slice(-5).toLowerCase() != ".smil"))) {
var _local4 = canReuseOldConnection(_local2);
_isRTMP = false;
_streamName = _local3;
return(_local4 || (connectHTTP()));
}
if (_local3.indexOf("/fms/fpad") >= 0) {
try {
return(connectFPAD(_local3));
} catch(err:Error) {
}
}
_smilMgr = new mx.video.SMILManager(this);
return(_smilMgr.connectXML(_local3));
}
function connectAgain() {
var _local2 = _appName.indexOf("/");
if (_local2 < 0) {
_local2 = _streamName.indexOf("/");
if (_local2 >= 0) {
_appName = _appName + "/";
_appName = _appName + _streamName.slice(0, _local2);
_streamName = _streamName.slice(_local2 + 1);
}
return(false);
}
var _local3 = _appName.slice(_local2 + 1);
_local3 = _local3 + "/";
_local3 = _local3 + _streamName;
_streamName = _local3;
_appName = _appName.slice(0, _local2);
close();
_payload = 0;
_connTypeCounter = 0;
cleanConns();
connectRTMP();
return(true);
}
function reconnect() {
if (!_isRTMP) {
throw new Error("Cannot call reconnect on an http connection");
}
_nc.onStatus = function (info) {
this.mc.reconnectOnStatus(this, info);
};
_nc.onBWDone = function () {
this.mc.onReconnected();
};
_nc.connect(_ncUri, false);
}
function onReconnected() {
delete _nc.onStatus;
delete _nc.onBWDone;
_ncConnected = true;
_owner.ncReconnected();
}
function close() {
if (_nc) {
_nc.close();
_ncConnected = false;
}
}
function helperDone(helper, success) {
if (!success) {
_nc = undefined;
_ncConnected = false;
_owner.ncConnected();
_smilMgr = undefined;
_fpadMgr = undefined;
return(undefined);
}
var _local2;
var _local4;
if (helper == _fpadMgr) {
_local4 = _fpadMgr.rtmpURL;
_fpadMgr = undefined;
_local2 = parseURL(_local4);
_isRTMP = _local2.isRTMP;
_protocol = _local2.protocol;
_serverName = _local2.serverName;
_portNumber = _local2.portNumber;
_wrappedURL = _local2.wrappedURL;
_appName = _local2.appName;
_streamName = _local2.streamName;
var _local5 = fpadZone;
fpadZone = -1;
connectRTMP();
fpadZone = _local5;
return(undefined);
}
if (helper != _smilMgr) {
return(undefined);
}
_streamWidth = _smilMgr.width;
_streamHeight = _smilMgr.height;
_local4 = _smilMgr.baseURLAttr[0];
if ((_local4 != undefined) && (_local4 != "")) {
if (_local4.charAt(_local4.length - 1) != "/") {
_local4 = _local4 + "/";
}
_local2 = parseURL(_local4);
_isRTMP = _local2.isRTMP;
_streamName = _local2.streamName;
if (_isRTMP) {
_protocol = _local2.protocol;
_serverName = _local2.serverName;
_portNumber = _local2.portNumber;
_wrappedURL = _local2.wrappedURL;
_appName = _local2.appName;
if ((_appName == undefined) || (_appName == "")) {
_smilMgr = undefined;
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Base RTMP URL must include application name: " + _local4);
}
if (_smilMgr.baseURLAttr.length > 1) {
_local2 = parseURL(_smilMgr.baseURLAttr[1]);
if (_local2.serverName != undefined) {
fallbackServerName = _local2.serverName;
}
}
}
}
_streams = _smilMgr.videoTags;
_smilMgr = undefined;
var _local3 = 0;
while (_local3 < _streams.length) {
_local4 = _streams[_local3].src;
_local2 = parseURL(_local4);
if (_isRTMP == undefined) {
_isRTMP = _local2.isRTMP;
if (_isRTMP) {
_protocol = _local2.protocol;
if (_streams.length > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Cannot switch between multiple absolute RTMP URLs, must use meta tag base attribute.");
}
_serverName = _local2.serverName;
_portNumber = _local2.portNumber;
_wrappedURL = _local2.wrappedURL;
_appName = _local2.appName;
if ((_appName == undefined) || (_appName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Base RTMP URL must include application name: " + _local4);
}
} else if ((_local2.streamName.indexOf("/fms/fpad") >= 0) && (_streams.length > 1)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Cannot switch between multiple absolute fpad URLs, must use meta tag base attribute.");
}
} else if ((((_streamName != undefined) && (_streamName != "")) && (!_local2.isRelative)) && (_streams.length > 1)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes.");
}
_streams[_local3].parseResults = _local2;
_local3++;
}
_autoSenseBW = _streams.length > 1;
if (!_autoSenseBW) {
if (_streamName != undefined) {
_streamName = _streamName + _streams[0].parseResults.streamName;
} else {
_streamName = _streams[0].parseResults.streamName;
}
_streamLength = _streams[0].dur;
}
if (_isRTMP) {
connectRTMP();
} else if ((_streamName != undefined) && (_streamName.indexOf("/fms/fpad") >= 0)) {
connectFPAD(_streamName);
} else {
if (_autoSenseBW) {
bitrateMatch();
}
connectHTTP();
_owner.ncConnected();
}
}
function bitrateMatch() {
var _local3;
var _local4 = _bitrate;
if (isNaN(_local4)) {
_local4 = 0;
}
var _local2 = 0;
while (_local2 < _streams.length) {
if (isNaN(_streams[_local2].bitrate) || (_local4 >= _streams[_local2].bitrate)) {
_local3 = _local2;
break;
}
_local2++;
}
if (isNaN(_local3)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_BITRATE_MATCH);
}
if (_streamName != undefined) {
_streamName = _streamName + _streams[_local3].src;
} else {
_streamName = _streams[_local3].src;
}
if (_isRTMP && (_streamName.slice(-4).toLowerCase() == ".flv")) {
_streamName = _streamName.slice(0, -4);
}
_streamLength = _streams[_local3].dur;
}
function parseURL(url) {
var _local2 = new Object();
var _local3 = 0;
var _local4 = url.indexOf(":/", _local3);
if (_local4 >= 0) {
_local4 = _local4 + 2;
_local2.protocol = url.slice(_local3, _local4);
_local2.isRelative = false;
} else {
_local2.isRelative = true;
}
if ((_local2.protocol != undefined) && (((((_local2.protocol == "rtmp:/") || (_local2.protocol == "rtmpt:/")) || (_local2.protocol == "rtmps:/")) || (_local2.protocol == "rtmpe:/")) || (_local2.protocol == "rtmpte:/"))) {
_local2.isRTMP = true;
_local3 = _local4;
if (url.charAt(_local3) == "/") {
_local3++;
var _local7 = url.indexOf(":", _local3);
var _local8 = url.indexOf("/", _local3);
if (_local8 < 0) {
if (_local7 < 0) {
_local2.serverName = url.slice(_local3);
} else {
_local4 = _local7;
_local2.portNumber = url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local2.serverName = url.slice(_local3);
}
return(_local2);
}
if ((_local7 >= 0) && (_local7 < _local8)) {
_local4 = _local7;
_local2.serverName = url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local4 = _local8;
_local2.portNumber = url.slice(_local3, _local4);
} else {
_local4 = _local8;
_local2.serverName = url.slice(_local3, _local4);
}
_local3 = _local4 + 1;
}
if (url.charAt(_local3) == "?") {
var _local9 = url.slice(_local3 + 1);
var _local6 = parseURL(_local9);
if ((_local6.protocol == undefined) || (!_local6.isRTMP)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
_local2.wrappedURL = "?";
_local2.wrappedURL = _local2.wrappedURL + _local6.protocol;
if (_local6.serverName != undefined) {
_local2.wrappedURL = _local2.wrappedURL + "/";
_local2.wrappedURL = _local2.wrappedURL + _local6.serverName;
}
if (_local6.wrappedURL != undefined) {
_local2.wrappedURL = _local2.wrappedURL + "/?";
_local2.wrappedURL = _local2.wrappedURL + _local6.wrappedURL;
}
_local2.appName = _local6.appName;
_local2.streamName = _local6.streamName;
return(_local2);
}
_local4 = url.indexOf("/", _local3);
if (_local4 < 0) {
_local2.appName = url.slice(_local3);
return(_local2);
}
_local2.appName = url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local4 = url.indexOf("/", _local3);
if (_local4 < 0) {
_local2.streamName = url.slice(_local3);
if (_local2.streamName.slice(-4).toLowerCase() == ".flv") {
_local2.streamName = _local2.streamName.slice(0, -4);
}
return(_local2);
}
_local2.appName = _local2.appName + "/";
_local2.appName = _local2.appName + url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local2.streamName = url.slice(_local3);
if (_local2.streamName.slice(-4).toLowerCase() == ".flv") {
_local2.streamName = _local2.streamName.slice(0, -4);
}
} else {
_local2.isRTMP = false;
_local2.streamName = url;
}
return(_local2);
}
function canReuseOldConnection(parseResults) {
if ((_nc == null) || (!_ncConnected)) {
return(false);
}
if (!parseResults.isRTMP) {
if (!_isRTMP) {
return(true);
}
_owner.close();
_nc = undefined;
_ncConnected = false;
initNCInfo();
return(false);
}
if (_isRTMP) {
if (((((parseResults.serverName == _serverName) && (parseResults.appName == _appName)) && (parseResults.protocol == _protocol)) && (parseResults.portNumber == _portNumber)) && (parseResults.wrappedURL == _wrappedURL)) {
return(true);
}
_owner.close();
_nc = undefined;
_ncConnected = false;
}
initNCInfo();
return(false);
}
function connectHTTP() {
_nc = new NetConnection();
_nc.connect(null);
_ncConnected = true;
return(true);
}
function connectRTMP() {
clearInterval(_timeoutIntervalId);
_timeoutIntervalId = setInterval(this, "_onFCSConnectTimeOut", _timeout);
_tryNC = new Array();
var _local3 = (((_protocol == "rtmp:/") || (_protocol == "rtmpe:/")) ? 2 : 1);
var _local2 = 0;
while (_local2 < _local3) {
_tryNC[_local2] = new NetConnection();
if (fpadZone != null) {
_tryNC[_local2].fpadZone = fpadZone;
}
_tryNC[_local2].mc = this;
_tryNC[_local2].pending = false;
_tryNC[_local2].connIndex = _local2;
_tryNC[_local2].onBWDone = function (p_bw) {
this.mc.onConnected(this, p_bw);
};
_tryNC[_local2].onBWCheck = function () {
return(++this.mc._payload);
};
_tryNC[_local2].onStatus = function (info) {
this.mc.connectOnStatus(this, info);
};
_local2++;
}
nextConnect();
return(false);
}
function connectFPAD(url) {
var _local7;
var _local5;
var _local6;
var _local2 = url.indexOf("?");
while (_local2 >= 0) {
_local2++;
var _local4 = url.indexOf("&", _local2);
if (url.substr(_local2, 4).toLowerCase() == "uri=") {
_local7 = url.slice(0, _local2);
_local2 = _local2 + 4;
if (_local4 >= 0) {
_local5 = url.slice(_local2, _local4);
_local6 = url.slice(_local4);
} else {
_local5 = url.slice(_local2);
_local6 = "";
}
break;
}
_local2 = _local4;
}
if (_local2 < 0) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, "fpad url must include uri parameter: " + url);
}
var _local8 = parseURL(_local5);
if (!_local8.isRTMP) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, "fpad url uri parameter must be rtmp url: " + url);
}
_fpadMgr = new mx.video.FPADManager(this);
return(_fpadMgr.connectXML(_local7, _local5, _local6, _local8));
}
function nextConnect() {
clearInterval(_tryNCIntervalId);
_tryNCIntervalId = 0;
var _local3;
var _local2;
if (_connTypeCounter == 0) {
_local3 = _protocol;
_local2 = _portNumber;
} else {
_local2 = null;
if (_protocol == "rtmp:/") {
_local3 = "rtmpt:/";
} else if (_protocol == "rtmpe:/") {
_local3 = "rtmpte:/";
} else {
_tryNC.pop();
return(undefined);
}
}
var _local4 = ((_local3 + ((_serverName == undefined) ? "" : ((("/" + _serverName) + ((_local2 == null) ? "" : (":" + _local2))) + "/"))) + ((_wrappedURL == undefined) ? "" : (_wrappedURL + "/"))) + _appName;
_tryNC[_connTypeCounter].pending = true;
_tryNC[_connTypeCounter].connect(_local4, _autoSenseBW);
if (_connTypeCounter < (_tryNC.length - 1)) {
_connTypeCounter++;
_tryNCIntervalId = setInterval(this, "nextConnect", 1500);
}
}
function cleanConns() {
clearInterval(_tryNCIntervalId);
_tryNCIntervalId = 0;
if (_tryNC != undefined) {
var _local2 = 0;
while (_local2 < _tryNC.length) {
if (_tryNC[_local2] != undefined) {
delete _tryNC[_local2].onStatus;
if (_tryNC[_local2].pending) {
_tryNC[_local2].onStatus = function (info) {
this.mc.disconnectOnStatus(this, info);
};
} else {
delete _tryNC[_local2].onStatus;
_tryNC[_local2].close();
}
}
delete _tryNC[_local2];
_local2++;
}
delete _tryNC;
}
}
function tryFallBack() {
if (((_serverName == fallbackServerName) || (fallbackServerName == undefined)) || (fallbackServerName == null)) {
delete _nc;
_nc = undefined;
_ncConnected = false;
_owner.ncConnected();
} else {
_connTypeCounter = 0;
cleanConns();
_serverName = fallbackServerName;
connectRTMP();
}
}
function onConnected(p_nc, p_bw) {
clearInterval(_timeoutIntervalId);
_timeoutIntervalId = 0;
delete p_nc.onBWDone;
delete p_nc.onBWCheck;
delete p_nc.onStatus;
_nc = p_nc;
_ncUri = _nc.uri;
_ncConnected = true;
if (_autoSenseBW) {
_bitrate = p_bw * 1024;
if (_streams != undefined) {
bitrateMatch();
} else {
var _local3 = _streamName.split(",");
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = stripFrontAndBackWhiteSpace(_local3[_local2]);
if ((_local2 + 1) < _local3.length) {
if (p_bw <= Number(_local3[_local2 + 1])) {
_streamName = _local4;
break;
}
} else {
_streamName = _local4;
break;
}
_local2 = _local2 + 2;
}
if (_streamName.slice(-4).toLowerCase() == ".flv") {
_streamName = _streamName.slice(0, -4);
}
}
}
if ((!_owner.__get__isLive()) && (_streamLength == undefined)) {
var _local6 = new Object();
_local6.mc = this;
_local6.onResult = function (length) {
this.mc.getStreamLengthResult(length);
};
_nc.call("getStreamLength", _local6, _streamName);
} else {
_owner.ncConnected();
}
}
function connectOnStatus(target, info) {
target.pending = false;
if (info.code == "NetConnection.Connect.Success") {
_nc = _tryNC[target.connIndex];
_tryNC[target.connIndex] = undefined;
cleanConns();
} else if (((info.code == "NetConnection.Connect.Rejected") && (info.ex != null)) && (info.ex.code == 302)) {
_connTypeCounter = 0;
cleanConns();
var _local2 = parseURL(info.ex.redirect);
if (_local2.isRTMP) {
_protocol = _local2.protocol;
_serverName = _local2.serverName;
_wrappedURL = _local2.wrappedURL;
_portNumber = _local2.portNumber;
_appName = _local2.appName;
if (_local2.streamName != null) {
_appName = _appName + ("/" + _local2.streamName);
}
connectRTMP();
} else {
tryFallBack();
}
} else if (((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) && (target.connIndex == (_tryNC.length - 1))) {
if (!connectAgain()) {
tryFallBack();
}
}
}
function reconnectOnStatus(target, info) {
if ((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) {
delete _nc;
_nc = undefined;
_ncConnected = false;
_owner.ncReconnected();
}
}
function disconnectOnStatus(target, info) {
if (info.code == "NetConnection.Connect.Success") {
delete target.onStatus;
target.close();
}
}
function getStreamLengthResult(length) {
if (length > 0) {
_streamLength = length;
}
_owner.ncConnected();
}
function _onFCSConnectTimeOut() {
cleanConns();
_nc = undefined;
_ncConnected = false;
if (!connectAgain()) {
_owner.ncConnected();
}
}
static function stripFrontAndBackWhiteSpace(p_str) {
var _local1;
var _local2 = p_str.length;
var _local4 = 0;
var _local5 = _local2;
_local1 = 0;
while (_local1 < _local2) {
switch (p_str.charCodeAt(_local1)) {
case 9 :
case 10 :
case 13 :
case 32 :
break;
default :
_local4 = _local1;
break;!//outer level
}
_local1++;
}
_local1 = _local2;
while (_local1 >= 0) {
switch (p_str.charCodeAt(_local1)) {
case 9 :
case 10 :
case 13 :
case 32 :
break;
default :
_local5 = _local1 + 1;
break;!//outer level
}
_local1--;
}
if (_local5 <= _local4) {
return("");
}
return(p_str.slice(_local4, _local5));
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
var DEFAULT_TIMEOUT = 60000;
}
Symbol 1640 MovieClip [__Packages.mx.video.SMILManager] Frame 0
class mx.video.SMILManager
{
var _owner, _url, xml, baseURLAttr, videoTags, width, height;
function SMILManager (owner) {
_owner = owner;
}
function connectXML(url) {
_url = fixURL(url);
xml = new XML();
xml.onLoad = mx.utils.Delegate.create(this, xmlOnLoad);
xml.load(_url);
return(false);
}
function fixURL(origURL) {
if ((origURL.substr(0, 5).toLowerCase() == "http:") || (origURL.substr(0, 6).toLowerCase() == "https:")) {
var _local2 = ((origURL.indexOf("?") >= 0) ? "&" : "?");
return(((origURL + _local2) + "FLVPlaybackVersion=") + shortVersion);
}
return(origURL);
}
function xmlOnLoad(success) {
try {
if (!success) {
_owner.helperDone(this, false);
} else {
baseURLAttr = new Array();
videoTags = new Array();
var _local2 = xml.firstChild;
var _local6 = false;
while (_local2 != null) {
if (_local2.nodeType == ELEMENT_NODE) {
_local6 = true;
if (_local2.nodeName.toLowerCase() == "smil") {
break;
}
}
_local2 = _local2.nextSibling;
}
if (!_local6) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" No root node found; if url is for an flv it must have .flv extension and take no parameters");
} else if (_local2 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Root node not smil");
}
var _local5 = false;
var _local4 = 0;
while (_local4 < _local2.childNodes.length) {
var _local3 = _local2.childNodes[_local4];
if (_local3.nodeType != ELEMENT_NODE) {
} else if (_local3.nodeName.toLowerCase() == "head") {
parseHead(_local3);
} else if (_local3.nodeName.toLowerCase() == "body") {
_local5 = true;
parseBody(_local3);
} else {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((((("URL: \"" + _url) + "\" Tag ") + _local3.nodeName) + " not supported in ") + _local2.nodeName) + " tag.");
}
_local4++;
}
if (!_local5) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Tag body is required.");
}
_owner.helperDone(this, true);
}
} catch(err:Error) {
_owner.helperDone(this, false);
throw err;
}
}
function parseHead(parentNode) {
var _local4 = false;
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else if (_local2.nodeName.toLowerCase() == "meta") {
for (var _local6 in _local2.attributes) {
if (_local6.toLowerCase() == "base") {
baseURLAttr.push(_local2.attributes[_local6]);
} else {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((((("URL: \"" + _url) + "\" Attribute ") + _local6) + " not supported in ") + _local2.nodeName) + " tag.");
}
}
} else if (_local2.nodeName.toLowerCase() == "layout") {
if (!_local4) {
parseLayout(_local2);
_local4 = true;
}
}
_local3++;
}
}
function parseLayout(parentNode) {
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else if (_local2.nodeName.toLowerCase() == "root-layout") {
for (var _local5 in _local2.attributes) {
if (_local5.toLowerCase() == "width") {
width = Number(_local2.attributes[_local5]);
} else if (_local5.toLowerCase() == "height") {
height = Number(_local2.attributes[_local5]);
}
}
if (((isNaN(width) || (width < 0)) || (isNaN(height))) || (height < 0)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Tag ") + _local2.nodeName) + " requires attributes id, width and height. Width and height must be numbers greater than or equal to 0.");
}
width = Math.round(width);
height = Math.round(height);
return(undefined);
}
_local3++;
}
}
function parseBody(parentNode) {
var _local6 = 0;
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else {
_local6++;
if (_local6 > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Tag ") + parentNode.nodeName) + " is required to contain exactly one tag.");
}
if (_local2.nodeName.toLowerCase() == "switch") {
parseSwitch(_local2);
} else if ((_local2.nodeName.toLowerCase() == "video") || (_local2.nodeName.toLowerCase() == "ref")) {
var _local5 = parseVideo(_local2);
videoTags.push(_local5);
}
}
_local3++;
}
if (videoTags.length < 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" At least one video of ref tag is required.");
}
}
function parseSwitch(parentNode) {
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else if ((_local2.nodeName.toLowerCase() == "video") || (_local2.nodeName.toLowerCase() == "ref")) {
videoTags.push(parseVideo(_local2));
}
_local3++;
}
}
function parseVideo(node) {
var _local3 = new Object();
for (var _local4 in node.attributes) {
if (_local4.toLowerCase() == "src") {
_local3.src = node.attributes[_local4];
} else if (_local4.toLowerCase() == "system-bitrate") {
_local3.bitrate = Number(node.attributes[_local4]);
} else if (_local4.toLowerCase() == "dur") {
_local3.dur = parseTime(node.attributes[_local4]);
}
}
if (_local3.src == undefined) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Attribute src is required in ") + node.nodeName) + " tag.");
}
return(_local3);
}
function parseTime(timeStr) {
var _local4 = 0;
var _local3 = timeStr.split(":");
if ((_local3.length < 1) || (_local3.length > 3)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Invalid dur value: " + timeStr);
}
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = Number(_local3[_local1]);
if (isNaN(_local2)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Invalid dur value: " + timeStr);
}
_local4 = _local4 * 60;
_local4 = _local4 + _local2;
_local1++;
}
return(_local4);
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
static var ELEMENT_NODE = 1;
}
Symbol 1641 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 1642 MovieClip [__Packages.mx.video.FPADManager] Frame 0
class mx.video.FPADManager
{
var _owner, _uriParam, _parseResults, _url, xml, rtmpURL;
function FPADManager (owner) {
_owner = owner;
}
function connectXML(urlPrefix, uriParam, urlSuffix, uriParamParseResults) {
_uriParam = uriParam;
_parseResults = uriParamParseResults;
_url = (urlPrefix + "uri=") + _parseResults.protocol;
if (_parseResults.serverName != undefined) {
_url = _url + ("/" + _parseResults.serverName);
}
if (_parseResults.portNumber != undefined) {
_url = _url + (":" + _parseResults.portNumber);
}
if (_parseResults.wrappedURL != undefined) {
_url = _url + ("/?" + _parseResults.wrappedURL);
}
_url = _url + ("/" + _parseResults.appName);
_url = _url + urlSuffix;
xml = new XML();
xml.onLoad = mx.utils.Delegate.create(this, xmlOnLoad);
xml.load(_url);
return(false);
}
function xmlOnLoad(success) {
try {
if (!success) {
_owner.helperDone(this, false);
} else {
var _local5 = xml.firstChild;
var _local8 = false;
while (_local5 != null) {
if (_local5.nodeType == ELEMENT_NODE) {
_local8 = true;
if (_local5.nodeName.toLowerCase() == "fpad") {
break;
}
}
_local5 = _local5.nextSibling;
}
if (!_local8) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" No root node found; if url is for an flv it must have .flv extension and take no parameters");
} else if (_local5 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Root node not fpad");
}
var _local7;
var _local6 = 0;
while (_local6 < _local5.childNodes.length) {
var _local3 = _local5.childNodes[_local6];
if (_local3.nodeType != ELEMENT_NODE) {
} else if (_local3.nodeName.toLowerCase() == "proxy") {
var _local2 = 0;
while (_local2 < _local3.childNodes.length) {
var _local4 = _local3.childNodes[_local2];
if (_local4.nodeType == TEXT_NODE) {
_local7 = trim(_local4.nodeValue);
break;
}
_local2++;
}
break;
}
_local6++;
}
if ((_local7 == undefined) || (_local7 == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" fpad xml requires proxy tag.");
}
rtmpURL = (((_parseResults.protocol + "/") + _local7) + "/?") + _uriParam;
_owner.helperDone(this, true);
}
} catch(err:Error) {
_owner.helperDone(this, false);
throw err;
}
}
function trim(str) {
var _local2 = 0;
while (_local2 < str.length) {
var _local1 = str.charAt(_local2);
if ((((_local1 != " ") && (_local1 != "\t")) && (_local1 != "\r")) && (_local1 != newline)) {
break;
}
_local2++;
}
if (_local2 >= str.length) {
return("");
}
var _local4 = str.length - 1;
while (_local4 > _local2) {
var _local1 = str.charAt(_local4);
if ((((_local1 != " ") && (_local1 != "\t")) && (_local1 != "\r")) && (_local1 != newline)) {
break;
}
_local4--;
}
return(str.slice(_local2, _local4 + 1));
}
static var version = "1.0.2.8";
static var shortVersion = "1.0.2";
static var ELEMENT_NODE = 1;
static var TEXT_NODE = 3;
}
Symbol 1643 MovieClip [__Packages.mx.video.CuePointManager] Frame 0
class mx.video.CuePointManager
{
var _owner, _id, _asCuePointTolerance, _linearSearchTolerance, _metadataLoaded, allCuePoints, asCuePoints, _disabledCuePoints, flvCuePoints, navCuePoints, eventCuePoints, _asCuePointIndex, __get__playheadUpdateInterval, _disabledCuePointsByNameOnly;
function CuePointManager (owner, id) {
_owner = owner;
_id = id;
reset();
_asCuePointTolerance = _owner.getVideoPlayer(_id).__get__playheadUpdateInterval() / 2000;
_linearSearchTolerance = DEFAULT_LINEAR_SEARCH_TOLERANCE;
}
function reset() {
_metadataLoaded = false;
allCuePoints = null;
asCuePoints = null;
_disabledCuePoints = null;
flvCuePoints = null;
navCuePoints = null;
eventCuePoints = null;
_asCuePointIndex = 0;
}
function get metadataLoaded() {
return(_metadataLoaded);
}
function set playheadUpdateInterval(aTime) {
_asCuePointTolerance = aTime / 2000;
//return(__get__playheadUpdateInterval());
}
function get id() {
return(_id);
}
function addASCuePoint(timeOrCuePoint, name, parameters) {
var _local3;
if (typeof(timeOrCuePoint) == "object") {
_local3 = deepCopyObject(timeOrCuePoint);
} else {
_local3 = {time:timeOrCuePoint, name:name, parameters:deepCopyObject(parameters)};
}
var _local7 = isNaN(_local3.time) || (_local3.time < 0);
if (_local7) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number");
}
var _local6 = _local3.name == null;
if (_local6) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null");
}
var _local2;
_local3.type = "actionscript";
if ((asCuePoints == null) || (asCuePoints.length < 1)) {
_local2 = 0;
asCuePoints = new Array();
asCuePoints.push(_local3);
} else {
_local2 = getCuePointIndex(asCuePoints, true, _local3.time);
_local2 = ((asCuePoints[_local2].time > _local3.time) ? 0 : (_local2 + 1));
asCuePoints.splice(_local2, 0, _local3);
}
if ((allCuePoints == null) || (allCuePoints.length < 1)) {
_local2 = 0;
allCuePoints = new Array();
allCuePoints.push(_local3);
} else {
_local2 = getCuePointIndex(allCuePoints, true, _local3.time);
_local2 = ((allCuePoints[_local2].time > _local3.time) ? 0 : (_local2 + 1));
allCuePoints.splice(_local2, 0, _local3);
}
var _local5 = _owner.getVideoPlayer(_id).__get__playheadTime();
if (_local5 > 0) {
if (_asCuePointIndex == _local2) {
if (_local5 > asCuePoints[_local2].time) {
_asCuePointIndex++;
}
} else if (_asCuePointIndex > _local2) {
_asCuePointIndex++;
}
} else {
_asCuePointIndex = 0;
}
var _local4 = deepCopyObject(asCuePoints[_local2]);
_local4.array = asCuePoints;
_local4.index = _local2;
return(_local4);
}
function removeASCuePoint(timeNameOrCuePoint) {
if ((asCuePoints == null) || (asCuePoints.length < 1)) {
return(null);
}
var _local2;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local2 = {name:timeNameOrCuePoint};
break;
case "number" :
_local2 = {time:timeNameOrCuePoint};
break;
case "object" :
_local2 = timeNameOrCuePoint;
}
var _local3 = getCuePointIndex(asCuePoints, false, _local2.time, _local2.name);
if (_local3 < 0) {
return(null);
}
_local2 = asCuePoints[_local3];
asCuePoints.splice(_local3, 1);
_local3 = getCuePointIndex(allCuePoints, false, _local2.time, _local2.name);
if (_local3 > 0) {
allCuePoints.splice(_local3, 1);
}
if (_owner.getVideoPlayer(_id).__get__playheadTime() > 0) {
if (_asCuePointIndex > _local3) {
_asCuePointIndex--;
}
} else {
_asCuePointIndex = 0;
}
return(_local2);
}
function setFLVCuePointEnabled(enabled, timeNameOrCuePoint) {
var _local4;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local4 = {name:timeNameOrCuePoint};
break;
case "number" :
_local4 = {time:timeNameOrCuePoint};
break;
case "object" :
_local4 = timeNameOrCuePoint;
}
var _local12 = isNaN(_local4.time) || (_local4.time < 0);
var _local11 = _local4.name == null;
if (_local12 && (_local11)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null");
}
var _local6 = 0;
var _local2;
var _local5;
if (_local12) {
if (!_metadataLoaded) {
if (_disabledCuePointsByNameOnly[_local4.name] == null) {
if (!enabled) {
if ((_disabledCuePointsByNameOnly == null) || (_disabledCuePointsByNameOnly.length < 0)) {
_disabledCuePointsByNameOnly = new Object();
}
_disabledCuePointsByNameOnly[_local4.name] = new Array();
}
} else {
if (enabled) {
_disabledCuePointsByNameOnly[_local4.name] = undefined;
}
return(-1);
}
removeCuePoints(_disabledCuePoints, _local4);
return(-1);
}
if (enabled) {
_local6 = removeCuePoints(_disabledCuePoints, _local4);
} else {
var _local3;
_local2 = getCuePointIndex(flvCuePoints, true, -1, _local4.name);
while (_local2 >= 0) {
_local3 = flvCuePoints[_local2];
_local5 = getCuePointIndex(_disabledCuePoints, true, _local3.time);
if ((_local5 < 0) || (_disabledCuePoints[_local5].time != _local3.time)) {
_disabledCuePoints = insertCuePoint(_local5, _disabledCuePoints, {name:_local3.name, time:_local3.time});
_local6 = _local6 + 1;
}
_local2 = getNextCuePointIndexWithName(_local3.name, flvCuePoints, _local2);
}
}
return(_local6);
}
_local2 = getCuePointIndex(_disabledCuePoints, false, _local4.time, _local4.name);
if (_local2 < 0) {
if (enabled) {
if (!_metadataLoaded) {
_local2 = getCuePointIndex(_disabledCuePoints, false, _local4.time);
if (_local2 < 0) {
_local5 = getCuePointIndex(_disabledCuePointsByNameOnly[_local4.name], true, _local4.time);
if (cuePointCompare(_local4.time, null, _disabledCuePointsByNameOnly[_local4.name]) != 0) {
_disabledCuePointsByNameOnly[_local4.name] = insertCuePoint(_local5, _disabledCuePointsByNameOnly[_local4.name], _local4);
}
} else {
_disabledCuePoints.splice(_local2, 1);
}
}
return((_metadataLoaded ? 0 : -1));
}
} else {
if (enabled) {
_disabledCuePoints.splice(_local2, 1);
_local6 = 1;
} else {
_local6 = 0;
}
return((_metadataLoaded ? (_local6) : -1));
}
if (_metadataLoaded) {
_local2 = getCuePointIndex(flvCuePoints, false, _local4.time, _local4.name);
if (_local2 < 0) {
return(0);
}
if (_local11) {
_local4.name = flvCuePoints[_local2].name;
}
}
_local5 = getCuePointIndex(_disabledCuePoints, true, _local4.time);
_disabledCuePoints = insertCuePoint(_local5, _disabledCuePoints, _local4);
_local6 = 1;
return((_metadataLoaded ? (_local6) : -1));
}
function removeCuePoints(cuePointArray, cuePoint) {
var _local2;
var _local4;
var _local5 = 0;
_local2 = getCuePointIndex(cuePointArray, true, -1, cuePoint.name);
while (_local2 >= 0) {
_local4 = cuePointArray[_local2];
cuePointArray.splice(_local2, 1);
_local2--;
_local5++;
_local2 = getNextCuePointIndexWithName(_local4.name, cuePointArray, _local2);
}
return(_local5);
}
function insertCuePoint(insertIndex, cuePointArray, cuePoint) {
if (insertIndex < 0) {
cuePointArray = new Array();
cuePointArray.push(cuePoint);
} else {
if (cuePointArray[insertIndex].time > cuePoint.time) {
insertIndex = 0;
} else {
insertIndex++;
}
cuePointArray.splice(insertIndex, 0, cuePoint);
}
return(cuePointArray);
}
function isFLVCuePointEnabled(timeNameOrCuePoint) {
if (!_metadataLoaded) {
return(true);
}
var _local3;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local3 = {name:timeNameOrCuePoint};
break;
case "number" :
_local3 = {time:timeNameOrCuePoint};
break;
case "object" :
_local3 = timeNameOrCuePoint;
}
var _local5 = isNaN(_local3.time) || (_local3.time < 0);
var _local6 = _local3.name == null;
if (_local5 && (_local6)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null");
}
if (_local5) {
var _local2 = getCuePointIndex(flvCuePoints, true, -1, _local3.name);
if (_local2 < 0) {
return(true);
}
while (_local2 >= 0) {
if (getCuePointIndex(_disabledCuePoints, false, flvCuePoints[_local2].time, flvCuePoints[_local2].name) < 0) {
return(true);
}
_local2 = getNextCuePointIndexWithName(_local3.name, flvCuePoints, _local2);
}
return(false);
}
return(getCuePointIndex(_disabledCuePoints, false, _local3.time, _local3.name) < 0);
}
function dispatchASCuePoints() {
var _local5 = _owner.getVideoPlayer(_id).__get__playheadTime();
if (_owner.getVideoPlayer(_id).__get__stateResponsive() && (asCuePoints != null)) {
while ((_asCuePointIndex < asCuePoints.length) && (asCuePoints[_asCuePointIndex].time <= (_local5 + _asCuePointTolerance))) {
_owner.dispatchEvent({type:"cuePoint", info:deepCopyObject(asCuePoints[_asCuePointIndex++]), vp:_id});
}
}
}
function resetASCuePointIndex(time) {
if ((time <= 0) || (asCuePoints == null)) {
_asCuePointIndex = 0;
return(undefined);
}
var _local2 = getCuePointIndex(asCuePoints, true, time);
_asCuePointIndex = ((asCuePoints[_local2].time < time) ? (_local2 + 1) : (_local2));
}
function processFLVCuePoints(metadataCuePoints) {
_metadataLoaded = true;
if ((metadataCuePoints == null) || (metadataCuePoints.length < 1)) {
flvCuePoints = null;
navCuePoints = null;
eventCuePoints = null;
return(undefined);
}
flvCuePoints = metadataCuePoints;
navCuePoints = new Array();
eventCuePoints = new Array();
var _local5;
var _local6 = -1;
var _local2;
var _local4 = _disabledCuePoints;
var _local3 = 0;
_disabledCuePoints = new Array();
var _local9 = 0;
while (_local2 = flvCuePoints[_local9++] , _local2 != null) {
if ((_local6 > 0) && (_local6 >= _local2.time)) {
flvCuePoints = null;
navCuePoints = null;
eventCuePoints = null;
_disabledCuePoints = null;
_disabledCuePointsByNameOnly = null;
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "Unsorted cuePoint found after time: " + _local6);
}
_local6 = _local2.time;
while ((_local3 < _local4.length) && (cuePointCompare(_local4[_local3].time, null, _local2) < 0)) {
_local3++;
}
if ((_disabledCuePointsByNameOnly[_local2.name] != null) || ((_local3 < _local4.length) && (cuePointCompare(_local4[_local3].time, _local4[_local3].name, _local2) == 0))) {
_disabledCuePoints.push({time:_local2.time, name:_local2.name});
}
if (_local2.type == "navigation") {
navCuePoints.push(_local2);
} else if (_local2.type == "event") {
eventCuePoints.push(_local2);
}
if ((allCuePoints == null) || (allCuePoints.length < 1)) {
allCuePoints = new Array();
allCuePoints.push(_local2);
} else {
_local5 = getCuePointIndex(allCuePoints, true, _local2.time);
_local5 = ((allCuePoints[_local5].time > _local2.time) ? 0 : (_local5 + 1));
allCuePoints.splice(_local5, 0, _local2);
}
}
delete _disabledCuePointsByNameOnly;
_disabledCuePointsByNameOnly = null;
}
function processCuePointsProperty(cuePoints) {
if ((cuePoints == null) || (cuePoints.length == 0)) {
return(undefined);
}
var _local4 = 0;
var _local8;
var _local6;
var _local7;
var _local5;
var _local9;
var _local2 = 0;
while (_local2 < (cuePoints.length - 1)) {
switch (_local4) {
case 6 :
addOrDisable(_local9, _local5);
_local4 = 0;
case 0 :
if (cuePoints[_local2++] != "t") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number");
}
_local5 = new Object();
_local5.time = cuePoints[_local2] / 1000;
_local4++;
break;
case 1 :
if (cuePoints[_local2++] != "n") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (cuePoints[_local2] == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be null or undefined");
}
_local5.name = unescape(cuePoints[_local2]);
_local4++;
break;
case 2 :
if (cuePoints[_local2++] != "t") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "type must be number");
}
switch (cuePoints[_local2]) {
case 0 :
_local5.type = "event";
break;
case 1 :
_local5.type = "navigation";
break;
case 2 :
_local5.type = "actionscript";
break;
default :
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "type must be 0, 1 or 2");
}
_local4++;
break;
case 3 :
if (cuePoints[_local2++] != "d") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "disabled must be number");
}
_local9 = cuePoints[_local2] != 0;
_local4++;
break;
case 4 :
if (cuePoints[_local2++] != "p") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "num params must be number");
}
_local8 = cuePoints[_local2];
_local4++;
if (_local8 == 0) {
_local4++;
} else {
_local5.parameters = new Object();
}
break;
case 5 :
_local6 = cuePoints[_local2++];
_local7 = cuePoints[_local2];
if (typeof(_local6) == "string") {
_local6 = unescape(_local6);
}
if (typeof(_local7) == "string") {
_local7 = unescape(_local7);
}
_local5.parameters[_local6] = _local7;
_local8--;
if (_local8 != 0) {
break;
}
_local4++;
}
_local2++;
}
if (_local4 == 6) {
addOrDisable(_local9, _local5);
} else {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected end of cuePoint param string");
}
}
function addOrDisable(disable, cuePoint) {
if (disable) {
if (cuePoint.type == "actionscript") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "Cannot disable actionscript cue points");
}
setFLVCuePointEnabled(false, cuePoint);
} else if (cuePoint.type == "actionscript") {
addASCuePoint(cuePoint);
}
}
function unescape(origStr) {
var _local3 = origStr;
var _local1 = 0;
while (_local1 < cuePointsReplace.length) {
var _local2 = _local3.split(cuePointsReplace[_local1++]);
if (_local2.length > 1) {
_local3 = _local2.join(cuePointsReplace[_local1]);
}
_local1++;
}
return(_local3);
}
function getCuePointIndex(cuePointArray, closeIsOK, time, name, start, len) {
if ((cuePointArray == null) || (cuePointArray.length < 1)) {
return(-1);
}
var _local13 = isNaN(time) || (time < 0);
var _local16 = name == null;
if (_local13 && (_local16)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null");
}
if (start == null) {
start = 0;
}
if (len == null) {
len = cuePointArray.length;
}
if ((!_local16) && (closeIsOK || (_local13))) {
var _local8;
var _local2;
if (_local13) {
_local8 = start;
} else {
_local8 = getCuePointIndex(cuePointArray, closeIsOK, time);
}
_local2 = _local8;
while (_local2 >= start) {
if (cuePointArray[_local2].name == name) {
break;
}
_local2--;
}
if (_local2 >= start) {
return(_local2);
}
_local2 = _local8 + 1;
while (_local2 < len) {
if (cuePointArray[_local2].name == name) {
break;
}
_local2++;
}
if (_local2 < len) {
return(_local2);
}
return(-1);
}
var _local6;
if (len <= _linearSearchTolerance) {
var _local11 = start + len;
var _local3 = start;
while (_local3 < _local11) {
_local6 = cuePointCompare(time, name, cuePointArray[_local3]);
if (_local6 == 0) {
return(_local3);
}
if (_local6 < 0) {
break;
}
_local3++;
}
if (closeIsOK) {
if (_local3 > 0) {
return(_local3 - 1);
}
return(0);
}
return(-1);
}
var _local12 = Math.floor(len / 2);
var _local15 = start + _local12;
_local6 = cuePointCompare(time, name, cuePointArray[_local15]);
if (_local6 < 0) {
return(getCuePointIndex(cuePointArray, closeIsOK, time, name, start, _local12));
}
if (_local6 > 0) {
return(getCuePointIndex(cuePointArray, closeIsOK, time, name, _local15 + 1, (_local12 - 1) + (len % 2)));
}
return(_local15);
}
function getNextCuePointIndexWithName(name, array, index) {
if (name == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null");
}
if (array == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "cuePoint.array undefined");
}
if ((isNaN(index) || (index < -1)) || (index >= array.length)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "cuePoint.index must be number between -1 and cuePoint.array.length");
}
var _local1;
_local1 = index + 1;
while (_local1 < array.length) {
if (array[_local1].name == name) {
break;
}
_local1++;
}
if (_local1 < array.length) {
return(_local1);
}
return(-1);
}
static function cuePointCompare(time, name, cuePoint) {
var _local1 = Math.round(time * 1000);
var _local2 = Math.round(cuePoint.time * 1000);
if (_local1 < _local2) {
return(-1);
}
if (_local1 > _local2) {
return(1);
}
if (name != null) {
if (name == cuePoint.name) {
return(0);
}
if (name < cuePoint.name) {
return(-1);
}
return(1);
}
return(0);
}
function getCuePoint(cuePointArray, closeIsOK, timeNameOrCuePoint) {
var _local2;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local2 = {name:timeNameOrCuePoint};
break;
case "number" :
_local2 = {time:timeNameOrCuePoint};
break;
case "object" :
_local2 = timeNameOrCuePoint;
}
var _local3 = getCuePointIndex(cuePointArray, closeIsOK, _local2.time, _local2.name);
if (_local3 < 0) {
return(null);
}
_local2 = deepCopyObject(cuePointArray[_local3]);
_local2.array = cuePointArray;
_local2.index = _local3;
return(_local2);
}
function getNextCuePointWithName(cuePoint) {
if (cuePoint == null) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "cuePoint parameter undefined");
}
if (isNaN(cuePoint.time) || (cuePoint.time < 0)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number");
}
var _local3 = getNextCuePointIndexWithName(cuePoint.name, cuePoint.array, cuePoint.index);
if (_local3 < 0) {
return(null);
}
var _local4 = deepCopyObject(cuePoint.array[_local3]);
_local4.array = cuePoint.array;
_local4.index = _local3;
return(_local4);
}
static function deepCopyObject(obj, recurseLevel) {
if ((obj == null) || (typeof(obj) != "object")) {
return(obj);
}
if (recurseLevel == null) {
recurseLevel = 0;
}
var _local2 = new Object();
for (var _local4 in obj) {
if ((recurseLevel == 0) && ((_local4 == "array") || (_local4 == "index"))) {
} else if (typeof(obj[_local4]) == "object") {
_local2[_local4] = deepCopyObject(obj[_local4], recurseLevel + 1);
} else {
_local2[_local4] = obj[_local4];
}
}
return(_local2);
}
static var DEFAULT_LINEAR_SEARCH_TOLERANCE = 50;
static var cuePointsReplace = [""", "\"", "'", "'", ",", ",", "&", "&"];
}
Symbol 66 Button
on (keyPress "p") {
gotoAndStop ("firstload");
}
Symbol 160 Button
on (release) {
getURL ("http://www.gamebusted.com/", "_blank");
}
Symbol 179 MovieClip Frame 10
gotoAndPlay (5);
Symbol 198 MovieClip Frame 84
gotoAndPlay (15);
Symbol 216 Button
on (release) {
play();
}
Symbol 217 Button
on (release) {
getURL ("http://www.onlineaddicted.com/", "_blank");
}
Symbol 224 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 224 MovieClip Frame 2
gotoAndPlay (1);
Symbol 224 MovieClip Frame 120
_root.play();
Symbol 234 Button
on (release, keyPress "<Enter>") {
if (_root.passwordit == "clientsonly") {
_root.gotoAndStop("start");
} else if (_root.passwordit == "client1") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client1.php", 0);
} else if (_root.passwordit == "client2") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client2.php", 0);
} else if (_root.passwordit == "client3") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client3.php", 0);
} else if (_root.passwordit == "client4") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client4.php", 0);
} else if (_root.passwordit == "client5") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client5.php", 0);
} else if (_root.passwordit == "client6") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client6.php", 0);
} else if (_root.passwordit == "client7") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client7.php", 0);
} else if (_root.passwordit == "client8") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client8.php", 0);
} else if (_root.passwordit == "client9") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client9.php", 0);
} else if (_root.passwordit == "client10") {
_root.gotoAndStop("start");
loadVariablesNum ("count/count_client10.php", 0);
}
}
Symbol 245 Button
on (keyPress "p") {
_root.arena = _root.arena + 1;
_root.match = _root.match + 1;
_root.fader.play();
_root.fader.dest = "rank";
}
Symbol 252 MovieClip Frame 112
gotoAndPlay ("loop");
Symbol 260 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 60
_root.gotoAndStop(dest);
Instance of Symbol 299 MovieClip in Symbol 300 MovieClip Frame 1
on (press) {
getURL ("http://www.gamebusted.com", "_blank");
}
Symbol 303 Button
on (press) {
_root.fader.play();
_root.fader.dest = "open";
}
Symbol 305 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 48
gotoAndPlay ("stanceloop");
Symbol 342 MovieClip Frame 1
stop();
Symbol 342 MovieClip Frame 2
gotoAndStop (1);
Symbol 342 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 342 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 342 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 342 MovieClip Frame 54
play();
Symbol 342 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Instance of Symbol 350 MovieClip "chuck" in Symbol 351 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ropeframe != undefined) {
gotoAndPlay(_root.ropeframe);
} else {
play();
}
}
Symbol 375 MovieClip Frame 44
gotoAndPlay ("stanceloop");
Symbol 404 MovieClip Frame 44
gotoAndPlay ("stanceloop");
Symbol 420 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 2
gotoAndStop (1);
Symbol 420 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 420 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 420 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 420 MovieClip Frame 54
play();
Symbol 420 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 422 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 2
gotoAndStop (1);
Symbol 422 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 422 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 422 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 422 MovieClip Frame 54
play();
Symbol 422 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 452 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 2
gotoAndStop (1);
Symbol 452 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 452 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 452 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 452 MovieClip Frame 54
play();
Symbol 452 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 476 MovieClip Frame 25
gotoAndPlay ("stanceloop");
Symbol 477 MovieClip Frame 1
stop();
Symbol 477 MovieClip Frame 2
gotoAndStop (1);
Symbol 477 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 477 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 477 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 477 MovieClip Frame 54
play();
Symbol 477 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Instance of Symbol 481 MovieClip in Symbol 482 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndPlay(_root.ropeframe);
}
Symbol 507 MovieClip Frame 44
gotoAndPlay ("stanceloop");
Symbol 509 MovieClip Frame 1
stop();
Symbol 509 MovieClip Frame 2
gotoAndStop (1);
Symbol 509 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 509 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 509 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 509 MovieClip Frame 54
play();
Symbol 509 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 541 MovieClip Frame 1
stop();
Symbol 541 MovieClip Frame 2
gotoAndStop (1);
Symbol 541 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 541 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 541 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 541 MovieClip Frame 54
play();
Symbol 541 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 570 MovieClip Frame 33
gotoAndPlay ("stanceloop");
Symbol 571 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 2
gotoAndStop (1);
Symbol 571 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 571 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 571 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 571 MovieClip Frame 54
play();
Symbol 571 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 598 MovieClip Frame 44
gotoAndPlay ("stanceloop");
Symbol 599 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 2
gotoAndStop (1);
Symbol 599 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 599 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 599 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 599 MovieClip Frame 54
play();
Symbol 599 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 624 MovieClip Frame 44
gotoAndPlay ("stanceloop");
Symbol 649 MovieClip Frame 48
gotoAndPlay ("stanceloop");
Symbol 680 MovieClip Frame 1
stop();
Symbol 689 Button
on (press) {
_root.fader.play();
_root.fader.dest = "select";
}
Symbol 690 MovieClip Frame 1
stop();
Symbol 692 Button
on (release) {
getURL ("http://www.gamebusted.com/playgame.php?id=2349", "_top");
}
Symbol 694 Button
on (release) {
getURL ("http://www.gamebusted.com/", "_blank");
}
Symbol 697 MovieClip Frame 1
stop();
Instance of Symbol 314 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (enterFrame) {
loadedbytes = _root.getBytesLoaded();
totalbytes = _root.getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes / 1000);
totalkbytes = Math.ceil(totalbytes / 1000);
_root.frame = int(loadedbytes / (totalbytes / 100));
if (_root.frame > 100) {
_root.frame = 100;
}
this.gotoAndStop(_root.frame);
}
Symbol 697 MovieClip Frame 2
stop();
Instance of Symbol 690 MovieClip in Symbol 697 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
} else {
this.prevFrame();
}
}
Symbol 698 Button
on (release) {
getURL ("http://starvingeyes.com", "_blank");
}
Symbol 700 MovieClip Frame 41
stop();
Symbol 713 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.nextFrame();
this.nextFrame();
this.nextFrame();
} else {
this.prevFrame();
}
};
Symbol 714 Button
on (press) {
gotoAndStop (2);
}
Symbol 723 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 7;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(2);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 724 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 2;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(1);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 725 MovieClip Frame 1
stop();
Symbol 725 MovieClip Frame 44
_root.fader.play();
_root.fader.dest = "game";
Symbol 726 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 11;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(1);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 727 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 12;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(2);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 728 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 13;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(1);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 729 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 14;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(2);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Instance of Symbol 680 MovieClip in Symbol 742 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.player_charnum);
}
Symbol 742 MovieClip Frame 2
stop();
Symbol 745 MovieClip Frame 1
stop();
Symbol 746 MovieClip Frame 13
stop();
Symbol 749 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 5;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(2);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 750 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 6;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(2);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 751 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 8;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(2);
char._alpha = 0;
}
}
on (press) {
picked = true;
pick();
}
Symbol 752 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 1;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(1);
char._alpha = 0;
}
}
on (press) {
pick();
}
Symbol 753 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 3;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(1);
char._alpha = 0;
}
}
on (press) {
pick();
}
Symbol 754 Button
on (rollOver) {
if ((_root.fader._currentframe == 1) & (picked != true)) {
_root.player_charnum = 4;
lightup.gotoAndPlay(1);
lightup.col.gotoAndStop(1);
char._alpha = 0;
}
}
on (press) {
pick();
}
Symbol 756 MovieClip Frame 1
function pick() {
_root.callname.gotoAndStop(_root.player_charnum + 1);
waitit.play();
}
stop();
Instance of Symbol 742 MovieClip "char" in Symbol 756 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
}
onClipEvent (load) {
this.gotoAndStop(2);
}
Symbol 756 MovieClip Frame 2
function pick() {
if (((_root.player_charnum == 1) || (_root.player_charnum == 3)) || (_root.player_charnum == 4)) {
getURL ("http://www.gamebusted.com/playgame.php?id=2412", "_self");
} else {
_root.callname.gotoAndStop(_root.player_charnum + 1);
waitit.play();
}
}
stop();
Symbol 769 MovieClip Frame 1
stop();
Symbol 769 MovieClip Frame 3
trace("ob");
Symbol 778 MovieClip Frame 1
stop();
Symbol 809 MovieClip Frame 1
stop();
Symbol 810 MovieClip Frame 1
waittime = 0;
reachcount = 0;
stop();
e1.gotoAndStop(_root.match1);
e2.gotoAndStop(_root.match2);
e3.gotoAndStop(_root.match3);
e4.gotoAndStop(_root.match4);
e5.gotoAndStop(_root.match5);
e6.gotoAndStop(_root.match6);
e7.gotoAndStop(_root.match7);
e8.gotoAndStop(_root.match8);
onEnterFrame = function () {
playerbox.gotoAndStop(_root.player_charnum);
playerbox.blinker.play();
waittime++;
if ((played != true) & (waittime > 90)) {
played = true;
this.play();
} else if ((played != true) & (_root.skey == true)) {
played = true;
this.play();
} else if ((played != true) & (_root.zkey == true)) {
played = true;
this.play();
} else if ((played != true) & (_root.xkey == true)) {
played = true;
this.play();
} else if ((played != true) & (_root.ckey == true)) {
played = true;
this.play();
}
if (reached == true) {
reachcount++;
if (((((reachcount > 30) || (skey == true)) || (zkey == true)) || (xkey == true)) || (ckey == true)) {
_root.fader.play();
_root.fader.dest = "game";
_root.action = "setcharacters";
}
}
};
this.gotoAndStop("p" + (_root.match - 1));
Symbol 810 MovieClip Frame 29
stop();
reached = true;
Symbol 810 MovieClip Frame 59
stop();
reached = true;
Symbol 810 MovieClip Frame 89
stop();
reached = true;
Symbol 810 MovieClip Frame 119
stop();
reached = true;
Symbol 810 MovieClip Frame 149
stop();
reached = true;
Symbol 810 MovieClip Frame 179
stop();
reached = true;
Symbol 810 MovieClip Frame 209
stop();
reached = true;
Symbol 810 MovieClip Frame 239
stop();
reached = true;
Symbol 810 MovieClip Frame 269
stop();
reached = true;
Symbol 811 MovieClip Frame 1
stop();
Symbol 827 MovieClip Frame 1
stop();
Instance of Symbol 827 MovieClip in Symbol 828 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.player_charnum);
}
Symbol 830 Button
on (press) {
_root.fader.play();
_root.fader.dest = "open";
}
Symbol 838 Button
on (release) {
_root.fader.play();
_root.fader.dest = "open";
}
Symbol 841 Button
on (release) {
_root.fader.play();
_root.fader.dest = "open";
}
Symbol 845 MovieClip Frame 1
stop();
Symbol 845 MovieClip Frame 2
_quality = "medium";
Symbol 845 MovieClip Frame 104
play();
Symbol 845 MovieClip Frame 133
stop();
_quality = "low";
Symbol 852 Button
on (release) {
_root.fader.dest = "open";
_root.fader.play();
}
Symbol 858 Button
on (release) {
stopAllSounds();
_root.fader.dest = "open";
_root.fader.play();
}
Symbol 866 Button
on (release) {
comment_test = " " + comment.toLowerCase();
var s1 = comment_test.indexOf(" dick");
var s2 = comment_test.indexOf(" shit");
var s3 = comment_test.indexOf(" fuck");
var s4 = comment_test.indexOf(" penis");
var s5 = comment_test.indexOf(" ass");
var s6 = comment_test.indexOf(" cock");
var s7 = comment_test.indexOf(" mother fucker");
var s8 = comment_test.indexOf(" motherfucker");
var s9 = comment_test.indexOf(" cunt");
var s10 = comment_test.indexOf(" blowjob");
var s11 = comment_test.indexOf(" blow job");
var s12 = comment_test.indexOf(" pussy");
var s13 = comment_test.indexOf(" vagina");
if (((((((((((((s1 != -1) || (s2 != -1)) || (s3 != -1)) || (s4 != -1)) || (s5 != -1)) || (s6 != -1)) || (s7 != -1)) || (s8 != -1)) || (s9 != -1)) || (s10 != -1)) || (s11 != -1)) || (s12 != -1)) || (s13 != -1)) {
swear1 = true;
talkback = "please do not type swear words";
} else {
swear1 = false;
}
playername_test2 = " " + playername_test.toLowerCase();
var p1 = playername_test2.indexOf(" dick");
var p2 = playername_test2.indexOf(" shit");
var p3 = playername_test2.indexOf(" fuck");
var p4 = playername_test2.indexOf(" penis");
var p5 = playername_test2.indexOf(" ass");
var p6 = playername_test2.indexOf(" cock");
var p7 = playername_test2.indexOf(" mother fucker");
var p8 = playername_test2.indexOf(" motherfucker");
var p9 = playername_test2.indexOf(" cunt");
var p10 = playername_test2.indexOf(" blowjob");
var p11 = playername_test2.indexOf(" blow job");
var p12 = playername_test2.indexOf(" pussy");
var p13 = playername_test2.indexOf(" vagina");
if (((((((((((((p1 != -1) || (p2 != -1)) || (p3 != -1)) || (p4 != -1)) || (p5 != -1)) || (p6 != -1)) || (p7 != -1)) || (p8 != -1)) || (p9 != -1)) || (p10 != -1)) || (p11 != -1)) || (p12 != -1)) || (p13 != -1)) {
swear2 = true;
talkback = "please do not type swear words";
} else if ((playername_test == undefined) || (playername_test == "")) {
swear2 = true;
trace(playername_test);
talkback = "please enter your name";
} else {
swear2 = false;
}
if ((swear1 != true) & (swear2 != true)) {
talkback = "";
playername = playername_test;
talktalk = comment;
high = _root.score;
fighter = _root.player_charnum;
wins = _root.wins;
trace((((playername + "|") + high) + "|") + talktalk);
getURL ("fuse_enterscore.php", "blank", "POST");
_root.fader.play();
_root.fader.dest = "open";
}
}
Symbol 868 Button
on (release) {
stopAllSounds();
_root.fader.play();
_root.fader.dest = "submit";
}
Symbol 870 MovieClip Frame 1
stop();
completed = false;
Symbol 870 MovieClip Frame 2
_quality = "medium";
Symbol 870 MovieClip Frame 103
if (_root.player_life > _root.enemy_life) {
winner = _root.player_charnum + 1;
} else {
winner = _root.enemy_charnum + 1;
}
_root.snd.winner.gotoAndStop(winner);
Symbol 870 MovieClip Frame 135
if (_root.player_life == 500) {
lifebonus = 75000 /* 0x0124F8 */;
} else {
lifebonus = _root.player_life * 100;
}
bonus_display = "Bonus - " + lifebonus;
_root.score = _root.score + lifebonus;
Symbol 870 MovieClip Frame 246
stop();
completed = true;
Symbol 870 MovieClip Frame 247
_quality = "medium";
Symbol 870 MovieClip Frame 366
if (_root.player_life > _root.enemy_life) {
winner = _root.player_charnum + 1;
} else {
winner = _root.enemy_charnum + 1;
}
_root.snd.winner.gotoAndStop(winner);
Symbol 870 MovieClip Frame 431
stop();
completed = true;
Symbol 870 MovieClip Frame 432
bonus_display = "Final Score - " + _root.score;
Symbol 870 MovieClip Frame 433
bonus_display = "Final Score - " + _root.score;
Symbol 870 MovieClip Frame 434
stop();
Symbol 873 MovieClip Frame 1
stop();
Symbol 875 MovieClip Frame 1
stop();
Symbol 877 MovieClip Frame 1
stop();
Symbol 880 MovieClip Frame 1
stop();
Symbol 882 MovieClip Frame 1
stop();
Symbol 884 MovieClip Frame 1
stop();
Symbol 884 MovieClip Frame 2
gotoAndPlay ("p1");
Symbol 884 MovieClip Frame 3
gotoAndPlay ("p2");
Symbol 884 MovieClip Frame 4
gotoAndPlay ("p3");
Symbol 884 MovieClip Frame 5
gotoAndPlay ("p4");
Symbol 884 MovieClip Frame 6
gotoAndPlay ("p5");
Symbol 884 MovieClip Frame 7
gotoAndPlay ("p6");
Symbol 884 MovieClip Frame 8
gotoAndPlay ("p7");
Symbol 884 MovieClip Frame 9
gotoAndPlay ("p9");
Symbol 884 MovieClip Frame 12
gotoAndPlay ("p11");
Symbol 884 MovieClip Frame 13
gotoAndPlay ("p12");
Symbol 884 MovieClip Frame 14
gotoAndPlay ("p13");
Symbol 884 MovieClip Frame 15
gotoAndPlay ("p14");
Symbol 884 MovieClip Frame 75
gotoAndStop (1);
Symbol 884 MovieClip Frame 126
gotoAndStop (1);
Symbol 884 MovieClip Frame 192
gotoAndStop (1);
Symbol 884 MovieClip Frame 252
gotoAndStop (1);
Symbol 884 MovieClip Frame 306
gotoAndStop (1);
Symbol 884 MovieClip Frame 359
gotoAndStop (1);
Symbol 884 MovieClip Frame 426
gotoAndStop (1);
Symbol 884 MovieClip Frame 484
gotoAndStop (1);
Symbol 884 MovieClip Frame 542
gotoAndStop (1);
Symbol 884 MovieClip Frame 600
gotoAndStop (1);
Symbol 884 MovieClip Frame 658
gotoAndStop (1);
Symbol 884 MovieClip Frame 716
gotoAndStop (1);
Symbol 891 MovieClip Frame 1
stop();
Symbol 891 MovieClip Frame 4
gotoAndStop (1);
Symbol 891 MovieClip Frame 7
gotoAndStop (1);
Symbol 891 MovieClip Frame 10
gotoAndStop (1);
Symbol 891 MovieClip Frame 13
gotoAndStop (1);
Symbol 891 MovieClip Frame 16
gotoAndStop (1);
Symbol 891 MovieClip Frame 19
gotoAndStop (1);
Symbol 891 MovieClip Frame 22
gotoAndStop (1);
Symbol 891 MovieClip Frame 25
gotoAndStop (1);
Symbol 891 MovieClip Frame 28
gotoAndStop (1);
Symbol 891 MovieClip Frame 29
stop();
Symbol 891 MovieClip Frame 31
gotoAndStop (1);
Symbol 891 MovieClip Frame 32
stop();
Symbol 891 MovieClip Frame 34
gotoAndStop (1);
Symbol 891 MovieClip Frame 37
gotoAndStop (1);
Symbol 891 MovieClip Frame 38
stop();
Symbol 891 MovieClip Frame 40
gotoAndStop (1);
Symbol 893 MovieClip Frame 1
stop();
Symbol 895 MovieClip Frame 1
stop();
Symbol 899 MovieClip Frame 1
stop();
Symbol 917 MovieClip Frame 12
stop();
Instance of Symbol 921 MovieClip "dis" in Symbol 922 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.billdisx = this._x;
_root.billdisy = this._y;
}
Symbol 922 MovieClip Frame 14
_parent.gotoAndPlay(2);
Symbol 922 MovieClip Frame 30
_parent.gotoAndPlay(2);
Symbol 922 MovieClip Frame 47
_parent.gotoAndPlay(2);
Symbol 922 MovieClip Frame 51
_parent.donehitting = true;
stop();
Symbol 924 MovieClip Frame 1
stop();
Symbol 924 MovieClip Frame 5
_parent.blood = true;
Symbol 930 MovieClip Frame 15
stop();
Symbol 931 MovieClip [fireball1] Frame 1
onEnterFrame = function () {
_root.fireballcode1(this);
};
num = 1;
Symbol 931 MovieClip [fireball1] Frame 15
stop();
Symbol 931 MovieClip [fireball1] Frame 39
action = "eject";
stop();
Symbol 977 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 977 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 983 MovieClip Frame 2
_root.snd.woom.play();
Symbol 983 MovieClip Frame 21
stop();
Symbol 984 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 984 MovieClip Frame 38
fallstatus = "deathtest";
Symbol 984 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 985 MovieClip Frame 14
stop();
Symbol 986 MovieClip Frame 1
play();
Symbol 986 MovieClip Frame 44
stop();
Symbol 987 MovieClip Frame 4
_root.snd.woom.play();
Symbol 987 MovieClip Frame 19
stop();
punch = "done";
Symbol 988 MovieClip Frame 3
_root.snd.woom.play();
Symbol 988 MovieClip Frame 11
_root.snd.woom.play();
Symbol 992 MovieClip Frame 4
if (_parent._name == "player") {
if ((_root.leftkey == true) || (_root.rightkey == true)) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 40;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -40;
}
gotoAndPlay ("jump2");
}
} else if (_parent._name == "enemy") {
if (_root.enemy_xspeed == 0) {
gotoAndPlay ("jump");
}
}
Instance of Symbol 991 MovieClip in Symbol 992 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.dis < 200) {
_parent.gotoAndPlay("jump");
}
}
Symbol 992 MovieClip Frame 26
if (_parent._name == "player") {
_root.player_yspeed = -30;
if (_root.player_xspeed > 0) {
_root.player_xspeed = 40;
} else if (_root.player_xspeed < 0) {
_root.player_xspeed = -40;
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -30;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 992 MovieClip Frame 27
_root.snd.woom.play();
Instance of Symbol 991 MovieClip in Symbol 992 MovieClip Frame 44
onClipEvent (enterFrame) {
if (_parent._parent._name == "player") {
_root.player_yspeed = _root.player_yspeed + 2;
} else if (_parent._parent._name == "enemy") {
_root.enemy_yspeed = _root.enemy_yspeed + 2;
}
}
Symbol 993 MovieClip Frame 12
shoot = true;
Symbol 998 MovieClip Frame 1
stop();
Symbol 998 MovieClip Frame 10
gotoAndStop (1);
Symbol 998 MovieClip Frame 35
gotoAndStop ("out");
Symbol 998 MovieClip Frame 36
play();
Symbol 998 MovieClip Frame 54
stop();
Symbol 998 MovieClip Frame 55
stop();
Symbol 999 MovieClip [fighter1] Frame 1
stop();
stop();
Instance of Symbol 992 MovieClip in Symbol 999 MovieClip [fighter1] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 30) {
this._alpha = this._alpha + 10;
}
}
Symbol 999 MovieClip [fighter1] Frame 15
body.gotoAndPlay("doved");
Symbol 1002 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1002 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1007 MovieClip Frame 7
stop();
Symbol 1009 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1009 MovieClip Frame 25
stop();
Symbol 1011 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1011 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1011 MovieClip Frame 66
fallstatus = "up";
stop();
Symbol 1014 MovieClip Frame 6
_root.snd.woom.play();
Symbol 1014 MovieClip Frame 20
stop();
punch = "done";
Symbol 1038 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1038 MovieClip Frame 11
_root.snd.woom.play();
Instance of Symbol 1039 MovieClip in Symbol 1040 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.dis < 300) {
if (_parent._parent.me == "player") {
if ((_root.rightkey == true) || (_root.leftkey == true)) {
_parent.gotoAndPlay("hit");
}
}
if (_parent._parent.me == "enemy") {
trace("giuliani strike " + dis);
_parent.gotoAndPlay("hit");
}
}
}
Symbol 1040 MovieClip Frame 7
_root.snd.woom.play();
Symbol 1041 MovieClip Frame 14
shoot = true;
Symbol 1041 MovieClip Frame 56
stop();
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 10
gotoAndStop (1);
Symbol 1044 MovieClip Frame 33
gotoAndPlay ("out");
Symbol 1044 MovieClip Frame 34
play();
Symbol 1044 MovieClip Frame 52
stop();
Symbol 1045 MovieClip [fighter5] Frame 1
stop();
stop();
Instance of Symbol 1040 MovieClip in Symbol 1045 MovieClip [fighter5] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 40) {
this._alpha = this._alpha + 10;
}
}
Symbol 1045 MovieClip [fighter5] Frame 15
body.gotoAndPlay("doved");
Symbol 1046 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1046 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1051 MovieClip Frame 2
_root.snd.woom.play();
Instance of Symbol 1052 MovieClip "chuck" in Symbol 1054 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndPlay(_root.ropeframe);
}
Symbol 1054 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1054 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1054 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1061 MovieClip Frame 5
_root.snd.woom.play();
Symbol 1061 MovieClip Frame 19
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1061 MovieClip Frame 20
stop();
punch = "done";
Symbol 1062 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1062 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1066 MovieClip Frame 2
if (_parent._name == "player") {
if ((_root.leftkey == true) || (_root.rightkey == true)) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 40;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -40;
}
gotoAndPlay ("jump");
}
}
Instance of Symbol 1065 MovieClip in Symbol 1066 MovieClip Frame 10
onClipEvent (enterFrame) {
if (_root.dis < 250) {
_parent.gotoAndPlay("jump");
}
if (_parent._parent._name == "player") {
_root.player_hardspeedoveride = true;
if (_root.back.player._xscale == 100) {
if (_root.rightkey == true) {
_root.player_xspeed = 35;
gotoAndPlay ("jump");
} else {
gotoAndPlay ("up");
}
} else if (_root.back.player._xscale == -100) {
if (_root.leftkey == true) {
_root.player_xspeed = -35;
gotoAndPlay ("jump");
} else {
gotoAndPlay ("up");
}
}
} else if (_parent._parent._name == "enemy") {
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
}
Symbol 1066 MovieClip Frame 31
if (_parent._name == "player") {
if (_root.back.player._xscale == 100) {
if (_root.rightkey == true) {
_root.player_yspeed = -35;
_root.player_xspeed = 50;
} else {
_root.player_yspeed = -20;
_root.player_xspeed = 40;
}
} else if (_root.back.player._xscale == -100) {
if (_root.leftkey == true) {
_root.player_yspeed = -35;
_root.player_xspeed = -50;
} else {
_root.player_yspeed = -20;
_root.player_xspeed = -40;
}
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -40;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 1066 MovieClip Frame 32
_root.snd.woom.play();
Symbol 1066 MovieClip Frame 72
gotoAndStop ("end");
Symbol 1067 MovieClip Frame 9
shoot = true;
Symbol 1075 MovieClip Frame 1
stop();
Symbol 1075 MovieClip Frame 10
gotoAndStop (1);
Symbol 1075 MovieClip Frame 38
gotoAndStop ("out");
Symbol 1075 MovieClip Frame 39
play();
Symbol 1075 MovieClip Frame 56
stop();
Symbol 1076 MovieClip [fighter3] Frame 1
stop();
Symbol 1076 MovieClip [fighter3] Frame 15
body.gotoAndPlay("doved");
Symbol 1077 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1077 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1081 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1083 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1083 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1083 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1086 MovieClip Frame 4
_root.snd.woom.play();
Symbol 1086 MovieClip Frame 18
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1086 MovieClip Frame 19
stop();
punch = "done";
Symbol 1087 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1087 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1091 MovieClip Frame 6
_root.snd.woom.play();
Instance of Symbol 1089 MovieClip in Symbol 1091 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.dis < 300) {
if (_parent._parent.me == "player") {
if ((_root.rightkey == true) || (_root.leftkey == true)) {
_parent.gotoAndPlay("hit");
}
}
if (_parent._parent.me == "enemy") {
trace("giuliani strike " + dis);
_parent.gotoAndPlay("hit");
}
}
}
Symbol 1092 MovieClip Frame 9
shoot = true;
Symbol 1096 MovieClip Frame 1
stop();
Symbol 1096 MovieClip Frame 10
gotoAndStop (1);
Symbol 1096 MovieClip Frame 38
gotoAndStop ("out");
Symbol 1097 MovieClip [fighter2] Frame 1
stop();
stop();
Instance of Symbol 1091 MovieClip in Symbol 1097 MovieClip [fighter2] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 60) {
this._alpha = this._alpha + 10;
}
}
Symbol 1103 MovieClip Frame 1
stop();
Symbol 1103 MovieClip Frame 11
stop();
Symbol 1103 MovieClip Frame 12
stop();
Symbol 1104 MovieClip [fireball5] Frame 1
onEnterFrame = function () {
_root.fireballcode5(this);
};
Instance of Symbol 1103 MovieClip "head1" in Symbol 1104 MovieClip [fireball5] Frame 1
onClipEvent (enterFrame) {
_root.ghead(this);
}
Instance of Symbol 1103 MovieClip "head2" in Symbol 1104 MovieClip [fireball5] Frame 1
onClipEvent (enterFrame) {
_root.ghead(this);
}
Instance of Symbol 1103 MovieClip "head3" in Symbol 1104 MovieClip [fireball5] Frame 1
onClipEvent (enterFrame) {
_root.ghead(this);
}
Symbol 1112 MovieClip [jail] Frame 1
onEnterFrame = function () {
_root.jailcode(this);
};
Symbol 1112 MovieClip [jail] Frame 20
stop();
harpoonit = true;
Symbol 1112 MovieClip [jail] Frame 21
reached = true;
Symbol 1115 MovieClip [fireball2] Frame 1
onEnterFrame = function () {
_root.fireballcode2(this);
};
Instance of Symbol 1113 MovieClip in Symbol 1115 MovieClip [fireball2] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.back[_parent.you].body.hit)) {
_root.fireballhit = _root.fireballhit + _root.fireballhit_uplev;
_root[_parent.you + "_action"] = "doved";
_root.back[_parent.you].gotoAndStop("doved");
_root.back[_parent.you].body.gotoAndStop("doved");
_root[_parent.me + "_dovegrab"] = true;
}
}
Symbol 1115 MovieClip [fireball2] Frame 3
_root.dove(me, you);
Symbol 1115 MovieClip [fireball2] Frame 54
stop();
Symbol 1116 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1116 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1122 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1124 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1124 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1124 MovieClip Frame 64
fallstatus = "up";
stop();
Symbol 1127 MovieClip Frame 4
_root.snd.woom.play();
Symbol 1127 MovieClip Frame 18
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1127 MovieClip Frame 19
stop();
punch = "done";
Symbol 1128 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1133 MovieClip Frame 1
_root.player_hardspeedoveride = true;
Symbol 1133 MovieClip Frame 8
stop();
Instance of Symbol 1130 MovieClip in Symbol 1133 MovieClip Frame 8
onClipEvent (load) {
if (_parent._name == "body") {
action = "start";
if (_parent._parent._name == "player") {
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 33;
} else {
_root.player_xspeed = -33;
}
} else if (_root.back.enemy._xscale == 100) {
_root.enemy_xspeed = 33;
} else {
_root.enemy_xspeed = -33;
}
}
}
onClipEvent (enterFrame) {
if (_parent._name == "body") {
if (action == "start") {
if (_parent._parent._name == "player") {
if (_root.pxx > (_root.rlim - 5)) {
trace("outright");
_root.player_xspeed = 7;
_parent.play();
} else if (_root.pxx < (_root.llim + 5)) {
trace("outleft");
_root.player_xspeed = 7;
_parent.play();
}
if (_root.back.player._xscale == 100) {
if (_root.rightkey == true) {
_root.player_xspeed = 23;
} else {
_root.player_xspeed = 7;
_parent.play();
}
} else if (_root.leftkey == true) {
_root.player_xspeed = -23;
} else {
_parent.play();
_root.player_xspeed = -7;
}
_root.player_yspeed = 0;
if (this.hitTest(_root.back.enemy.body.block) || (this.hitTest(_root.back.enemy.body) & (_root.enemy_action == "bigflinch"))) {
trace("blockhit");
_root.player_yspeed = -30;
set_xspeed = -_root.player_xspeed;
action = "block";
}
} else {
if (_root.back.enemy._xscale == 100) {
_root.enemy_xspeed = 33;
} else {
_root.enemy_xspeed = -33;
}
if (_root.exx > (_root.rlim - 5)) {
trace("e outright");
_root.enemy_xspeed = 7;
_parent.play();
} else if (_root.exx < (_root.llim + 5)) {
trace("e outleft");
_root.enemy_xspeed = 7;
_parent.play();
}
_root.enemy_yspeed = 0;
if (this.hitTest(_root.back.player.body.block) || (this.hitTest(_root.back.player.body) & (_root.player_action == "bigflinch"))) {
trace("blockhit");
_root.enemy_yspeed = -30;
set_xspeed = -_root.enemy_xspeed;
action = "block";
}
}
} else if (action == "block") {
if (_parent._parent._name == "player") {
_root.player_xspeed = set_xspeed;
if ((_root.back.player._y + _root.player_yspeed) >= _root.bot) {
_parent.gotoAndPlay("out");
}
} else {
_root.enemy_xspeed = set_xspeed;
if ((_root.back.enemy._y + _root.enemy_yspeed) >= _root.bot) {
_parent.gotoAndPlay("out");
}
}
}
}
}
Symbol 1134 MovieClip Frame 17
shoot = true;
_root.shake.play();
Symbol 1138 MovieClip Frame 1
stop();
Symbol 1138 MovieClip Frame 9
gotoAndStop (1);
Symbol 1138 MovieClip Frame 33
gotoAndStop ("out");
Symbol 1138 MovieClip Frame 34
play();
Symbol 1138 MovieClip Frame 54
stop();
Symbol 1139 MovieClip [fighter4] Frame 1
stop();
stop();
Symbol 1140 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1140 MovieClip Frame 64
gotoAndPlay ("loop2");
Instance of Symbol 481 MovieClip in Symbol 1146 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndPlay(_root.ropeframe);
}
Symbol 1146 MovieClip Frame 2
_root.snd.woom.play();
Instance of Symbol 1148 MovieClip "chuck" in Symbol 1149 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndPlay(_root.ropeframe);
}
Symbol 1149 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1149 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1149 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1152 MovieClip Frame 6
_root.snd.woom.play();
Symbol 1152 MovieClip Frame 19
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1152 MovieClip Frame 20
stop();
punch = "done";
Symbol 1153 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1153 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1157 MovieClip Frame 2
if (_parent._name == "player") {
if ((_root.leftkey == true) || (_root.rightkey == true)) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 40;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -40;
}
gotoAndPlay ("jump");
}
}
Instance of Symbol 1156 MovieClip in Symbol 1157 MovieClip Frame 8
onClipEvent (enterFrame) {
_root.player_hardspeedoveride = true;
if (_root.dis < 250) {
trace("ass");
_parent.gotoAndPlay("jump");
}
if (_parent._parent._name == "player") {
if (_root.back.player._xscale == 100) {
if (_root.rightkey == true) {
trace("FT speed: " + _root.player_xspeed);
_root.player_xspeed = 35;
gotoAndPlay ("jump");
} else {
gotoAndPlay ("up");
}
} else if (_root.back.player._xscale == -100) {
if (_root.leftkey == true) {
_root.player_xspeed = -35;
gotoAndPlay ("jump");
} else {
gotoAndPlay ("up");
}
}
} else if (_parent._parent._name == "enemy") {
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
}
Symbol 1157 MovieClip Frame 31
if (_parent._name == "player") {
if (_root.back.player._xscale == 100) {
if (_root.rightkey == true) {
_root.player_yspeed = -35;
_root.player_xspeed = 50;
} else {
_root.player_yspeed = -20;
_root.player_xspeed = 40;
}
} else if (_root.back.player._xscale == -100) {
if (_root.leftkey == true) {
_root.player_yspeed = -35;
_root.player_xspeed = -50;
} else {
_root.player_yspeed = -20;
_root.player_xspeed = -40;
}
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -40;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 1157 MovieClip Frame 32
_root.snd.woom.play();
Symbol 1157 MovieClip Frame 78
gotoAndStop ("end");
Symbol 1166 MovieClip Frame 12
_root.snd.woom.play();
Symbol 1166 MovieClip Frame 13
shoot = true;
Symbol 1166 MovieClip Frame 66
gotoAndStop ("out");
Symbol 1166 MovieClip Frame 76
stop();
Symbol 1166 MovieClip Frame 83
gotoAndStop ("out");
Symbol 1166 MovieClip Frame 85
stop();
Symbol 1172 MovieClip Frame 1
stop();
Symbol 1172 MovieClip Frame 10
gotoAndStop (1);
Symbol 1172 MovieClip Frame 28
gotoAndStop ("out");
Symbol 1172 MovieClip Frame 29
play();
Symbol 1172 MovieClip Frame 46
stop();
Symbol 1173 MovieClip [fighter6] Frame 1
stop();
Symbol 1173 MovieClip [fighter6] Frame 15
body.gotoAndPlay("doved");
Symbol 1174 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1174 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1179 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1181 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1181 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1181 MovieClip Frame 64
fallstatus = "up";
stop();
Symbol 1184 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1184 MovieClip Frame 20
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1184 MovieClip Frame 21
stop();
punch = "done";
Symbol 1187 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1187 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1192 MovieClip Frame 1
_root.player_hardspeedoveride = true;
Symbol 1192 MovieClip Frame 7
if (_parent._name == "player") {
if ((_root.leftkey == true) || (_root.rightkey == true)) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 10;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -10;
}
gotoAndPlay ("jump2");
}
} else if (_parent._name == "enemy") {
if (_root.enemy_xspeed == 0) {
gotoAndPlay ("jump");
}
}
Instance of Symbol 1190 MovieClip in Symbol 1192 MovieClip Frame 8
onClipEvent (enterFrame) {
if (_root.dis < 200) {
_parent.gotoAndPlay("jump");
}
}
Symbol 1192 MovieClip Frame 27
if (_parent._name == "player") {
_root.player_yspeed = -30;
if (_root.player_xspeed > 0) {
_root.player_xspeed = 40;
} else if (_root.player_xspeed < 0) {
_root.player_xspeed = -40;
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -30;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 1194 MovieClip Frame 5
_root.fbsn++;
_root.back.attachMovie("fireball7", "bomb" + _root.fbsn, 100 + _root.fbsn);
_root.back["bomb" + _root.fbsn].me = _parent._name;
_root.back["bomb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["bomb" + _root.fbsn]._x = _parent._x + 150;
} else {
_root.back["bomb" + _root.fbsn]._x = _parent._x - 150;
}
Symbol 1194 MovieClip Frame 11
_root.fbsn++;
_root.back.attachMovie("fireball7", "bomb" + _root.fbsn, 100 + _root.fbsn);
_root.back["bomb" + _root.fbsn].me = _parent._name;
_root.back["bomb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["bomb" + _root.fbsn]._x = _parent._x + 300;
} else {
_root.back["bomb" + _root.fbsn]._x = _parent._x - 300;
}
Symbol 1194 MovieClip Frame 17
_root.fbsn++;
_root.back.attachMovie("fireball7", "bomb" + _root.fbsn, 100 + _root.fbsn);
_root.back["bomb" + _root.fbsn].me = _parent._name;
_root.back["bomb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["bomb" + _root.fbsn]._x = _parent._x + 450;
} else {
_root.back["bomb" + _root.fbsn]._x = _parent._x - 450;
}
Symbol 1194 MovieClip Frame 23
_root.fbsn++;
_root.back.attachMovie("fireball7", "bomb" + _root.fbsn, 100 + _root.fbsn);
_root.back["bomb" + _root.fbsn].me = _parent._name;
_root.back["bomb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["bomb" + _root.fbsn]._x = _parent._x + 600;
} else {
_root.back["bomb" + _root.fbsn]._x = _parent._x - 600;
}
Symbol 1198 MovieClip Frame 1
stop();
Symbol 1198 MovieClip Frame 10
gotoAndStop (1);
Symbol 1198 MovieClip Frame 41
gotoAndStop ("out");
Symbol 1198 MovieClip Frame 42
play();
Symbol 1198 MovieClip Frame 63
stop();
Symbol 1199 MovieClip [fighter7] Frame 1
stop();
stop();
Symbol 1200 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1200 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1203 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1204 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1204 MovieClip Frame 38
fallstatus = "deathtest";
Symbol 1204 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1207 MovieClip Frame 4
_root.snd.woom.play();
Symbol 1207 MovieClip Frame 19
stop();
punch = "done";
Symbol 1208 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1208 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1213 MovieClip Frame 4
if (_parent._name == "player") {
if (Key.isDown(37) || (Key.isDown(39))) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 40;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -40;
}
gotoAndPlay ("jump2");
}
} else if (_parent._name == "enemy") {
if (_root.enemy_xspeed == 0) {
gotoAndPlay ("jump");
}
}
Instance of Symbol 47 MovieClip in Symbol 1213 MovieClip Frame 7
onClipEvent (enterFrame) {
if (_root.dis < 200) {
_parent.gotoAndPlay("jump");
}
}
Symbol 1213 MovieClip Frame 26
if (_parent._name == "player") {
_root.player_yspeed = -30;
if (_root.player_xspeed > 0) {
_root.player_xspeed = 40;
} else if (_root.player_xspeed < 0) {
_root.player_xspeed = -40;
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -30;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 1213 MovieClip Frame 27
_root.snd.woom.play();
Instance of Symbol 47 MovieClip in Symbol 1213 MovieClip Frame 44
onClipEvent (enterFrame) {
if (_parent._parent._name == "player") {
_root.player_yspeed = _root.player_yspeed + 2;
} else if (_parent._parent._name == "enemy") {
_root.enemy_yspeed = _root.enemy_yspeed + 2;
}
}
Symbol 1233 MovieClip Frame 1
function fireball() {
_root.fbsn++;
_root.back.attachMovie("fireball8", "fb" + _root.fbsn, 100 + _root.fbsn);
_root.back["fb" + _root.fbsn].me = _parent._name;
_root.back["fb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["fb" + _root.fbsn]._x = _parent._x + 50;
} else {
_root.back["fb" + _root.fbsn]._x = _parent._x - 50;
}
_root.back["fb" + _root.fbsn]._y = _parent._y - 220;
}
Symbol 1233 MovieClip Frame 10
fireball();
Symbol 1233 MovieClip Frame 24
fireball();
Symbol 1233 MovieClip Frame 38
fireball();
Symbol 1236 MovieClip Frame 1
stop();
Symbol 1236 MovieClip Frame 10
gotoAndStop (1);
Symbol 1236 MovieClip Frame 35
gotoAndStop ("out");
Symbol 1236 MovieClip Frame 36
play();
Symbol 1236 MovieClip Frame 54
stop();
Symbol 1236 MovieClip Frame 55
stop();
Symbol 1237 MovieClip [fighter8] Frame 1
stop();
stop();
Instance of Symbol 1213 MovieClip in Symbol 1237 MovieClip [fighter8] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 30) {
this._alpha = this._alpha + 10;
}
}
Symbol 1237 MovieClip [fighter8] Frame 15
body.gotoAndPlay("doved");
Symbol 1242 MovieClip [fighter9] Frame 1
stop();
stop();
Symbol 1247 MovieClip Frame 1
stop();
Symbol 1248 MovieClip [fireball6] Frame 1
stop();
movecount = 0;
disx = 0;
action = "fly";
if (this._xscale == 100) {
xspeed = 55;
} else {
xspeed = -55;
}
_root.fbsn++;
_root.back.attachMovie("harpooncover", "hc" + _root.fbsn, 100 + _root.fbsn);
unmasker = _root.back["hc" + _root.fbsn];
trace(unmasker);
this.setMask(_root.back["hc" + _root.fbsn]);
_root.back["hc" + _root.fbsn]._xscale = this._xscale;
_root.back["hc" + _root.fbsn]._x = this._x;
_root.back["hc" + _root.fbsn]._y = this._y;
trace((("harpoon " + me) + ", ") + you);
onEnterFrame = function () {
if ((me == undefined) || (you == undefined)) {
you = _parent.you;
me = _parent.me;
}
if (action == "fly") {
this._x = this._x + xspeed;
disx = disx + xspeed;
if (this.hit.hitTest(_root.back[you].body.hit) & (_root[you + "_jump"] != "jumping")) {
_root.snd.hard.play();
if (this._xscale == 100) {
this._x = _root.back[you]._x - 100;
} else {
this._x = _root.back[you]._x + 100;
}
_root[you + "_action"] = "harpooned";
_root.back[you].gotoAndStop("harpooned");
_root.back[me].body.gotoAndPlay("reel");
handoffset = _root.back[me].body.hand._x;
xstart = unmasker._x;
_root.blood(4, 30, me, you);
_root.damage(10, you);
delayct = 20;
action = "delay";
} else if (this.hit.hitTest(_root.back[you].body.block)) {
_root.snd.block.play();
_root.back[me].body.gotoAndPlay("miss");
this.play();
action = "blocked";
} else if (disx > 800) {
_root.back[me].body.gotoAndPlay("miss");
action = "missed";
}
} else if (action == "delay") {
if (movecount < 7) {
movecount++;
if (this._xscale == 100) {
unmasker._x = unmasker._x - 18.5;
} else {
unmasker._x = unmasker._x + 18.5;
}
trace((("delay " + unmasker._x) + " cf ") + _root.back[me].body._currentframe);
}
_root[you + "_action"] = "harpooned";
_root.back[you].gotoAndStop("harpooned");
_root.back[you].body.gotoAndStop(1);
if (delayct <= 0) {
_root.snd.comehere.play();
action = "reelin";
} else {
delayct--;
}
} else if (action == "reelin") {
harpoon.gotoAndStop(2);
_root[you + "_action"] = "harpooned";
_root.back[you].gotoAndStop("harpooned");
_root.back[you].body.gotoAndStop(1);
if (_root.dis < 150) {
_root.back[me].body.gotoAndPlay("reeled");
action = "reeled";
} else if (_root.back[me]._xscale == 100) {
this._x = this._x - 30;
_root.back[you]._x = _root.back[you]._x - 30;
} else if (_root.back[me]._xscale == -100) {
this._x = this._x + 30;
_root.back[you]._x = _root.back[you]._x + 30;
}
} else if (action == "reeled") {
_root.back[you].body.gotoAndPlay("harpooned");
removeMovieClip(unmasker);
removeMovieClip(this);
} else if (action == "missed") {
this._x = this._x + xspeed;
disx = disx + xspeed;
if (disx > 1600) {
removeMovieClip(unmasker);
removeMovieClip(this);
}
} else if (action == "blocked") {
if (this._currentframe >= 21) {
removeMovieClip(unmasker);
removeMovieClip(this);
}
}
};
Symbol 1248 MovieClip [fireball6] Frame 25
gotoAndPlay(_currentframe - 1);
Symbol 1252 MovieClip Frame 14
stop();
Symbol 1263 MovieClip [fireball3] Frame 1
function frag(name) {
if (name.defined == undefined) {
name.xspeed = random(60) - 30;
name.yspeed = -random(50);
name.rotspeed = random(10) - 5;
name.defined = true;
}
name._x = name._x + name.xspeed;
name._y = name._y + name.yspeed;
name.yspeed = name.yspeed + 2;
name._alpha = name._alpha - 3;
name._rotation = name._rotation + name.rotspeed;
}
onEnterFrame = function () {
_root.fireballcode3(this);
};
stop();
Instance of Symbol 1256 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1263 MovieClip [fireball3] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Symbol 1263 MovieClip [fireball3] Frame 37
action = "unload";
stop();
Symbol 1271 MovieClip [fireball4] Frame 1
stop();
onEnterFrame = function () {
_root.fireballcode4(this);
};
Symbol 1271 MovieClip [fireball4] Frame 2
play();
Symbol 1271 MovieClip [fireball4] Frame 18
stop();
action = "unload";
Symbol 1310 MovieClip Frame 19
stop();
Symbol 1312 MovieClip [fireball7] Frame 1
stop();
action = "fall";
if (me == "player") {
you = "enemy";
} else {
you = "player";
}
trace((((this._name + " ") + me) + " ") + you);
onEnterFrame = function () {
if (action == "fall") {
this._y = this._y + 25;
if (this._xscale == 100) {
if (this._rotation < 45) {
this._rotation = this._rotation + 2;
}
} else if (this._rotation > -45) {
this._rotation = this._rotation - 2;
}
if (this._y > (_root.bot - 50)) {
this.gotoAndPlay(2);
this.action = "explode";
} else if (this.hitTest(_root.back[you].body.hit)) {
trace("damage");
this.gotoAndPlay(2);
this.action = "explode";
_root.damage(20, you);
_root[you + "_action"] = "fall";
} else if (this.hitTest(_root.back[you].body.block)) {
trace("block");
this.gotoAndPlay(2);
this.action = "explode";
}
} else if (action == "unload") {
removeMovieClip(this);
}
};
Symbol 1312 MovieClip [fireball7] Frame 24
action = "unload";
Symbol 1315 MovieClip [fireball10] Frame 1
stop();
stop();
action = "fall";
if (me == "player") {
you = "enemy";
} else {
you = "player";
}
yspeed = random(10) - 5;
onEnterFrame = function () {
if (action == "fall") {
this._y = this._y + yspeed;
if (this._xscale == 100) {
this._x = this._x + 40;
} else {
this._x = this._x - 40;
}
if ((this._x > 2200) || (this._x < -200)) {
removeMovieClip(this);
} else if (this.hitTest(_root.back[you].body.hit)) {
this.gotoAndPlay(2);
this.action = "explode";
_root.damage(20, you);
if (this._xscale == 100) {
_root.player_xspeed = 20;
} else {
_root.player_xspeed = -20;
}
_root[you + "_action"] = "fall";
} else if (this.hitTest(_root.back[you].body.block)) {
this.gotoAndPlay(2);
if (this._xscale == 100) {
_root.player_xspeed = 5;
} else {
_root.player_xspeed = -5;
}
this.action = "explode";
}
} else if (action == "unload") {
removeMovieClip(this);
}
};
Symbol 1315 MovieClip [fireball10] Frame 24
action = "unload";
Symbol 1318 MovieClip [fireball8] Frame 1
stop();
stop();
action = "fall";
if (me == "player") {
you = "enemy";
} else {
you = "player";
}
yspeed = 0;
onEnterFrame = function () {
if (action == "fall") {
this._y = this._y + yspeed;
if (this._xscale == 100) {
this._x = this._x + 40;
} else {
this._x = this._x - 40;
}
if ((this._x > 2200) || (this._x < -200)) {
removeMovieClip(this);
} else if (this.hitTest(_root.back[you].body.hit)) {
this.gotoAndPlay(2);
this.action = "explode";
_root.damage(20, you);
if (this._xscale == 100) {
_root.player_xspeed = 20;
} else {
_root.player_xspeed = -20;
}
_root[you + "_action"] = "fall";
} else if (this.hitTest(_root.back[you].body.block)) {
this.gotoAndPlay(2);
if (this._xscale == 100) {
_root.player_xspeed = 5;
} else {
_root.player_xspeed = -5;
}
this.action = "explode";
}
} else if (action == "unload") {
removeMovieClip(this);
}
};
Symbol 1318 MovieClip [fireball8] Frame 24
action = "unload";
Symbol 1319 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1319 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1322 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1323 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1323 MovieClip Frame 38
fallstatus = "deathtest";
Symbol 1323 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1325 MovieClip Frame 1
play();
Symbol 1325 MovieClip Frame 44
play();
Symbol 1326 MovieClip Frame 4
_root.snd.woom.play();
Symbol 1326 MovieClip Frame 19
stop();
punch = "done";
Symbol 1327 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1327 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1328 MovieClip Frame 6
_root.snd.woom.play();
Instance of Symbol 1089 MovieClip in Symbol 1328 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.dis < 300) {
if (_parent._parent.me == "player") {
if ((_root.rightkey == true) || (_root.leftkey == true)) {
_parent.gotoAndPlay("hit");
}
}
if (_parent._parent.me == "enemy") {
trace("giuliani strike " + dis);
_parent.gotoAndPlay("hit");
}
}
}
Symbol 1329 MovieClip Frame 12
shoot = true;
Symbol 1332 MovieClip Frame 1
stop();
Symbol 1332 MovieClip Frame 10
gotoAndStop (1);
Symbol 1332 MovieClip Frame 35
gotoAndStop ("out");
Symbol 1332 MovieClip Frame 36
play();
Symbol 1332 MovieClip Frame 54
stop();
Symbol 1332 MovieClip Frame 55
stop();
Symbol 1333 MovieClip [fighter11] Frame 1
stop();
stop();
Instance of Symbol 1328 MovieClip in Symbol 1333 MovieClip [fighter11] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 30) {
this._alpha = this._alpha + 10;
}
}
Symbol 1333 MovieClip [fighter11] Frame 15
body.gotoAndPlay("doved");
Symbol 1334 MovieClip Frame 1
stop();
Symbol 1334 MovieClip Frame 2
gotoAndStop (1);
Symbol 1334 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 1334 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 1334 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 1334 MovieClip Frame 54
play();
Symbol 1334 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 1335 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1335 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1338 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1339 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1339 MovieClip Frame 38
fallstatus = "deathtest";
Symbol 1339 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1341 MovieClip Frame 1
play();
Symbol 1341 MovieClip Frame 44
play();
Symbol 1342 MovieClip Frame 4
_root.snd.woom.play();
Symbol 1342 MovieClip Frame 17
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1342 MovieClip Frame 18
stop();
punch = "done";
Symbol 1343 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1343 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1344 MovieClip Frame 6
_root.snd.woom.play();
Instance of Symbol 1089 MovieClip in Symbol 1344 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.dis < 300) {
if (_parent._parent.me == "player") {
if ((_root.rightkey == true) || (_root.leftkey == true)) {
_parent.gotoAndPlay("hit");
}
}
if (_parent._parent.me == "enemy") {
trace("giuliani strike " + dis);
_parent.gotoAndPlay("hit");
}
}
}
Symbol 1346 MovieClip Frame 7
shoot = true;
Symbol 1349 MovieClip Frame 1
stop();
Symbol 1349 MovieClip Frame 10
gotoAndStop (1);
Symbol 1349 MovieClip Frame 35
gotoAndStop ("out");
Symbol 1349 MovieClip Frame 36
play();
Symbol 1349 MovieClip Frame 54
stop();
Symbol 1349 MovieClip Frame 55
stop();
Symbol 1350 MovieClip [fighter12] Frame 1
stop();
stop();
Instance of Symbol 1344 MovieClip in Symbol 1350 MovieClip [fighter12] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 30) {
this._alpha = this._alpha + 10;
}
}
Symbol 1350 MovieClip [fighter12] Frame 15
body.gotoAndPlay("doved");
Symbol 1353 MovieClip Frame 40
stop();
Symbol 1354 MovieClip [fireball11] Frame 1
function frag(name) {
if (name.defined == undefined) {
name.xspeed = random(60) - 30;
name.yspeed = -random(50);
name.rotspeed = random(10) - 5;
name.defined = true;
}
name._x = name._x + name.xspeed;
name._y = name._y + name.yspeed;
name.yspeed = name.yspeed + 2;
name._alpha = name._alpha - 3;
name._rotation = name._rotation + name.rotspeed;
}
stop();
stop();
action = "fall";
if (me == "player") {
you = "enemy";
} else {
you = "player";
}
yspeed = 0;
onEnterFrame = function () {
if (action == "fall") {
this._y = this._y + yspeed;
if (this._xscale == 100) {
this._x = this._x + 30;
} else {
this._x = this._x - 30;
}
if ((this._x > 2200) || (this._x < -200)) {
removeMovieClip(this);
} else if (this.hitTest(_root.back[you].body.hit)) {
this.gotoAndPlay(2);
this.action = "explode";
_root.damage(20, you);
if (this._xscale == 100) {
_root.player_xspeed = 20;
} else {
_root.player_xspeed = -20;
}
_root[you + "_action"] = "fall";
} else if (this.hitTest(_root.back[you].body.block)) {
this.gotoAndPlay(2);
if (this._xscale == 100) {
_root.player_xspeed = 5;
} else {
_root.player_xspeed = -5;
}
this.action = "explode";
}
} else if (action == "unload") {
removeMovieClip(this);
}
};
Instance of Symbol 1256 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1256 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1259 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Instance of Symbol 1262 MovieClip in Symbol 1354 MovieClip [fireball11] Frame 2
onClipEvent (enterFrame) {
_parent.frag(this);
}
Symbol 1354 MovieClip [fireball11] Frame 37
action = "unload";
stop();
Symbol 1363 MovieClip Frame 44
stop();
removeMovieClip(_parent);
Symbol 1364 MovieClip [fireball12] Frame 1
onEnterFrame = function () {
this._x = me._x;
this._y = me._y - 250;
trace((me + " - ") + me._x);
if (this.fb.hit.hitTest(_root.back[you].body.hit)) {
_root.damage(20, you);
if (this._xscale == 100) {
_root[you + "_xspeed"] = 20;
} else {
_root[you + "_xspeed"] = -20;
}
_root[you + "_action"] = "fall";
} else if (this.fb.hit.hitTest(_root.back[you].body.block)) {
if (this._xscale == 100) {
_root[you + "_xspeed"] = 5;
} else {
_root[you + "_xspeed"] = -5;
}
}
};
Symbol 1365 MovieClip Frame 1
stop();
Symbol 1365 MovieClip Frame 2
gotoAndStop (1);
Symbol 1365 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 1365 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 1365 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 1365 MovieClip Frame 54
play();
Symbol 1365 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 1366 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1366 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1369 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1371 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1371 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1371 MovieClip Frame 64
fallstatus = "up";
stop();
Symbol 1374 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1374 MovieClip Frame 20
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1374 MovieClip Frame 21
stop();
punch = "done";
Symbol 1375 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1375 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1377 MovieClip Frame 1
_root.player_hardspeedoveride = true;
Symbol 1377 MovieClip Frame 7
if (_parent._name == "player") {
if ((_root.leftkey == true) || (_root.rightkey == true)) {
} else {
_root.player_yspeed = -20;
if (_root.back.player._xscale == 100) {
_root.player_xspeed = 10;
} else if (_root.back.player._xscale == -100) {
_root.player_xspeed = -10;
}
gotoAndPlay ("jump2");
}
} else if (_parent._name == "enemy") {
if (_root.enemy_xspeed == 0) {
gotoAndPlay ("jump");
}
}
Instance of Symbol 1376 MovieClip in Symbol 1377 MovieClip Frame 8
onClipEvent (enterFrame) {
if (_root.dis < 200) {
_parent.gotoAndPlay("jump");
}
}
Symbol 1377 MovieClip Frame 27
if (_parent._name == "player") {
_root.player_yspeed = -12;
if (_root.player_xspeed > 0) {
_root.player_xspeed = 40;
} else if (_root.player_xspeed < 0) {
_root.player_xspeed = -40;
}
} else if (_parent._name == "enemy") {
_root.enemy_yspeed = -12;
if (_root.enemy_xspeed > 0) {
_root.enemy_xspeed = 40;
} else if (_root.enemy_xspeed < 0) {
_root.enemy_xspeed = -40;
}
}
Symbol 1381 MovieClip Frame 1
function fireball() {
_root.fbsn++;
_root.back.attachMovie("fireball8", "fb" + _root.fbsn, 100 + _root.fbsn);
_root.back["fb" + _root.fbsn].me = _parent._name;
_root.back["fb" + _root.fbsn]._xscale = _parent._xscale;
if (_parent._xscale == 100) {
_root.back["fb" + _root.fbsn]._x = _parent._x + 50;
} else {
_root.back["fb" + _root.fbsn]._x = _parent._x - 50;
}
_root.back["fb" + _root.fbsn]._y = _parent._y - 205;
}
Symbol 1381 MovieClip Frame 9
shoot = true;
Symbol 1381 MovieClip Frame 10
fireball();
Symbol 1381 MovieClip Frame 22
fireball();
Symbol 1381 MovieClip Frame 35
fireball();
Symbol 1384 MovieClip Frame 1
stop();
Symbol 1384 MovieClip Frame 10
gotoAndStop (1);
Symbol 1384 MovieClip Frame 41
gotoAndStop ("out");
Symbol 1384 MovieClip Frame 42
play();
Symbol 1384 MovieClip Frame 63
stop();
Symbol 1385 MovieClip [fighter14] Frame 1
stop();
stop();
Symbol 1386 MovieClip Frame 1
stop();
Symbol 1386 MovieClip Frame 2
gotoAndStop (1);
Symbol 1386 MovieClip Frame 3
if (walkdir == "b") {
gotoAndStop ("walkback");
} else if (walkdir == "f") {
gotoAndStop ("walkfor");
}
Symbol 1386 MovieClip Frame 8
if (walkdir == "b") {
gotoAndStop ("loop2");
}
Symbol 1386 MovieClip Frame 50
if (walkdir == "f") {
gotoAndStop ("loop");
}
Symbol 1386 MovieClip Frame 54
play();
Symbol 1386 MovieClip Frame 57
walkdir = "";
gotoAndStop (1);
Symbol 1387 MovieClip Frame 31
gotoAndPlay ("loop");
Symbol 1387 MovieClip Frame 64
gotoAndPlay ("loop2");
Symbol 1390 MovieClip Frame 2
_root.snd.woom.play();
Symbol 1391 MovieClip Frame 12
if (fallstatus == "ground") {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1391 MovieClip Frame 24
fallstatus = "deathtest";
Symbol 1391 MovieClip Frame 65
fallstatus = "up";
stop();
Symbol 1394 MovieClip Frame 4
_root.snd.woom.play();
Symbol 1394 MovieClip Frame 18
if (_root.ckey == true) {
gotoAndPlay (2);
}
Symbol 1394 MovieClip Frame 19
stop();
punch = "done";
Symbol 1395 MovieClip Frame 3
_root.snd.woom.play();
Symbol 1395 MovieClip Frame 11
_root.snd.woom.play();
Symbol 1396 MovieClip Frame 6
_root.snd.woom.play();
Instance of Symbol 1089 MovieClip in Symbol 1396 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_root.dis < 300) {
if (_parent._parent.me == "player") {
if ((_root.rightkey == true) || (_root.leftkey == true)) {
_parent.gotoAndPlay("hit");
}
}
if (_parent._parent.me == "enemy") {
trace("giuliani strike " + dis);
_parent.gotoAndPlay("hit");
}
}
}
Symbol 1405 MovieClip Frame 9
shoot = true;
Symbol 1408 MovieClip Frame 1
stop();
Symbol 1408 MovieClip Frame 10
gotoAndStop (1);
Symbol 1408 MovieClip Frame 38
gotoAndStop ("out");
Symbol 1409 MovieClip [fighter13] Frame 1
stop();
stop();
Instance of Symbol 1396 MovieClip in Symbol 1409 MovieClip [fighter13] Frame 11
onClipEvent (enterFrame) {
this.gotoAndStop(_parent.body._currentframe);
this._x = _parent.body._x - Math.abs(_root[_parent._name + "_xspeed"] * 2);
if (this._alpha < 60) {
this._alpha = this._alpha + 10;
}
}
Symbol 1412 MovieClip Frame 1
stop();
Symbol 1412 MovieClip Frame 5
stop();
Symbol 1412 MovieClip Frame 6
stop();
Symbol 1413 MovieClip [fireball13] Frame 1
onEnterFrame = function () {
_root.fireballcodebiden(this);
};
Instance of Symbol 1412 MovieClip "head3" in Symbol 1413 MovieClip [fireball13] Frame 1
onClipEvent (enterFrame) {
_root.bfoot(this);
}
Instance of Symbol 1412 MovieClip "head2" in Symbol 1413 MovieClip [fireball13] Frame 1
onClipEvent (enterFrame) {
_root.bfoot(this);
}
Instance of Symbol 1412 MovieClip "head1" in Symbol 1413 MovieClip [fireball13] Frame 1
onClipEvent (enterFrame) {
_root.bfoot(this);
}
Symbol 1414 MovieClip Frame 1
stop();
Symbol 1419 MovieClip Frame 1
stop();
Instance of Symbol 1418 MovieClip in Symbol 1419 MovieClip Frame 2
onClipEvent (load) {
trace("shakeit");
countup = 10;
starty = _root.back._y;
shakeit = "down";
}
onClipEvent (enterFrame) {
if (shakeit == "down") {
_root.back._y = starty + (countup * 8);
trace("up " + _root.back._y);
shakeit = "up";
} else {
countup--;
_root.back._y = starty;
trace("down " + _root.back._y);
shakeit = "down";
}
}
Symbol 1430 MovieClip Frame 1
stop();
Symbol 1439 MovieClip Frame 3
gotoAndStop((_currentframe + 1) + random(2));
Symbol 1440 MovieClip Frame 1
stop();
Instance of Symbol 1430 MovieClip in Symbol 1440 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(random(4));
}
Instance of Symbol 1457 MovieClip "hit" in Symbol 1473 MovieClip Frame 7
onClipEvent (enterFrame) {
if (this.hitTest(_level1.player.hit)) {
_level1.hurthalf.play();
}
}
Symbol 1473 MovieClip Frame 15
gotoAndPlay ("loop");
Symbol 1473 MovieClip Frame 34
_parent._parent.gotoAndStop(1);
Instance of Symbol 1473 MovieClip "fb" in Symbol 1474 MovieClip Frame 4
onClipEvent (enterFrame) {
if (this.hitTest(_level1.player.hit)) {
_level1.hurthalf.play();
}
}
Symbol 1474 MovieClip Frame 34
stop();
_parent.gotoAndStop(1);
Symbol 1478 MovieClip Frame 17
stop();
Symbol 1478 MovieClip Frame 18
play();
Symbol 1478 MovieClip Frame 28
_parent._parent.gotoAndStop(1);
Symbol 1480 MovieClip Frame 34
stop();
_parent.gotoAndStop(1);
Symbol 1483 MovieClip Frame 1
stop();
Symbol 1483 MovieClip Frame 22
stop();
_parent._parent._parent.gotoAndStop(1);
Symbol 1483 MovieClip Frame 23
gotoAndStop(_currentframe - 1);
Symbol 1484 MovieClip Frame 13
stop();
Instance of Symbol 1483 MovieClip "harpoon" in Symbol 1484 MovieClip Frame 13
onClipEvent (enterFrame) {
trace(_parent._currentframe);
if ((me == undefined) || (you == undefined)) {
you = _parent.you;
me = _parent.me;
}
if (action == "fly") {
this._x = this._x + xspeed;
disx = disx + xspeed;
if (this.hit.hitTest(_root.back[you].body.hit) & (_root[you + "_jump"] != "jumping")) {
_root.snd.hard.play();
_root.snd.comehere.play();
_root[you + "_action"] = "harpooned";
_root.back[you].gotoAndPlay("harpooned");
_root.back[me].body.gotoAndPlay("reel");
_parent.play();
_root.blood(4, 30, me, you);
_root.damage(10, you);
delayct = 20;
action = "delay";
} else if (this.hit.hitTest(_root.back[you].body.block)) {
_root.snd.block.play();
_root.back[me].body.gotoAndPlay("miss");
this.play();
action = "blocked";
} else if (disx > 800) {
_root.back[me].body.gotoAndPlay("miss");
action = "missed";
}
} else if (action == "delay") {
_root[you + "_action"] = "harpooned";
_root.back[you].gotoAndStop("harpooned");
_root.back[you].body.gotoAndStop(1);
if (delayct <= 0) {
action = "reelin";
} else {
delayct--;
}
} else if (action == "reelin") {
_root[you + "_action"] = "harpooned";
_root.back[you].gotoAndStop("harpooned");
_root.back[you].body.gotoAndStop(1);
if (_root.dis < 150) {
_root.back[me].body.gotoAndPlay("reeled");
action = "reeled";
} else {
this._x = this._x - 30;
if (_root.back[me]._xscale == 100) {
_root.back[you]._x = _root.back[you]._x - 30;
} else if (_root.back[me]._xscale == -100) {
_root.back[you]._x = _root.back[you]._x + 30;
}
}
} else if (action == "reeled") {
_parent._parent.gotoAndStop(1);
} else if (action == "missed") {
this._x = this._x + xspeed;
disx = disx + xspeed;
if (disx > 1600) {
_parent._parent.gotoAndStop(1);
}
} else if (action == "blocked") {
if (this._currentframe >= 21) {
_parent._parent.gotoAndStop(1);
}
}
}
onClipEvent (load) {
xspeed = 55;
disx = 0;
action = "fly";
}
Symbol 1484 MovieClip Frame 21
stop();
Symbol 1485 MovieClip Frame 1
stop();
Instance of Symbol 1480 MovieClip "en" in Symbol 1485 MovieClip Frame 4
onClipEvent (enterFrame) {
if (this._currentframe != 1) {
this.play();
}
}
Symbol 1491 MovieClip Frame 1
stop();
Symbol 1491 MovieClip Frame 13
stop();
Symbol 1492 MovieClip Frame 1
stop();
shad1._alpha = 50;
shad2._alpha = 0;
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1492 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}
Symbol 1495 Button
on (press) {
gotoAndStop (2);
}
Symbol 1497 Button
on (press) {
_root.musicvol = "off";
stopAllSounds();
gotoAndStop (1);
}
Symbol 1499 MovieClip Frame 1
stop();
Symbol 1520 MovieClip Frame 56
stop();
onPress = function () {
_root.fader.play();
_root.fader.dest = "rank";
};
Symbol 1540 MovieClip Frame 1
stop();
Symbol 1541 MovieClip Frame 1
stop();
Symbol 1548 MovieClip Frame 1
stop();
Symbol 1551 MovieClip Frame 1
stop();
Symbol 1552 MovieClip Frame 1
stop();
Instance of Symbol 1524 MovieClip "playerbar" in Symbol 1553 MovieClip Frame 1
onClipEvent (load) {
startwidth = this._width;
}
onClipEvent (enterFrame) {
curlife = _root.player_life;
if ((curlife <= 0) & (curlife != undefined)) {
this.life._width = 0;
}
if (this.life._width > curlife) {
dif = this.life._width - curlife;
this.life._width = this.life._width - (dif / 25);
if (dif < 0.2) {
this.life._width = curlife;
}
}
}
onClipEvent (mouseDown) {
}
Instance of Symbol 1524 MovieClip "enemybar" in Symbol 1553 MovieClip Frame 1
onClipEvent (load) {
startwidth = this._width;
}
onClipEvent (enterFrame) {
curlife = _root.enemy_life;
if ((curlife <= 0) & (curlife != undefined)) {
this.life._width = 0;
}
if (this.life._width > curlife) {
dif = this.life._width - curlife;
this.life._width = this.life._width - (dif / 10);
if (dif < 0.2) {
this.life._width = curlife;
}
}
}
onClipEvent (mouseDown) {
}
Instance of Symbol 1540 MovieClip in Symbol 1553 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.player_charnum);
}
Instance of Symbol 1541 MovieClip in Symbol 1553 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.enemy_charnum);
}
Instance of Symbol 1548 MovieClip in Symbol 1553 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.roundnum);
}
Instance of Symbol 1551 MovieClip in Symbol 1553 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndPlay(_root.player_roundswon + 1);
}
Instance of Symbol 1552 MovieClip in Symbol 1553 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndPlay(_root.enemy_roundswon + 1);
}
Symbol 1559 MovieClip Frame 1
stop();
Symbol 1565 MovieClip Frame 8
_parent.removeMovieClip();
Symbol 1566 MovieClip Frame 1
stop();
Symbol 1567 MovieClip Frame 1
function rain(name) {
if (name._name != "rain") {
if (name.defined == undefined) {
name._x = (-_root.back._x) + random(800);
name._y = -150;
name._height = random(50) + 20;
name._alpha = 50 + random(50);
name.action = "fall";
name.bot = 350 + random(120);
name.defined = true;
}
if (name.action == "fall") {
name._y = name._y + 30;
if (name._y > name.bot) {
name._y = name.bot;
name.action = "hit";
}
} else if (name.action == "hit") {
name.gotoAndStop(2);
}
}
}
shad1._alpha = 80;
shad2._alpha = 80;
rsn = 0;
raincount = 0;
rainlim = random(3);
onEnterFrame = function () {
raincount++;
if (raincount > rainlim) {
raincount = 0;
rainlim = random(6);
rsn++;
if (rsn > 100) {
rsn = 0;
}
duplicateMovieClip ("rain", "rain" + rsn, rsn + 10005);
}
};
ytype = "scroll";
Instance of Symbol 1559 MovieClip in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(random(40));
this._x = -_parent._x;
}
onClipEvent (load) {
this.swapDepths(10001);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}
Instance of Symbol 1566 MovieClip "rain" in Symbol 1567 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.rain(this);
}
Symbol 1570 Button
on (press) {
gotoAndStop (2);
}
Symbol 1572 Button
on (press) {
_root.musicvol = "off";
stopAllSounds();
gotoAndStop (1);
}
Symbol 1574 MovieClip Frame 1
stop();
Symbol 1576 Button
on (press) {
stopAllSounds();
_root.fader.play();
_root.fader.dest = "open";
}
Symbol 1580 MovieClip Frame 1
shad1._alpha = 26;
shad2._alpha = 26;
delete onEnterFrame;
ytype = "noscroll";
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1580 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1580 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1580 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1580 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1580 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1580 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}
Symbol 1582 Button
on (press) {
gotoAndStop (2);
}
Symbol 1583 Button
on (press) {
_root.musicvol = "off";
stopAllSounds();
gotoAndStop (1);
}
Symbol 1585 MovieClip Frame 1
stop();
Symbol 1594 MovieClip Frame 1
shad1._alpha = 100;
shad2._alpha = 100;
ytype = "scroll";
Instance of Symbol 1590 MovieClip in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10001);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1593 MovieClip in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10002);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1590 MovieClip in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10003);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1593 MovieClip in Symbol 1594 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10004);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}
Instance of Symbol 1559 MovieClip in Symbol 1594 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(random(40));
this._x = -_parent._x;
}
onClipEvent (load) {
this.swapDepths(10005);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Symbol 1598 MovieClip Frame 1
shad1._alpha = 100;
shad2._alpha = 100;
ytype = "noscroll";
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1598 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1598 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1598 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1598 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1598 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1598 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}
Symbol 1608 MovieClip Frame 1
shad1._alpha = 100;
shad2._alpha = 100;
ytype = "noscroll";
Instance of Symbol 1604 MovieClip in Symbol 1608 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10002);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1607 MovieClip in Symbol 1608 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10001);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1608 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1608 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1608 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1608 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1608 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1608 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}
Symbol 1624 MovieClip Frame 1
shad1._alpha = 30;
shad2._alpha = 30;
ytype = "scroll";
Instance of Symbol 1614 MovieClip in Symbol 1624 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10001);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1617 MovieClip in Symbol 1624 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10002);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1614 MovieClip in Symbol 1624 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10003);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1617 MovieClip in Symbol 1624 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10004);
}
onClipEvent (enterFrame) {
_root.unloader(this);
}
Instance of Symbol 1423 MovieClip "shad1" in Symbol 1624 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.player._x;
this._y = _root.bot;
}
Instance of Symbol 1423 MovieClip "shad2" in Symbol 1624 MovieClip Frame 1
onClipEvent (enterFrame) {
this._x = _parent.enemy._x;
this._y = _root.bot;
}
Instance of Symbol 1440 MovieClip "blooddrop" in Symbol 1624 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bloodmovement(this);
}
Instance of Symbol 1485 MovieClip "player_fireball" in Symbol 1624 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "enemy";
this.en.me = "player";
}
Instance of Symbol 1485 MovieClip "enemy_fireball" in Symbol 1624 MovieClip Frame 1
onClipEvent (enterFrame) {
this.en.you = "player";
this.en.me = "enemy";
}
Instance of Symbol 1491 MovieClip "dove" in Symbol 1624 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.dove_fly(this, me, you);
}