Frame 1
preLoad = function () {
if (getBytesLoaded() == getBytesTotal()) {
clearInterval(preloadINT);
play();
} else {
intLoad = getBytesLoaded();
intTotal = getBytesTotal();
_root.loadnum.text = Math.floor((intLoad / intTotal) * 100) + "%";
}
};
preloadINT = setInterval(preLoad, 40);
stop();
Frame 4
function moveStandard() {
if (((Key.isDown(37) && (chara_mc._x > leftEdge)) && (!gameOver)) && (!isJumping)) {
chara_mc._x = chara_mc._x - charaSpeed;
_global.faceDirection = "left";
if (_global.isDucking == true) {
chara_mc.gotoAndStop(12);
} else {
chara_mc.gotoAndStop(6);
}
}
if (((Key.isDown(39) && (chara_mc._x < rightEdge)) && (!gameOver)) && (!isJumping)) {
chara_mc._x = chara_mc._x + charaSpeed;
_global.faceDirection = "right";
if (_global.isDucking == true) {
chara_mc.gotoAndStop(11);
} else {
chara_mc.gotoAndStop(5);
}
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
if (_global.faceDirection == "right") {
chara_mc.gotoAndStop(1);
} else {
chara_mc.gotoAndStop(2);
}
}
if (isJumping) {
chara_mc._y = chara_mc._y + jumpSpeed;
if (chara_mc._y > 65) {
if (_root.wall1.hitTest(chara_mc) || (_root.wall2.hitTest(chara_mc))) {
chara_mc._x = chara_mc._x + 0;
} else if (_global.faceDirection == "right") {
chara_mc._x = chara_mc._x + 3;
chara_mc.gotoAndStop(3);
} else {
chara_mc._x = chara_mc._x - 3;
chara_mc.gotoAndStop(4);
}
}
jumpSpeed = jumpSpeed + 1;
if (chara_mc._y > chara_startY) {
chara_mc._y = chara_startY;
isJumping = false;
if (chara_mc._currentframe == 3) {
chara_mc.gotoAndStop(1);
} else {
chara_mc.gotoAndStop(2);
}
}
}
if (!isJumping) {
if (Key.isDown(32)) {
if (_root.jumpStopperRight.hitTest(chara_mc) && (chara_mc._currentframe == 1)) {
} else if (_root.jumpStopperEnd.hitTest(chara_mc) && (chara_mc._currentframe == 2)) {
} else if (_root.jumpStopperLeft.hitTest(chara_mc) && (chara_mc._currentframe == 2)) {
} else if (_root.jumpStopperEnd2.hitTest(chara_mc) && (chara_mc._currentframe == 1)) {
} else {
isJumping = true;
jumpSpeed = -14;
}
}
}
}
function showMatchSticks() {
i = 1;
while (i <= _global.matchsticks) {
eval ("_root.matchsticks.stick" + i)._visible = true;
i++;
}
}
function resetLevel() {
Mouse.show();
_global.startLevel = false;
_root.fadeout.play();
}
function clearAllIntervals() {
var _local1 = setInterval(play, 1000);
while (_local1 > 0) {
clearInterval(_local1);
_local1--;
}
}
function playSound(strName) {
gameSFX = new Sound();
gameSFX.attachSound("sfx_" + strName);
gameSFX.start();
}
var initGame = function () {
_global.intLevel = 1;
_root.halfCharaWidth = (chara_mc._width / 2) - 10;
_root.leftEdge = 55 + halfCharaWidth;
_root.rightEdge = 680 - halfCharaWidth;
_root.charaSpeed = 6;
_global.healthbar = 124.8;
_global.lives = 4;
_global.heartbar = 102.1;
_global.score = 0;
_global.matchsticks = 0;
_global.gameCompleted = false;
_root.health_bar.bar._width = 124.8;
_root.hearts.hearts_bar._width = 102.1;
};
var initLevel = function () {
if (_global.gameCompleted == true) {
_root.gotoAndStop("congrats");
} else if (_global.lives <= 0) {
_root.gotoAndStop("gameover");
}
_global.startLevel = false;
_global.gameTime = 30;
_global.gameOver = false;
_global.healthbar = 124.8;
_root.isJumping = false;
_root.jumpSpeed = 0;
_root.timeBox.text = _global.gameTime;
_root.chara_mc._y = _global.intStartY;
_root.chara_mc._x = _global.intStartX;
chara_mc.gotoAndStop(1);
chara_startY = chara_mc._y;
_global.pillarFlaming = false;
_global.isJumping = false;
_global.faceDirection = "right";
_global.isDucking = false;
_global.keyRaised = false;
_root.jaguar._x = -100;
_global.jaguarSpeed = 0.4;
_global.stopJaguar = false;
_global.jaguarStopped = false;
_global.jaguarFree = false;
_root.jag_lair.jag_door._y = 0;
_root.jag_lair.jag_eyes._alpha = 100;
_root.jaguar.gotoAndStop(1);
monster._y = 550;
monster._x = 0;
_root.currentSpike = 0;
_root.spikesDelay = -1;
_root.spacePressed = false;
_root.angled = false;
_root.power = 0;
_global.angle = 45;
_root.gravity = 1.5;
_root.multiplier = 0.5;
_root.groundHit = false;
_global.snakeMoving = false;
_root.health_bar.bar._width = 124.8;
};
var startLevel = function () {
_global.startLevel = true;
var _local4 = setInterval(countDown, 1000);
var _local3 = setInterval(countFired1, 1000);
var _local2 = setInterval(countFired2, 1000);
};
var checkHealth = function () {
if (_root.health_bar.bar._width == 0.8) {
loseLife();
}
};
var countDown = function () {
if (_global.startLevel != false) {
_global.gameTime--;
if (_global.gameTime == 0) {
_global.gameTime = 30;
loseLife();
return(false);
}
_root.timeBox.text = _global.gameTime;
if (_global.gameTime <= 10) {
_root.timeBox.textColor = 15678015 /* 0xEF3A3F */;
} else {
_root.timeBox.textColor = 11004339 /* 0xA7E9B3 */;
}
}
};
var pickupObject = function () {
i = 0;
while (i < 9) {
if (chara_mc.hitTest(_root["coin" + i])) {
_global.score = _global.score + 200;
_root["coin" + i]._y = _root["coin" + i]._y + 600;
_root.playSound("coin");
}
i++;
}
if (chara_mc.hitTest(_root.bigCoin)) {
_global.score = _global.score + 900;
_root.bigCoin._y = _root.bigCoin._y + 600;
_root.playSound("coin");
}
_root.score.text = _global.score;
i = 1;
while (i < 5) {
if (chara_mc.hitTest(_root["match" + i])) {
_root["match" + i]._y = _root["match" + i]._y + 600;
_global.matchsticks++;
_root.playSound("match");
showMatchSticks();
}
i++;
}
if (chara_mc.hitTest(_root.matchstick)) {
_root.matchstick._y = _root.matchstick._y + 600;
_global.matchsticks++;
_root.playSound("match");
showMatchSticks();
}
};
var loseLife = function () {
if (_global.faceDirection == "right") {
chara_mc.gotoAndStop(9);
} else {
chara_mc.gotoAndStop(10);
}
clearAllIntervals();
_global.lives--;
_root.hearts.hearts_bar._width = _root.hearts.hearts_bar._width - 25;
_global.startLevel = false;
_root.playSound("death");
resetLevel();
};
var endLevel = function () {
_global.startLevel = false;
_global.intLevel++;
gotoAndStop("level" + _global.intLevel);
};
onEnterFrame = function () {
if (_global.startLevel == false) {
return(false);
}
levelCode();
pickupObject();
checkHealth();
if (chara_mc.hitTest(_root.end_level)) {
endLevel();
}
};
stop();
Frame 8
stop();
Frame 19
stop();
_global.gameTime = 30;
_root.clearAllIntervals();
function tvc_tracker(url, media_id, format) {
tvc_lv = new LoadVars();
tvc_lv.media = media_id;
tvc_lv.f = format;
return(tvc_lv.sendAndLoad(url, tvc_lv, "get"));
}
i = -16734;
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:239, td:"239.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_mc.kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", i - 1);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
_root.tvc_media = "713";
System.security.allowDomain(_parent.url);
strUrl = ((url != null) ? (url) : "http://www.viralchart.com");
if ((_root.tvc_media != null) && (_root.tvc_media != "")) {
_root.tvc_media = (tvc_tracker(strUrl + "/tracker.php", _root.tvc_media, "F") ? null : (_root.tvc_media));
}
stop();
Frame 20
function countFired1() {
if (spikesDelay == 8) {
spikesDelay = 0;
} else {
spikesDelay++;
}
if (spikesDelay == 0) {
_root.spikes1.play();
_root.spikes2.play();
_root.spikes3.play();
_root.spikes4.play();
_root.spikes5.play();
} else if (spikesDelay == 4) {
_root.spikes1.play();
_root.spikes2.play();
_root.spikes3.play();
_root.spikes4.play();
_root.spikes5.play();
} else if (spikesDelay == 5) {
_root.spikes6.play();
_root.spikes7.play();
_root.spikes8.play();
_root.spikes9.play();
_root.spikes10.play();
} else if (spikesDelay == 8) {
_root.spikes6.play();
_root.spikes7.play();
_root.spikes8.play();
_root.spikes9.play();
_root.spikes10.play();
}
}
_global.intStartX = 54.1;
_global.intStartY = 280;
initGame();
initLevel();
startLevel();
spikeSFX = new Sound();
spikeSFX.attachSound("sfx_spikes");
spikeSFX.start(0, 100);
var levelCode = function () {
moveStandard();
i = 0;
while (i < 11) {
if (_root["spikes" + i]._currentframe > 1) {
if (chara_mc.hitTest(_root["spikes" + i].spikey_hit1)) {
_root.health_bar.bar._width = _root.health_bar.bar._width - 1;
}
if (chara_mc.hitTest(_root["spikes" + i].spikey_hit2)) {
_root.health_bar.bar._width = _root.health_bar.bar._width - 1;
}
}
i++;
}
};
Frame 24
_global.gameTime = 30;
_root.clearAllIntervals();
spikeSFX.stop("sfx_spikes");
Frame 25
_global.intStartX = 54.1;
_global.intStartY = 240;
snakeSFX = new Sound();
snakeSFX.attachSound("sfx_hiss");
snakeSFX.start(0, 100);
initLevel();
startLevel();
chara_startX = chara_mc._x;
chara_startY = chara_mc._y;
jumpSpeed = 0;
power_bar._visible = false;
power_text._visible = false;
var levelCode = function () {
if (((((Key.isDown(37) && (chara_mc._x > leftEdge)) && (!gameOver)) && (!isJumping)) && (!falling)) && (!groundHit)) {
chara_mc._x = chara_mc._x - charaSpeed;
_global.faceDirection = "left";
if (_global.isDucking == true) {
chara_mc.gotoAndStop(8);
} else {
chara_mc.gotoAndStop(6);
}
}
if (((((Key.isDown(39) && (chara_mc._x < rightEdge)) && (!gameOver)) && (!isJumping)) && (!falling)) && (!groundHit)) {
chara_mc._x = chara_mc._x + charaSpeed;
_global.faceDirection = "right";
if (_global.isDucking == true) {
chara_mc.gotoAndStop(9);
} else {
chara_mc.gotoAndStop(5);
}
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
if (_global.faceDirection == "right") {
chara_mc.gotoAndStop(1);
} else {
chara_mc.gotoAndStop(2);
}
}
if (((Key.isDown(32) && (!isJumping)) && (!falling)) && (angled == true)) {
spacePressed = true;
if (power == 50) {
} else {
_root.power_bar.power_mask._x = _root.power_bar.power_mask._x + 1;
power = power + 1;
}
} else if (((((!Key.isDown(32)) && (spacePressed == true)) && (!isJumping)) && (!Key.isDown(65))) && (angled == true)) {
power_bar._visible = false;
power_text._visible = false;
angler._visible = false;
radians = _global.angle * (Math.PI/180);
angle = radians * 57.2957795130823;
xspeed = Math.cos((_global.angle * 180) / Math.PI) * power;
yspeed = Math.sin((_global.angle * 180) / Math.PI) * power;
spacePressed = false;
isJumping = true;
}
if (Key.isDown(65)) {
_root.angler.stop();
power_bar._visible = true;
power_text._visible = true;
angled = true;
}
if (isJumping == true) {
if (_global.faceDirection == "right") {
chara_mc.gotoAndStop(3);
} else {
chara_mc.gotoAndStop(4);
}
if (chara_mc.hitTest(_root.goal)) {
isJumping = false;
} else if (ceilingHit == true) {
chara_mc._x = chara_mc._x - 0;
chara_mc._y = chara_mc._y + 20;
} else if (((!ceilingHit) && (!groundHit)) && (!wallHit)) {
yspeed = yspeed - gravity;
chara_mc._x = chara_mc._x - (xspeed * multiplier);
chara_mc._y = chara_mc._y - (yspeed * multiplier);
}
}
i = 0;
while (i < 4) {
if (chara_mc.hitTest(_root["ceiling" + i])) {
ceilingHit = true;
}
i++;
}
if (chara_mc.hitTest(_root.lower_wall)) {
wallHit = true;
}
if (falling == true) {
chara_mc._x = chara_mc._x - 0;
chara_mc._y = chara_mc._y + 20;
}
if (wallHit == true) {
chara_mc._x = chara_mc._x - 5;
chara_mc._y = chara_mc._y + 15;
}
if ((chara_mc.hitTest(_root.gap) && (!isJumping)) && (!groundHit)) {
falling = true;
}
if (chara_mc.hitTest(_root.ground)) {
chara_mc._x = chara_mc._x;
chara_mc._y = chara_mc._y;
groundHit = true;
isJumping = false;
ceilingHit = false;
falling = false;
wallHit = false;
if (_global.startLevel == true) {
if (_global.snakeMoving == false) {
_global.gameTime = 30;
snake_head.gotoAndPlay("attack_start");
_global.snakeMoving = true;
}
}
if (_global.snakeMoving == true) {
if (_root.snake_head.mouth.hitTest(_root.chara_mc)) {
_root.snake_head.stop();
_root.loseLife();
}
}
}
};
Frame 29
_global.gameTime = 30;
_root.clearAllIntervals();
snakeSFX.stop("sfx_hiss");
Frame 30
function startPillar() {
_global.intPillar = Math.floor(Math.random() * 7) + 1;
eval ("_root.pillar_" + _global.intPillar).isFlaming = true;
}
_global.intStartX = 54.1;
_global.intStartY = 280;
initLevel();
startLevel();
var levelCode = function () {
moveStandard();
if (_global.pillarFlaming == false) {
i = 1;
while (i <= 4) {
if (i == 2) {
_root.playSound("fire");
}
startPillar();
i++;
}
}
};
Frame 34
_global.gameTime = 30;
_root.clearAllIntervals();
Frame 35
function freeJaguar() {
if (_global.jaguarFree == true) {
moveJaguar();
} else {
if (_root.jag_lair.jag_door._y <= -75) {
_root.playSound("growl");
_global.jaguarFree = true;
_root.jag_lair.jag_eyes._alpha = 0;
_root.jaguar._x = 80;
_root.jaguar._visible = true;
}
_root.jag_lair.jag_door._y = _root.jag_lair.jag_door._y - 1.9;
}
}
function moveJaguar() {
if (_global.jaguarStopped == true) {
return(false);
}
if (_global.stopJaguar != true) {
if (_root.jaguar._x <= 200) {
_root.jaguar._x = _root.jaguar._x + _global.jaguarSpeed;
_global.jaguarSpeed = _global.jaguarSpeed * 1.1;
} else {
_root.playSound("growl");
_global.stopJaguar = true;
_root.jaguar.gotoAndStop(2);
}
} else if (_root.jaguar._x > 80) {
_root.jaguar._x = _root.jaguar._x - 3;
} else {
_root.jaguar._x = -200;
_global.jaguarStopped = true;
}
}
function hitJaguar() {
if (_global.startLevel == true) {
var _local3 = 20;
_root.health_bar.bar._width = _root.health_bar.bar._width - _local3;
if ((_root.health_bar.bar._width - _local3) <= 0) {
_root.health_bar.bar._width = 0.8;
}
}
}
function hitWires() {
if (_global.startLevel == true) {
var _local3 = 10;
_root.health_bar.bar._width = _root.health_bar.bar._width - _local3;
if ((_root.health_bar.bar._width - _local3) <= 0) {
_root.health_bar.bar._width = 0.8;
}
}
}
_global.intStartX = 54.1;
_global.intStartY = 280;
initLevel();
startLevel();
var levelCode = function () {
moveStandard();
if (Key.isDown(40) && (!isJumping)) {
if (!isDucking) {
_global.isDucking = true;
}
} else {
_global.isDucking = false;
}
freeJaguar();
};
Frame 39
_global.gameTime = 30;
_root.clearAllIntervals();
Frame 40
function moveMonster() {
charaX = _root.chara_mc._x;
charaY = _root.chara_mc._y;
myRadians = Math.atan2(charaY - monster._y, charaX - monster._x);
myDegrees = Math.round((myRadians * 180) / Math.PI);
_root.yChange = Math.round(charaY - monster._y);
_root.xChange = Math.round(charaX - monster._x);
_root.yMove = Math.round(_root.yChange / 20);
_root.xMove = Math.round(_root.xChange / 20);
monster._y = monster._y + _root.yMove;
monster._x = monster._x + _root.xMove;
if (monster._x < charaX) {
monster.gotoAndStop(20);
} else {
monster.gotoAndStop(1);
}
}
function hitMonster() {
if (_global.startLevel == true) {
var _local3 = 8;
_root.health_bar.bar._width = _root.health_bar.bar._width - _local3;
if ((_root.health_bar.bar._width - _local3) <= 0) {
_root.health_bar.bar._width = 0.8;
}
}
}
_global.intStartX = chara_mc._x;
_global.intStartY = chara_mc._y;
initLevel();
startLevel();
waterSFX = new Sound();
waterSFX.attachSound("sfx_water");
waterSFX.start(0, 100);
var levelCode = function () {
if (((Key.isDown(37) && (chara_mc._x > leftEdge)) && (!gameOver)) && (!isJumping)) {
chara_mc._x = chara_mc._x - charaSpeed;
chara_mc.gotoAndStop(8);
}
if (((Key.isDown(39) && (chara_mc._x < rightEdge)) && (!gameOver)) && (!isJumping)) {
chara_mc._x = chara_mc._x + charaSpeed;
chara_mc.gotoAndStop(7);
}
if ((!Key.isDown(39)) && (!Key.isDown(37))) {
if (_global.faceDirection == "right") {
chara_mc.gotoAndStop(7);
} else {
chara_mc.gotoAndStop(8);
}
}
if (Key.isDown(38)) {
if (chara_mc._y >= 105) {
chara_mc._y = chara_mc._y - 4;
}
} else if (chara_mc._y <= 460) {
chara_mc._y = chara_mc._y + 5;
}
_root.mask._x = chara_mc._x - 510;
_root.mask._y = chara_mc._y - 510;
moveMonster();
if (monster.hitSpot.hitTest(chara_mc)) {
hitMonster();
}
if (crack.hitTest(chara_mc)) {
if (Key.isDown(32)) {
gotoAndStop ("level6");
}
}
};
Frame 44
_global.gameTime = 30;
_root.clearAllIntervals();
waterSFX.stop("sfx_water");
Frame 45
function assignMatches() {
i = 1;
while (i <= 10) {
eval ("_root.match_" + i)._visible = false;
i++;
}
i = 1;
while (i <= _global.matchsticksLeft) {
eval ("_root.match_" + i)._visible = true;
i++;
}
_global.matchesAssigned = true;
if (_global.matchsticksLeft < _global.matchsticks) {
_global.matchHeld = true;
}
}
stop();
_global.intStartX = -100;
_global.intStartY = -100;
initLevel();
startLevel();
Mouse.hide();
_global.gameTime = 50000;
_global.matchsticksLeft = _global.matchsticks;
_global.matchesAssigned = false;
_global.matchHeld = false;
_global.mouseHeld = false;
_global.matchLit = false;
_global.intMouseLastX = 0;
_global.intMouseLastY = 0;
_global.intStrikeEnergy = 0;
_global.intFrameCount = 0;
_global.intFlameLife = 0;
var levelCode = function () {
_global.intFrameCount++;
if (_global.matchesAssigned == false) {
if (_global.matchHeld == false) {
assignMatches();
}
}
_root.hand._y = _ymouse - 600;
_root.hand._x = _xmouse;
_root.hand._x = _root.hand._x + (Math.floor(Math.random() * 4) + 1);
_root.hand._y = _root.hand._y - (Math.floor(Math.random() * 4) + 1);
if (_global.matchLit == true) {
if (_root.hand.match.flame._visible == false) {
_root.hand.match.flame._visible = true;
}
if ((_global.intFrameCount % _global.intFlameLife) == 0) {
_global.matchHeld = false;
_global.matchLit = false;
_root.hand.match.flame._visible = false;
_root.hand.match._visible = false;
if (_global.matchsticksLeft <= 0) {
_global.lives = 0;
_root.loseLife();
}
}
if ((intFrameCount % 2) == 0) {
_root.hand.match.flame._alpha = 90;
} else {
_root.hand.match.flame._alpha = 66;
}
}
if (((_global.matchHeld == true) && (_global.mouseHeld == true)) && (_global.matchLit != true)) {
if (_root.hand.match.head.hitTest(_root.match_strike)) {
if ((_xmouse != intMouseLastX) && (_ymouse != intMouseLastY)) {
intMouseLastX = _xmouse;
intMouseLastY = _ymouse;
_global.intStrikeEnergy++;
if (_global.intStrikeEnergy == 25) {
_global.intStrikeEnergy = 0;
_global.matchLit = true;
_global.intFrameCount = 0;
_global.intFlameLife = Math.floor(Math.random() * 80) + 20;
_root.playSound("strike");
}
}
}
} else if (((_global.matchHeld == true) && (_global.mouseHeld == true)) && (_global.matchLit == true)) {
if (_root.hand.match.head.hitTest(_root.fuse_hit)) {
_root.fuse.play();
}
}
};
onMouseDown = function () {
_global.mouseHeld = true;
};
onMouseUp = function () {
_global.mouseHeld = false;
_global.intStrikeEnergy = 0;
};
Instance of Symbol 420 MovieClip in Frame 45
on (release) {
if (_global.matchsticksLeft > 0) {
_root.hand.match._visible = true;
_global.matchsticksLeft--;
_global.matchesAssigned = false;
}
}
Frame 53
stop();
_root.clearAllIntervals();
Frame 54
stop();
_root.clearAllIntervals();
Frame 55
stop();
_root.clearAllIntervals();
Frame 56
stop();
_root.clearAllIntervals();
Frame 57
stop();
_root.clearAllIntervals();
Symbol 25 Button
on (release) {
_root.gotoAndStop("level1");
}
Symbol 28 Button
on (release) {
_root.gotoAndPlay("score_submit");
}
Symbol 31 Button
on (release) {
_root.gotoAndPlay("leaderboard");
}
Symbol 34 Button
on (release) {
_root.gotoAndPlay("friend_submit");
}
Symbol 37 MovieClip [gameover] Frame 15
stop();
Symbol 45 MovieClip Frame 19
gotoAndPlay (1);
Symbol 45 MovieClip Frame 20
stop();
Symbol 46 MovieClip [jaguar] Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.chara_mc)) {
_root.hitJaguar();
}
};
stop();
Symbol 46 MovieClip [jaguar] Frame 2
stop();
Symbol 56 Button
on (release) {
getURL ("http://www.tamba.co.uk", "_blank");
}
Symbol 71 Button
on (release) {
_root.gotoAndStop("start");
}
Symbol 94 MovieClip Frame 281
gotoAndStop(_root.nextFrame());
Symbol 95 Button
on (release) {
_root.gotoAndStop("level1");
}
Symbol 96 Button
on (release) {
_root.gotoAndStop("instructions");
}
Symbol 115 Button
on (release) {
gotoAndStop ("level1");
}
Symbol 129 MovieClip Frame 1
this.stick1._visible = false;
this.stick2._visible = false;
this.stick3._visible = false;
this.stick4._visible = false;
this.stick5._visible = false;
this.stick6._visible = false;
this.stick7._visible = false;
this.stick8._visible = false;
this.stick9._visible = false;
this.stick10._visible = false;
Symbol 135 Button
on (release) {
gotoAndStop(_root.nextFrame());
}
Symbol 196 MovieClip Frame 15
stop();
Symbol 200 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 2
stop();
Symbol 200 MovieClip Frame 3
stop();
Symbol 200 MovieClip Frame 4
stop();
Symbol 200 MovieClip Frame 9
stop();
Symbol 200 MovieClip Frame 10
stop();
Symbol 200 MovieClip Frame 11
stop();
Symbol 200 MovieClip Frame 12
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 7
stop();
Symbol 214 MovieClip Frame 9
spikeUpFX = new Sound();
spikeUpFX.attachSound("spike_down2");
spikeUpFX.start(0, 1);
Symbol 214 MovieClip Frame 10
gotoAndStop (1);
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 7
stop();
Symbol 221 MovieClip Frame 9
spikeDownFX = new Sound();
spikeDownFX.attachSound("spike_down");
spikeDownFX.start(0, 1);
Symbol 221 MovieClip Frame 13
gotoAndStop (1);
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 3
spikeUpFX = new Sound();
spikeUpFX.attachSound("spike_up");
spikeUpFX.start(0, 1);
Symbol 224 MovieClip Frame 6
stop();
Symbol 224 MovieClip Frame 11
gotoAndStop (1);
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 7
stop();
Symbol 230 MovieClip Frame 13
gotoAndStop (1);
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 20
if (_global.gameCompleted == true) {
gotoAndPlay (31);
} else {
_root.initLevel();
_root.snake_head.gotoAndStop(1);
_root.spikes1.gotoAndStop(1);
_root.spikes2.gotoAndStop(1);
_root.spikes3.gotoAndStop(1);
_root.spikes4.gotoAndStop(1);
_root.spikes5.gotoAndStop(1);
_root.spikes6.gotoAndStop(1);
_root.spikes7.gotoAndStop(1);
_root.spikes8.gotoAndStop(1);
_root.spikes9.gotoAndStop(1);
_root.spikes10.gotoAndStop(1);
_root.angler._visible = true;
_root.angler.play();
_root.power_bar.power_mask._x = _root.power_bar.power_mask._x + 1;
_root.power = 0;
_root.power_bar.power_mask._x = -94.1;
}
Symbol 239 MovieClip Frame 30
_root.startLevel();
gotoAndStop (1);
Symbol 239 MovieClip Frame 31
if (_global.gameCompleted == true) {
_root.playSound("boom");
}
Symbol 239 MovieClip Frame 110
_root.initLevel();
Symbol 295 MovieClip Frame 185
gotoAndPlay (1);
Symbol 295 MovieClip Frame 224
if (_root.chara_mc._x < 350) {
this.gotoAndPlay("bite_left");
} else {
this.gotoAndPlay("bite_right");
}
Symbol 295 MovieClip Frame 280
Symbol 295 MovieClip Frame 311
stop();
_root.loseLife();
Symbol 295 MovieClip Frame 343
stop();
_root.loseLife();
Symbol 313 MovieClip Frame 1
_global.angle = 120;
Symbol 313 MovieClip Frame 5
_global.angle = 95;
Symbol 313 MovieClip Frame 9
_global.angle = 70;
Symbol 313 MovieClip Frame 13
_global.angle = 45;
Symbol 313 MovieClip Frame 17
_global.angle = 70;
Symbol 313 MovieClip Frame 21
_global.angle = 95;
Symbol 343 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 2
stop();
Symbol 343 MovieClip Frame 3
stop();
Symbol 347 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 2
stop();
Symbol 347 MovieClip Frame 3
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 2
stop();
Symbol 351 MovieClip Frame 3
stop();
Symbol 360 MovieClip Frame 1
isFlaming = false;
intFrameCount = 0;
onEnterFrame = function () {
if (isFlaming == true) {
if (intFrameCount == 0) {
arrTemp = this._name.split("_");
objPlate = eval ("_root.plate_" + arrTemp[1]);
}
_global.pillarFlaming = true;
if (intFrameCount < 75) {
if ((intFrameCount % 2) == 0) {
this.pillar_flame._alpha = 65;
} else {
this.pillar_flame._alpha = 75;
}
} else {
this.pillar_flame._alpha = 0;
}
intFrameCount++;
if ((intFrameCount > 10) && (intFrameCount <= 25)) {
objPlate.gotoAndStop(2);
} else if ((intFrameCount > 25) && (intFrameCount <= 75)) {
objPlate.gotoAndStop(3);
} else if ((intFrameCount > 75) && (intFrameCount <= 90)) {
objPlate.gotoAndStop(2);
} else {
objPlate.gotoAndStop(1);
}
if (_global.startLevel != false) {
if (objPlate.hotSpot.hitTest(_root.chara_mc)) {
if (objPlate._currentframe == 2) {
intDamage = 3;
} else if (objPlate._currentframe == 3) {
intDamage = 4;
} else {
intDamage = 0;
}
_root.health_bar.bar._width = _root.health_bar.bar._width - intDamage;
if ((_root.health_bar.bar._width - intDamage) <= 0.8) {
_root.health_bar.bar._width = 0.8;
}
}
}
if (intFrameCount >= 100) {
isFlaming = false;
_global.pillarFlaming = false;
}
} else {
if (this.pillar_flame._alpha > 0) {
this.pillar_flame._alpha = 0;
}
intFrameCount = 0;
}
};
Symbol 386 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.chara_mc)) {
_root.hitWires();
}
};
Symbol 404 MovieClip Frame 1
monsterSFX = new Sound();
monsterSFX.attachSound("sfx_reptile");
monsterSFX.start(0, 1);
stop();
Symbol 404 MovieClip Frame 20
monsterSFX = new Sound();
monsterSFX.attachSound("sfx_reptile");
monsterSFX.start(0, 1);
stop();
Symbol 404 MovieClip Frame 40
stop();
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 32
stop();
_global.gameCompleted = true;
_root.resetLevel();
Symbol 432 MovieClip Frame 1
this._visible = 0;
stop();
Symbol 432 MovieClip Frame 2
stop();
Symbol 440 MovieClip Frame 1
this.match._visible = false;
this.match.flame._visible = false;
Symbol 449 Button
on (release) {
getURL ("http://www.youngbond.com", "_blank");
}
Symbol 452 Button
on (release) {
getURL ("http://www.amazon.co.uk/Hurricane-Gold-Young-Charlie-Higson/dp/0141383917/ref=pd_bbs_sr_1/026-0221683-4970069?ie=UTF8&s=books&qid=1188898210&sr=8-1", "_blank");
}
Symbol 453 Button
on (release) {
_root.gotoAndStop("score_submit");
}
Symbol 454 Button
on (release) {
_root.gotoAndStop("leaderboard");
}
Symbol 455 Button
on (release) {
_root.gotoAndStop("friend_submit");
}
Symbol 456 MovieClip Frame 15
stop();
Symbol 461 Button
on (release) {
if (_global.gameCompleted == true) {
_root.gotoAndStop("congrats");
} else {
_root.gotoAndStop("gameover");
}
}
Symbol 465 Button
on (release) {
_root.points = _root.currentPoints;
submit_responder = new Object();
doNotSend = false;
strName = userName.text;
strEmail = userEmail.text;
strParentName = parentName.text;
indexOfAt = strEmail.indexOf("@");
lastIndexOfDot = strEmail.lastIndexOf(".");
if ((_global.intParentAgree == 0) && (_global.intOver13 == 0)) {
doNotSend = true;
errorMsg.text = "PLEASE TICK THE RELEVANT BOX";
} else if ((_global.intParentAgree == 1) && (!strParentName)) {
doNotSend = true;
errorMsg.text = "PARENT/GUARDIAN: PLEASE ENTER YOUR NAME";
} else if (((!strEmail) || (indexOfAt == -1)) || (lastIndexOfDot == -1)) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER A VALID EMAIL ADDRESS";
} else if (!strName) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER YOUR NAME";
}
if (!doNotSend) {
errorMsg.text = "SUBMITTING SCORE PLEASE WAIT";
submit_responder.onResult = function (arrScores) {
_root.submitted = true;
_root.gotoAndStop("leaderboard");
};
gameService.setHighScores(submit_responder, userName.text, userEmail.text, _global.score, _global.intOver13, _global.intParentAgree, parentName.text);
}
}
Symbol 480 MovieClip Frame 1
stop();
Instance of Symbol 478 MovieClip in Symbol 480 MovieClip Frame 1
on (release) {
_parent.gotoAndStop(2);
}
Symbol 480 MovieClip Frame 2
if (this._name == "check_13") {
_global.intOver13 = 1;
_global.intParentAgree = 0;
_parent.check_parent.gotoAndStop(1);
_parent.parentName.text = "";
}
if (this._name == "check_parent") {
_global.intOver13 = 0;
_global.intParentAgree = 1;
_parent.check_13.gotoAndStop(1);
}
stop();
Instance of Symbol 478 MovieClip in Symbol 480 MovieClip Frame 2
on (release) {
_parent.gotoAndStop(1);
}
Symbol 485 Button
on (release) {
getURL ("http://www.avenueofdeath.com/tsandcs.html", "_blank");
}
Symbol 487 MovieClip Frame 1
function NetServiceProxy(nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
}
function addScore() {
_root.updating = "UPDATING SCORES PLEASE WAIT";
_root.bt1._visible = false;
_root.bt2._visible = false;
_root.bt3._visible = false;
gameService.updatePoints(updatePoints_responder, strUniqueID, _root.points);
}
trace("***** running NetServices");
load("RecordSet.as");
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder = _global.NetServiceProxyResponder;
NetServiceProxyResponder.prototype.onResult = function (result) {
var _local2 = this.service.client;
result._setParentService(this.service);
var _local3 = this.methodName + "_Result";
if (typeof(_local2[_local3]) == "function") {
_local2[_local3](result);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + result);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var _local5 = this.service.client;
var _local6 = this.methodName + "_Status";
if (typeof(_local5[_local6]) == "function") {
_local5[_local6](result);
} else if (typeof(_local5.onStatus) == "function") {
_local5.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: ") + result.level) + " ") + result.description);
}
};
_global.NetServiceProxy = NetServiceProxy;
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
};
NetConnection.prototype.getService = function (serviceName, client) {
var _local2 = new NetServiceProxy(this, serviceName, client);
return(_local2);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
this.addHeader(info.name, info.mustUnderstand, info.data);
};
NetConnection.prototype.RequestUrlRewrite = function (urlSuffix) {
this.__urlSuffix = urlSuffix;
if (this.__originalUrl == null) {
this.__originalUrl = this.uri;
}
var _local2 = this.__originalUrl + urlSuffix;
this.connect(_local2);
};
NetConnection.prototype.clone = function () {
var _local2 = new NetConnection();
_local2.connect(((this.__originalUrl == null) ? (this.uri) : (this.__originalUrl)));
if (this.__urlSuffix != null) {
_local2.RequestUrlRewrite(this.__urlSuffix);
}
return(_local2);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices = _global.NetServices;
NetServices.gatewayUrl = gatewayUrl;
NetServices.urlSuffix = urlSuffix;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
if (NetServices.isHttpUrl(_root._url)) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
if (url != undefined) {
if (NetServices.isHttpUrl(url)) {
var _local6 = url.indexOf("/", 8);
if (_local6 >= 0) {
url = url.substring(_local6);
}
}
var _local4 = NetServices.getHostUrl();
if (_local4 != null) {
url = _local4 + url;
}
}
}
} else {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local5 = new NetConnection();
_local5.connect(url);
if (NetServices.urlSuffix != null) {
this.RequestUrlRewrite(NetServices.urlSuffix);
}
return(_local5);
};
NetServices.getHostUrl = function () {
if (!NetServices.isHttpUrl(_root._url)) {
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
return(null);
}
return(_root._url.substring(0, _local2));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var _local1 = (((((who + " ") + severity) + " ") + number) + ": ") + message;
trace(_local1);
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
strTicketID = s;
intSpinLocked = 0;
_global.strRootURL = "http://www.tamba-games.co.uk/youngbond";
NetServices.setDefaultGatewayUrl(_global.strRootURL + "/gateway.php");
conn = NetServices.createGatewayConnection();
checkTicket_responder = new Object();
checkTicket_responder.onResult = function (arrUserInfo) {
_level0.currentPoints = arrUserInfo.points * 1;
strUniqueID = arrUserInfo.uniqueid;
strName = arrUserInfo.fullname;
};
updatePoints_responder = new Object();
updatePoints_responder.onResult = function () {
_root.updating = "";
_root.bt1._visible = true;
_root.bt2._visible = true;
_root.bt3._visible = true;
_root.dbstatus.text = "DB Updated!";
};
gameService = conn.getService("services");
scrollFace_mc._y = upArrow_mc._y + upArrow_mc._height;
scoreSubmit_mc.startPos = scoreSubmit_mc._y;
scrollUp = function () {
if (scoreSubmit_mc._y < scoreSubmit_mc.startPos) {
scoreSubmit_mc._y = scoreSubmit_mc._y + 6;
moveScrollBar();
}
};
scrollDown = function () {
var _local1 = scoreSubmit_mc._height - scrollMask_mc._height;
trace(_local1);
if (scoreSubmit_mc._y > (scoreSubmit_mc.startPos - _local1)) {
scoreSubmit_mc._y = scoreSubmit_mc._y + -6;
moveScrollBar();
}
};
moveScrollBar = function () {
var _local4 = upArrow_mc._y + upArrow_mc._height;
var _local7 = scrollTrack_mc._height - scrollFace_mc._height;
var _local1 = scoreSubmit_mc.startPos;
var _local8 = scoreSubmit_mc._y;
var _local3 = _local1 - _local8;
var _local2 = scoreSubmit_mc._height - scrollMask_mc._height;
var _local5 = (_local3 / _local2) * 100;
var _local6 = _local4 + ((_local7 / 100) * _local5);
scrollFace_mc._y = _local6;
};
dragScrollBar = function () {
var _local4 = upArrow_mc._y + upArrow_mc._height;
var _local6 = scrollTrack_mc._height - scrollFace_mc._height;
var _local1 = scrollFace_mc._y;
var _local5 = ((_local1 - _local4) / _local6) * 100;
var _local2 = scoreSubmit_mc.startPos;
var _local3 = (scoreSubmit_mc._height - scrollMask_mc._height) - 4;
var _local7 = _local2 - ((_local3 / 100) * _local5);
scoreSubmit_mc._y = _local7;
};
scrollFace_mc.onPress = function () {
var _local1 = upArrow_mc._y + upArrow_mc._height;
var _local4 = scrollTrack_mc._height - scrollFace_mc._height;
var _local3 = _local1 + _local4;
var _local2 = scrollFace_mc._x;
startDrag (scrollFace_mc, true, _local2, _local1, _local2, _local3);
dragScrollBarInt = setInterval(dragScrollBar, 40);
};
scrollFace_mc.onRelease = function () {
scrollFace_mc.stopDrag();
clearInterval(dragScrollBarInt);
};
scrollFace_mc.onReleaseOutside = function () {
scrollFace_mc.stopDrag();
clearInterval(dragScrollBarInt);
};
upArrow_mc.onPress = function () {
scrollUpInt = setInterval(scrollUp, 40);
};
upArrow_mc.onRelease = function () {
clearInterval(scrollUpInt);
};
upArrow_mc.onReleaseOutside = function () {
clearInterval(scrollUpInt);
};
downArrow_mc.onPress = function () {
scrollDownInt = setInterval(scrollDown, 40);
};
downArrow_mc.onRelease = function () {
clearInterval(scrollDownInt);
};
downArrow_mc.onReleaseOutside = function () {
clearInterval(scrollDownInt);
};
_global.intOver13 = 0;
_global.intParentAgree = 0;
scoresubmit.text = ("Submit Your Score: " + _global.score) + " points";
Symbol 487 MovieClip Frame 15
stop();
Symbol 500 Button
on (release) {
if (_global.gameCompleted == true) {
_root.gotoAndStop("congrats");
} else {
_root.gotoAndStop("gameover");
}
}
Symbol 501 Button
on (release) {
send_responder = new Object();
doNotSend = false;
strUserName = userName.text;
strUserEmail = userEmail.text;
userIndexOfAt = strUserEmail.indexOf("@");
userLastIndexOfDot = strUserEmail.lastIndexOf(".");
strFriendName = friendName.text;
strFriendEmail = friendEmail.text;
friendIndexOfAt = strFriendEmail.indexOf("@");
friendLastIndexOfDot = strFriendEmail.lastIndexOf(".");
if (((!strFriendEmail) || (friendIndexOfAt == -1)) || (friendLastIndexOfDot == -1)) {
doNotSend = true;
errorMsg.text = "Your friends email address is not valid";
}
if (!strFriendName) {
doNotSend = true;
errorMsg.text = "Please enter your friends name";
}
if (((!strUserEmail) || (userIndexOfAt == -1)) || (userLastIndexOfDot == -1)) {
doNotSend = true;
errorMsg.text = "Your email address is not valid";
}
if (!strUserName) {
doNotSend = true;
errorMsg.text = "Please enter your name";
}
if (!doNotSend) {
trace("SENDING");
errorMsg.text = "Sending";
send_responder.onResult = function () {
friendName.text = "";
friendEmail.text = "";
errorMsg.text = "Sent! Would you like to challenge more friends?";
};
gameService.sendToFriend(send_responder, userName.text, userEmail.text, friendName.text, friendEmail.text, _global.score, "null");
}
}
Symbol 502 MovieClip Frame 1
function NetServiceProxy(nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
}
function addScore() {
_root.updating = "UPDATING SCORES PLEASE WAIT";
_root.bt1._visible = false;
_root.bt2._visible = false;
_root.bt3._visible = false;
gameService.updatePoints(updatePoints_responder, strUniqueID, _root.points);
}
trace("***** running NetServices");
load("RecordSet.as");
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder = _global.NetServiceProxyResponder;
NetServiceProxyResponder.prototype.onResult = function (result) {
var _local2 = this.service.client;
result._setParentService(this.service);
var _local3 = this.methodName + "_Result";
if (typeof(_local2[_local3]) == "function") {
_local2[_local3](result);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + result);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var _local5 = this.service.client;
var _local6 = this.methodName + "_Status";
if (typeof(_local5[_local6]) == "function") {
_local5[_local6](result);
} else if (typeof(_local5.onStatus) == "function") {
_local5.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: ") + result.level) + " ") + result.description);
}
};
_global.NetServiceProxy = NetServiceProxy;
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
};
NetConnection.prototype.getService = function (serviceName, client) {
var _local2 = new NetServiceProxy(this, serviceName, client);
return(_local2);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
this.addHeader(info.name, info.mustUnderstand, info.data);
};
NetConnection.prototype.RequestUrlRewrite = function (urlSuffix) {
this.__urlSuffix = urlSuffix;
if (this.__originalUrl == null) {
this.__originalUrl = this.uri;
}
var _local2 = this.__originalUrl + urlSuffix;
this.connect(_local2);
};
NetConnection.prototype.clone = function () {
var _local2 = new NetConnection();
_local2.connect(((this.__originalUrl == null) ? (this.uri) : (this.__originalUrl)));
if (this.__urlSuffix != null) {
_local2.RequestUrlRewrite(this.__urlSuffix);
}
return(_local2);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices = _global.NetServices;
NetServices.gatewayUrl = gatewayUrl;
NetServices.urlSuffix = urlSuffix;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
if (NetServices.isHttpUrl(_root._url)) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
if (url != undefined) {
if (NetServices.isHttpUrl(url)) {
var _local6 = url.indexOf("/", 8);
if (_local6 >= 0) {
url = url.substring(_local6);
}
}
var _local4 = NetServices.getHostUrl();
if (_local4 != null) {
url = _local4 + url;
}
}
}
} else {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local5 = new NetConnection();
_local5.connect(url);
if (NetServices.urlSuffix != null) {
this.RequestUrlRewrite(NetServices.urlSuffix);
}
return(_local5);
};
NetServices.getHostUrl = function () {
if (!NetServices.isHttpUrl(_root._url)) {
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
return(null);
}
return(_root._url.substring(0, _local2));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var _local1 = (((((who + " ") + severity) + " ") + number) + ": ") + message;
trace(_local1);
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
strTicketID = s;
intSpinLocked = 0;
_global.strRootURL = "http://www.tamba-games.co.uk/youngbond";
NetServices.setDefaultGatewayUrl(_global.strRootURL + "/gateway.php");
conn = NetServices.createGatewayConnection();
checkTicket_responder = new Object();
checkTicket_responder.onResult = function (arrUserInfo) {
_level0.currentPoints = arrUserInfo.points * 1;
strUniqueID = arrUserInfo.uniqueid;
strName = arrUserInfo.fullname;
};
updatePoints_responder = new Object();
updatePoints_responder.onResult = function () {
_root.updating = "";
_root.bt1._visible = true;
_root.bt2._visible = true;
_root.bt3._visible = true;
_root.dbstatus.text = "DB Updated!";
};
gameService = conn.getService("services");
Symbol 502 MovieClip Frame 15
stop();
Symbol 520 MovieClip Frame 1
function NetServiceProxy(nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
}
function addScore() {
_root.updating = "UPDATING SCORES PLEASE WAIT";
_root.bt1._visible = false;
_root.bt2._visible = false;
_root.bt3._visible = false;
gameService.updatePoints(updatePoints_responder, strUniqueID, _root.points);
}
scrollFace_mc._y = upArrow_mc._y + upArrow_mc._height;
scoreList_mc.startPos = scoreList_mc._y;
scrollUp = function () {
if (scoreList_mc._y < scoreList_mc.startPos) {
scoreList_mc._y = scoreList_mc._y + 6;
moveScrollBar();
}
};
scrollDown = function () {
var _local1 = scoreList_mc._height - scrollMask_mc._height;
trace(_local1);
if (scoreList_mc._y > (scoreList_mc.startPos - _local1)) {
scoreList_mc._y = scoreList_mc._y + -6;
moveScrollBar();
}
};
moveScrollBar = function () {
var _local4 = upArrow_mc._y + upArrow_mc._height;
var _local7 = scrollTrack_mc._height - scrollFace_mc._height;
var _local1 = scoreList_mc.startPos;
var _local8 = scoreList_mc._y;
var _local3 = _local1 - _local8;
var _local2 = scoreList_mc._height - scrollMask_mc._height;
var _local5 = (_local3 / _local2) * 100;
var _local6 = _local4 + ((_local7 / 100) * _local5);
scrollFace_mc._y = _local6;
};
dragScrollBar = function () {
var _local4 = upArrow_mc._y + upArrow_mc._height;
var _local6 = scrollTrack_mc._height - scrollFace_mc._height;
var _local1 = scrollFace_mc._y;
var _local5 = ((_local1 - _local4) / _local6) * 100;
var _local2 = scoreList_mc.startPos;
var _local3 = (scoreList_mc._height - scrollMask_mc._height) - 4;
var _local7 = _local2 - ((_local3 / 100) * _local5);
scoreList_mc._y = _local7;
};
scrollFace_mc.onPress = function () {
var _local1 = upArrow_mc._y + upArrow_mc._height;
var _local4 = scrollTrack_mc._height - scrollFace_mc._height;
var _local3 = _local1 + _local4;
var _local2 = scrollFace_mc._x;
startDrag (scrollFace_mc, true, _local2, _local1, _local2, _local3);
dragScrollBarInt = setInterval(dragScrollBar, 40);
};
scrollFace_mc.onRelease = function () {
scrollFace_mc.stopDrag();
clearInterval(dragScrollBarInt);
};
scrollFace_mc.onReleaseOutside = function () {
scrollFace_mc.stopDrag();
clearInterval(dragScrollBarInt);
};
upArrow_mc.onPress = function () {
scrollUpInt = setInterval(scrollUp, 40);
};
upArrow_mc.onRelease = function () {
clearInterval(scrollUpInt);
};
upArrow_mc.onReleaseOutside = function () {
clearInterval(scrollUpInt);
};
downArrow_mc.onPress = function () {
scrollDownInt = setInterval(scrollDown, 40);
};
downArrow_mc.onRelease = function () {
clearInterval(scrollDownInt);
};
downArrow_mc.onReleaseOutside = function () {
clearInterval(scrollDownInt);
};
trace("***** running NetServices");
load("RecordSet.as");
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder = _global.NetServiceProxyResponder;
NetServiceProxyResponder.prototype.onResult = function (result) {
var _local2 = this.service.client;
result._setParentService(this.service);
var _local3 = this.methodName + "_Result";
if (typeof(_local2[_local3]) == "function") {
_local2[_local3](result);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + result);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var _local5 = this.service.client;
var _local6 = this.methodName + "_Status";
if (typeof(_local5[_local6]) == "function") {
_local5[_local6](result);
} else if (typeof(_local5.onStatus) == "function") {
_local5.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: ") + result.level) + " ") + result.description);
}
};
_global.NetServiceProxy = NetServiceProxy;
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
};
NetConnection.prototype.getService = function (serviceName, client) {
var _local2 = new NetServiceProxy(this, serviceName, client);
return(_local2);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
this.addHeader(info.name, info.mustUnderstand, info.data);
};
NetConnection.prototype.RequestUrlRewrite = function (urlSuffix) {
this.__urlSuffix = urlSuffix;
if (this.__originalUrl == null) {
this.__originalUrl = this.uri;
}
var _local2 = this.__originalUrl + urlSuffix;
this.connect(_local2);
};
NetConnection.prototype.clone = function () {
var _local2 = new NetConnection();
_local2.connect(((this.__originalUrl == null) ? (this.uri) : (this.__originalUrl)));
if (this.__urlSuffix != null) {
_local2.RequestUrlRewrite(this.__urlSuffix);
}
return(_local2);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices = _global.NetServices;
NetServices.gatewayUrl = gatewayUrl;
NetServices.urlSuffix = urlSuffix;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
if (NetServices.isHttpUrl(_root._url)) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
if (url != undefined) {
if (NetServices.isHttpUrl(url)) {
var _local6 = url.indexOf("/", 8);
if (_local6 >= 0) {
url = url.substring(_local6);
}
}
var _local4 = NetServices.getHostUrl();
if (_local4 != null) {
url = _local4 + url;
}
}
}
} else {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local5 = new NetConnection();
_local5.connect(url);
if (NetServices.urlSuffix != null) {
this.RequestUrlRewrite(NetServices.urlSuffix);
}
return(_local5);
};
NetServices.getHostUrl = function () {
if (!NetServices.isHttpUrl(_root._url)) {
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
return(null);
}
return(_root._url.substring(0, _local2));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var _local1 = (((((who + " ") + severity) + " ") + number) + ": ") + message;
trace(_local1);
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
strTicketID = s;
intSpinLocked = 0;
_global.strRootURL = "http://www.tamba-games.co.uk/youngbond";
NetServices.setDefaultGatewayUrl(_global.strRootURL + "/gateway.php");
conn = NetServices.createGatewayConnection();
checkTicket_responder = new Object();
checkTicket_responder.onResult = function (arrUserInfo) {
_level0.currentPoints = arrUserInfo.points * 1;
strUniqueID = arrUserInfo.uniqueid;
strName = arrUserInfo.fullname;
};
updatePoints_responder = new Object();
updatePoints_responder.onResult = function () {
_root.updating = "";
_root.bt1._visible = true;
_root.bt2._visible = true;
_root.bt3._visible = true;
_root.dbstatus.text = "DB Updated!";
};
gameService = conn.getService("services");
score_responder = new Object();
score_responder.onResult = function (arrScores) {
i = 0;
while (i <= (arrScores.length - 1)) {
var _local5 = i + 10000;
var _local4 = ("scoreLine" + (i + 1)) + "_mc";
duplicateMovieClip (scoreList_mc.scoreLine_mc, _local4, _local5);
var _local2 = scoreList_mc[("scoreLine" + (i + 1)) + "_mc"];
_local2._y = 26 * i;
_local2.pos.text = i + 1;
_local2.playerName.text = arrScores[i].name;
_local2.score.text = arrScores[i].score;
nextScorePos = this.scoreList_mc.scoreLine_mc._height;
i++;
}
};
gameService.getHighScores(score_responder, 50);
this.scoreList_mc.scoreLine_mc._visible = false;
Symbol 520 MovieClip Frame 15
stop();