Frame 1
function getDomain() {
var _local1 = new LocalConnection();
return(_local1.domain());
}
function configActionSource() {
_root.actionSource.pageName = GAME_NAME + ":external";
_root.actionSource.movieID = GAME_NAME;
_root.actionSource.hier1 = (("external|" + GAME_NAME) + "|") + SITE_NAME;
_root.actionSource.hier2 = (("external|" + SITE_NAME) + "|") + GAME_NAME;
_root.actionSource.channel = "external";
_root.actionSource.account = "nflrushprod,nflglobal";
_root.actionSource.pageURL = "";
_root.actionSource.charSet = "UTF-8";
_root.actionSource.currencyCode = "USD";
_root.actionSource.trackClickMap = true;
_root.actionSource.debugTracking = true;
_root.actionSource.trackLocal = true;
_root.actionSource.visitorNamespace = "nfl";
_root.actionSource.dc = "112";
}
function startGameClick() {
_root.actionSource.track();
}
function endPlateClick() {
getURL ((("http://nflrz.nflrush.com/play/game/carrgghlysblitzbotchuck?campaign=EXTG_" + _root.SITE_NAME) + "_") + _root.GAME_NAME, "_blank");
}
stop();
btn_instr.onRelease = function () {
gotoAndStop ("instructions");
};
btn_play.onRelease = function () {
gotoAndPlay ("game");
};
var GAME_NAME = "carrgghlysblitzbotchuck";
var actionSource = (new com.omniture.AS2.ActionSource());
var SITE_NAME = getDomain();
configActionSource();
Frame 15
arrowListener = new Object();
arrowListener.onKeyDown = function () {
if (!anyArrowPressed) {
if (Key.getCode() == 37) {
key = 0;
anyArrowPressed = true;
} else if (Key.getCode() == 39) {
key = 1;
anyArrowPressed = true;
}
} else if (key == 0) {
if (Key.getCode() == 39) {
key = 1;
_root.speed = _root.speed + 1;
}
} else if (Key.getCode() == 37) {
key = 0;
_root.speed = _root.speed + 1;
}
};
spaceListener = new Object();
spaceListener.onKeyDown = function () {
if (Key.getCode() == 32) {
if (!_root.spacePressed) {
timePressed = getTimer();
fadeOutSound(sSpinning);
setPower = 50 + (speed * 3);
delete holdBar.onEnterFrame;
fadeAndSweep(arrowKeyInfo, arrowKeyInfo._x, arrowKeyInfo._y - 20, 0, 0.5, 90, undefined);
fadeAndSweep(holdBar, 485, holdBar._y, 0, 0.5, holdBar._xscale, undefined);
fadeAndSweep(leaveBar, 351, leaveBar._y, 100, 0.5, leaveBar._xscale, startAngleTimer);
fadeAndSweep(pointer, pointer._x, pointer._y, 100, 0.5, pointer._xscale, undefined);
_root.spacePressed = true;
showTimeBonus();
Key.removeListener(arrowListener);
}
}
};
spaceListener.onKeyUp = function () {
if (Key.getCode() == 32) {
if ((getTimer() - timePressed) < 350) {
remember.swapDepths(_root.getNextHighestDepth());
remember._y = 422;
remember.waitTime = 60;
remember.targetY = 382;
remember.onEnterFrame = function () {
var _local2 = (this.targetY - this._y) * 0.1;
this._y = this._y + _local2;
if (this.waitTime > 0) {
if (this._y < 379) {
this._y = 382;
}
this.waitTime--;
} else {
this.targetY = 422;
if (this._y > 419) {
removeMovieClip(this);
}
}
};
}
_root.pointer.stop();
_root.spaceReleased = true;
_root.chickReadyToThrow = true;
delete leaveBar.onEnterFrame;
_root.setAngle = angleFrameArray[pointer._currentframe] - 4;
fadeAndSweep(leaveBar, leaveBar._x, leaveBar._y, 0, 0.5, undefined);
fadeAndSweep(pointer, pointer._x, pointer._y, 0, 0.5, undefined);
}
};
function initGame() {
startGameClick();
chick.swapDepths(101);
grass.swapDepths(200);
mainBG.swapDepths(5);
groves.swapDepths(6);
holdBar.swapDepths(10);
leaveBar.swapDepths(11);
pointer.swapDepths(12);
readysetgo.swapDepths(13);
arrowKeyInfo.swapDepths(14);
tree.swapDepths(21);
upArrow.swapDepths(109);
scoreBoard.swapDepths(103);
chick.girl.stop();
chick.girl.frontDust._alpha = 0;
chick.girl.backDust._alpha = 0;
spin = true;
combo = 1;
launched = false;
lastTimeString = "";
movingObjects = new Array();
allEnemies = new Array();
distanceToNextTree = 900 + random(900);
distanceToNextEnemy = 6000;
bgTreeDepth = 15;
enemyDepth = 30;
MAX_POWER = 130;
MIN_POWER = 50;
vx = 0;
vy = 0;
height = 0;
distance = 0;
timePressed = 0;
score = 0;
gravity = 1.7;
bounce = -0.8;
ground = 350;
friction = 0.5;
skippingMagnitude = 50;
skiddingMagnitude = 25;
groungViewMagnitude = 50;
skipping = false;
skidding = false;
waitingToComeDown = false;
tree.startY = 327;
tree.startX = 834;
tree.wrapX = -115;
tree.gotoAndStop(random(2) + 1);
mainBG.startX = mainBG._x;
mainBG.startY = mainBG._y;
mainBG.wrapX = -1905;
grass.startX = grass._x;
grass.startY = grass._y;
grass.wrapX = -1238.8;
var _local2 = _root.attachMovie("bgTrees", "bgTrees6", 6, {_x:346, _y:312});
_local2.doneX = -358;
_local2.removeLater = true;
movingObjects.push(_local2);
pointer.stop();
robotPartsMissing = new Array(1, 1, 1, 1, 1);
robotParts = new Array();
numOfHands = 2;
numOfFeet = 2;
torso = true;
trailWaitTime = 5;
trailDepth = 80;
isGameOver = false;
_root.setMask(masker);
}
initGame();
function throwBot() {
fadeOutSound(sDrumRoll);
initUpArrow();
fadeAndSweep(scoreBoard, scoreBoard._x, scoreBoard._y, 100, 0.5, scoreBoard._xscale, undefined);
scoreBoard.onEnterFrame = function () {
this.counter.text = formatWithCommas(score + Math.floor(distance / 100));
};
launched = true;
sMusic.start(0, 99999);
sFlyOff.start(0, 0);
chick.gotoAndStop(4);
robot = _root.attachMovie("robot", "robot", 100);
robot._xscale = (_root.robot._yscale = ROBOT_START_SCALE);
robot._x = 280;
robot._y = 140;
robot.startY = ground;
startFlying();
robot._rotation = 90 + _root.setAngle;
_root.gotoAndStop("flying");
}
function startAngleTimer() {
sDrumRoll.start(0, 0);
pointer.play();
readyForSpaceRelease = true;
if (!Key.isDown(32)) {
spaceReleased = true;
}
leaveBar.stopTime = getTimer() + (angleTime * 1000);
leaveBar.onEnterFrame = function () {
var _local4 = (this.stopTime - getTimer()) / 1000;
var _local3 = String(_local4);
_local3 = _local3.slice(0, 4);
if (_local4 <= 0) {
Key.removeListener(spaceListener);
Key.removeListener(arrowListener);
shakeMC(_root, 5, 5, true);
holdBar._alpha = 0;
leaveBar._alpha = 0;
pointer._alpha = 0;
showGameOver();
chick.gotoAndPlay("explode");
delete this.onEnterFrame;
}
this.counter.text = _local3;
};
}
function startLaunchTimer() {
holdBar.stopTime = getTimer() + (launchTime * 1000);
holdBar.onEnterFrame = function () {
var _local4 = (this.stopTime - getTimer()) / 1000;
lastTimeString = String(_local4);
var _local3 = lastTimeString;
_local3 = _local3.slice(0, 4);
if (_local4 <= 0) {
Key.removeListener(spaceListener);
Key.removeListener(arrowListener);
delete holdBar.onEnterFrame;
holdBar._alpha = 0;
shakeMC(_root, 5, 5, true);
holdBar._alpha = 0;
leaveBar._alpha = 0;
pointer._alpha = 0;
arrowKeyInfo._alpha = 0;
showGameOver();
chick.gotoAndPlay("explode");
}
this.counter.text = _local3;
};
}
function startSpinning() {
chick.girl.play();
sSpinning.start(0, 0);
Key.addListener(arrowListener);
Key.addListener(spaceListener);
fadeAndSweep(arrowKeyInfo, arrowKeyInfo._x, arrowKeyInfo._y, 100, 0.5, 100, undefined);
fadeAndSweep(holdBar, holdBar._x, holdBar._y, 100, 0.5, holdBar._xscale, startLaunchTimer);
_root.chick.onEnterFrame = function () {
if (gameState == 0) {
if (anyArrowPressed) {
_root.speed = _root.speed - _root.arrowFriction;
if (_root.speed < 0) {
_root.speed = 0;
}
}
if (_root.spacePressed) {
gameState = 1;
}
}
if (gameState == 1) {
if (_root.spaceReleased) {
Key.removeListener(spaceListener);
delete this.onEnterFrame;
}
}
if (_root.speed <= 10) {
useChick = 1;
} else if (_root.speed <= 20) {
useChick = 2;
} else {
useChick = 3;
}
};
}
function fadeAndSweep(mc, targetX, targetY, targetAlpha, ease, scale, completeFunction) {
var _local2 = mc.createEmptyMovieClip("mover", 300);
_local2.easer = ease;
_local2.targetX = targetX;
_local2.targetY = targetY;
_local2.targetScale = scale;
_local2.targetAlpha = targetAlpha;
_local2.onEnterFrame = function () {
var _local3 = this.targetX - this._parent._x;
var _local2 = this.targetY - this._parent._y;
this.vx = _local3 * this.easer;
this.vy = _local2 * this.easer;
this.vscale = (this.targetScale - this._parent._xscale) * this.easer;
this.valpha = (this.targetAlpha - this._parent._alpha) * this.easer;
this._parent._x = this._parent._x + this.vx;
this._parent._y = this._parent._y + this.vy;
this._parent._xscale = (this._parent._yscale = this._parent._yscale + this.vscale);
this._parent._alpha = this._parent._alpha + this.valpha;
if (((Math.sqrt((_local3 * _local3) + (_local2 * _local2)) < 2) && (Math.abs(this._parent._alpha - this.targetAlpha) < 5)) && (Math.abs(this._parent._xscale - this.targetScale) < 3)) {
this._parent._xscale = (this._parent._yscale = this.targetScale);
this._parent._x = this.targetX;
this._parent._y = this.targetY;
this._parent._alpha = this.targetAlpha;
completeFunction();
removeMovieClip(this);
}
};
}
function showTimeBonus() {
var _local4 = String(lastTimeString).substr(0, 3);
var _local3 = 0;
switch (_local4) {
case "0.0" :
_local3 = 1500;
break;
case "0.1" :
_local3 = 900;
break;
case "0.2" :
_local3 = 800;
break;
case "0.3" :
_local3 = 700;
break;
case "0.4" :
_local3 = 600;
break;
case "0.5" :
_local3 = 500;
break;
case "0.6" :
_local3 = 400;
break;
case "0.7" :
_local3 = 300;
break;
case "0.8" :
_local3 = 200;
break;
case "0.9" :
_local3 = 100;
break;
default :
_local3 = 0;
timeBonus._alpha = 0;
return(undefined);
}
score = _local3;
timeBonus.points.text = String("+" + _local3);
timeBonus.swapDepths(_root.getNextHighestDepth());
timeBonus.constWaitTime = 13;
timeBonus.waitTime = timeBonus.constWaitTime;
timeBonus.onEnterFrame = function () {
if (launched) {
this._alpha = 0;
this._x = -100;
delete this.onEnterFrame;
}
this._y = this._y - 0.3;
this._x = this._x + 0.3;
if (this.waitTime == this.constWaitTime) {
if (this._alpha < 100) {
this._alpha = this._alpha + 8;
} else {
this._alpha = 100;
this.waitTime--;
}
} else if (this.waitTime > 0) {
this.waitTime--;
} else {
this._alpha = this._alpha - 8;
if (this._alpha < 0) {
this._alpha = 0;
delete this.onEnterFrame;
}
}
};
}
_root.ROBOT_START_SCALE = 200;
_root.ROBOT_FLY_SCALE = 135;
_root.speed = 0;
_root.arrowFriction = 0.3;
_root.launchTime = 8.2;
_root.readyForSpaceRelease = false;
_root.angleTime = 4.2;
_root.chickReadyToThrow = false;
_root.anyArrowPressed = false;
_root.spacePressed = false;
_root.spaceReleased = false;
_root.useChick = 1;
_root.key = -1;
_root.gameState = 0;
_root.angleFrameArray = new Array(0, 0, -2, -8, -21, -35, -43, -45, -45, -45, -45, -45, -45, -43, -37, -27, -15, -4, -2, 0, 0, 0, 0, 0);
_root.setAngle = 0;
_root.setPower = 0;
_root.launched = false;
stop();
function fadeOutSound(sound) {
var _local3 = _root.getNextHighestDepth();
var _local4 = _root.createEmptyMovieClip("fader" + _local3, _local3);
_local4.sound = sound;
_local4.onEnterFrame = function () {
if (this.sound.getVolume() > 0) {
this.sound.setVolume(this.sound.getVolume() - 5);
} else {
this.sound.stop();
this.sound.setVolume(100);
removeMovieClip(this);
}
};
}
function changeVolume(sound, vol) {
var _local3 = _root.getNextHighestDepth();
controller = _root.createEmptyMovieClip("controller" + _local3, _local3);
controller.sound = sound;
controller.targetVolume = vol;
controller.onEnterFrame = function () {
var _local2 = this.sound.getVolume();
var _local3 = this.targetVolume - _local2;
this.sound.setVolume((_local3 * 0.3) + _local2);
if (Math.abs(_local3) < 3) {
this.sound.setVolume(this.targetVolume);
removeMovieClip(this);
}
};
}
if (flyOffHolder == undefined) {
flyOffHolder = _root.createEmptyMovieClip("flyOffHolder", 500);
sFlyOff = new Sound(flyOffHolder);
sFlyOff.attachSound("flyOff");
spinningHolder = _root.createEmptyMovieClip("spinningHolder", 501);
sSpinning = new Sound(spinningHolder);
sSpinning.attachSound("spinning");
drumRollHolder = _root.createEmptyMovieClip("drumRollHolder", 502);
sDrumRoll = new Sound(drumRollHolder);
sDrumRoll.attachSound("drumRoll");
beepHolder = _root.createEmptyMovieClip("beepHolder", 503);
sBeep = new Sound(beepHolder);
sBeep.attachSound("beep");
musicHolder = _root.createEmptyMovieClip("musicHolder", 504);
sMusic = new Sound(musicHolder);
sMusic.attachSound("music");
} else {
sMusic.stop();
sMusic.attachSound("music");
sMusic.setVolume(100);
}
function removePart(partName) {
switch (partName) {
case "hand" :
if (robotPartsMissing[0] == 0) {
if (robotPartsMissing[1] == 1) {
robotPartsMissing[1] = 0;
}
} else {
robotPartsMissing[0] = 0;
}
var _local3 = _root.attachMovie("arm", "arm" + numOfHands, 49 + numOfHands);
_local3._x = robot._x + 41;
_local3._y = robot._y;
_local3._xscale = (_local3._yscale = 41);
_local3._rotation = robot._rotation;
_local3.vx = vx * 0.9;
_local3.vy = vy * 0.6;
movingObjects.push(_local3);
_local3.waitTime = 2;
_local3.onEnterFrame = function () {
this._x = this._x + (vx * 0.8);
this._y = this._y + vy;
this._y = this._y + gravity;
};
numOfHands--;
break;
case "foot" :
if (robotPartsMissing[2] == 0) {
if (robotPartsMissing[3] == 1) {
robotPartsMissing[3] = 0;
}
} else {
robotPartsMissing[2] = 0;
}
var _local4 = _root.attachMovie("leg", "leg" + numOfFeet, 51 + numOfFeet);
_local4._x = robot._x + 28;
_local4._y = robot._y;
_local4._xscale = (_local4._yscale = 38);
_local4._rotation = robot._rotation;
movingObjects.push(_local4);
_local4.waitTime = 24;
_local4.vz = 10;
_local4.onEnterFrame = function () {
this._x = this._x + (vx * 0.8);
this._y = this._y + vy;
this._y = this._y + gravity;
this._xscale = this._xscale + this.vz;
this.vz = this.vz + 1;
this._rotation = this._rotation + 14;
this._yscale = this._xscale;
this.waitTime--;
if (this.waitTime <= 0) {
removeMovieClip(this);
}
};
numOfFeet--;
break;
case "torso" :
robotPartsMissing[4] = 0;
var _local5 = _root.attachMovie("body", "body", 54);
_local5._x = robot._x + 34;
_local5._y = robot._y;
_local5._rotation = robot._rotation;
movingObjects.push(_local5);
_local5.waitTime = 45;
_local5.onEnterFrame = function () {
this._x = this._x + (vx * 0.8);
this._y = this._y + vy;
this._y = this._y + gravity;
};
torso = false;
}
}
function looseBodyPart() {
var _local1 = false;
if (numOfHands > 0) {
if (numOfFeet > 0) {
if (random(2) == 0) {
removePart("hand");
} else {
removePart("foot");
}
} else {
removePart("hand");
}
} else if (numOfFeet > 0) {
removePart("foot");
} else {
removePart("torso");
}
updateRobotImage();
}
function updateRobotImage() {
robot.gotoAndStop(1);
robot.bot.gotoAndStop(4);
robotParts = new Array(robot.bot.frontHand, robot.bot.backHand, robot.bot.backFoot, robot.bot.frontFoot, robot.bot.torso);
for (var _local1 in robotPartsMissing) {
if (robotPartsMissing[_local1] == 0) {
robotParts[_local1]._alpha = 0;
} else {
robotParts[_local1]._alpha = 100;
}
}
}
function setSpinningRobot() {
if (torso == false) {
robot.gotoAndStop(10);
} else if (numOfHands == 2) {
if (numOfFeet == 2) {
robot.gotoAndStop(1);
} else if (numOfFeet == 1) {
robot.gotoAndStop(4);
} else {
robot.gotoAndStop(7);
}
} else if (numOfHands == 1) {
if (numOfFeet == 2) {
robot.gotoAndStop(2);
} else if (numOfFeet == 1) {
robot.gotoAndStop(5);
} else {
robot.gotoAndStop(8);
}
} else if (numOfFeet == 2) {
robot.gotoAndStop(3);
} else if (numOfFeet == 1) {
robot.gotoAndStop(6);
} else {
robot.gotoAndStop(9);
}
robot.bot.play();
}
function startFlying() {
keepGroundView = false;
movingObjects.push(chick);
var _local3 = (setAngle * Math.PI) / 180;
robot.skidding = false;
spin = true;
robot.gotoAndStop(1);
robot.bot.gotoAndPlay(2);
vx = setPower * Math.cos(_local3);
vy = setPower * Math.sin(_local3);
robot.onEnterFrame = function () {
if (Math.abs(this._xscale - 135) < 3) {
this._xscale = (this._yscale = 135);
delete this.onEnterFrame;
}
var _local2 = (135 - this._xscale) * 0.05;
this._xscale = this._xscale + _local2;
this._yscale = this._xscale;
};
_root.onEnterFrame = flying2;
}
function flying2() {
robot.skidding = false;
tryToPlaceTree();
if (torso) {
attachTrail();
}
distance = distance + vx;
height = height + vy;
vy = vy + gravity;
if (vy < -50) {
vy = vy + 1;
}
var _local3 = ((330 - vx) - robot._x) * 0.2;
robot._x = robot._x + _local3;
magnitude = Math.sqrt((vx * vx) + (vy * vy));
if (height < -420) {
if (!waitingToComeDown) {
waitingToComeDown = true;
}
robot._y = robot._y + vy;
moveEnvironment(-vx, 0);
if (waitingToComeDown) {
if (robot._y > 140) {
robot._y = 140;
height = -420;
waitingToComeDown = false;
}
}
} else {
if (keepGroundView) {
robot._y = robot._y + vy;
resetHeights();
moveEnvironment(-vx, 0);
} else {
moveEnvironment(-vx, -vy);
}
if ((height > 0) || (mainBG._y < mainBG.startY)) {
height = 0;
resetHeights();
}
robot._y = robot._y + vy;
if ((robot._y > ground) && (mainBG._y < 420)) {
robot._y = ground;
vy = vy * bounce;
vx = vx * (-bounce);
if ((((torso && (vx > 40)) && (random(3) == 0)) && (!keepGroundView)) && (vx > 20)) {
looseBodyPart();
}
if (magnitude > 30) {
shakeMC(_root, 3, 3, true);
}
var _local2 = new Sound(robot);
_local2.attachSound("bigHit" + (random(2) + 1));
if (vy > -30) {
_local2.setVolume(100 * (vy / -30));
}
if (!torso) {
_local2.setVolume(40);
}
_local2.start(0, 0);
combo = 1;
if (spin == true) {
spin = false;
robot.bot.gotoAndStop(4);
updateRobotImage();
}
if (Math.abs(vy) < 100) {
keepGroundView = false;
} else {
keepGroundView = true;
}
if (magnitude < 25) {
shakeMC(robot, 1, 10, false);
skipping = false;
robot.skidding = true;
vr = 0;
waitToExplode = 20;
robot.exploded = false;
robot.shake = true;
robot.bot.gotoAndStop(4);
robot._rotation = 90;
combo = 1;
_root.onEnterFrame = skidding;
return(undefined);
}
}
}
if ((!spin) && (torso)) {
if (vy < 0) {
if (vy < -20) {
robot.bot.backHand._rotation = -25;
robot.bot.frontHand._rotation = -10;
robot.bot.frontFoot._rotation = -25;
robot.bot.backFoot._rotation = -25;
} else {
robot.bot.backHand._rotation = -25 * (vy / -20);
robot.bot.frontHand._rotation = -10 * (vy / -20);
robot.bot.backFoot._rotation = -15 * (vy / -20);
robot.bot.frontFoot._rotation = -15 * (vy / -20);
}
} else if (vy > 20) {
robot.bot.backHand._rotation = 25;
robot.bot.frontHand._rotation = 10;
robot.bot.backFoot._rotation = 15;
robot.bot.frontFoot._rotation = 15;
} else {
robot.bot.backHand._rotation = 25 * (vy / 20);
robot.bot.frontHand._rotation = 10 * (vy / 20);
robot.bot.backFoot._rotation = 15 * (vy / 20);
robot.bot.frontFoot._rotation = 15 * (vy / 20);
}
} else if (torso) {
setSpinningRobot();
robot.bot.play();
}
robot.streak._xscale = (robot.streak._yscale = (((vx * 1.5) > 100) ? 100 : (vx * 1.5)));
robot.streak._alpha = robot.streak._xscale;
robot._rotation = 90 + ((Math.atan2(vy, vx) * 57.2957795130823) / 3);
if (!torso) {
robot.streak._alpha = 0;
robot.bot.head._rotation = robot.bot.head._rotation + (vx / 2);
}
if (distanceToNextEnemy <= distance) {
if ((distance / 100) > 700) {
distanceToNextEnemy = distance + ((500 + ((distance / 100) - 700)) + random(600));
} else {
distanceToNextEnemy = distance + (500 + random(600));
}
addEnemy();
}
}
function skidding() {
distance = distance + vx;
robot._x = robot._x + (vx / 3);
if (vx <= 0) {
vx = 0;
if (robot.bot.frontHand._rotation > -20) {
robot.bot.frontHand._rotation = robot.bot.frontHand._rotation + vr;
robot.bot.backHand._rotation = robot.bot.frontHand._rotation;
robot.bot.frontFoot._rotation = (robot.bot.backFoot._rotation = robot.bot.frontHand._rotation - 5);
vr = vr - 0.9;
} else {
if (robot.shake) {
robot.shake = false;
shakeMC(robot, 1, 25, false);
robot.onEnterFrame = function () {
this._xscale = this._xscale + 0.1;
this._yscale = this._xscale;
};
}
robot.bot.frontHand._rotation = -20;
robot.bot.backHand._rotation = robot.bot.frontHand._rotation;
robot.bot.frontFoot._rotation = (robot.bot.backFoot._rotation = -25);
if (waitToExplode > 0) {
waitToExplode--;
} else {
throwPlank();
changeVolume(sMusic, 70);
robot.exploded = true;
showGameOver();
delete waitToExplode;
sBeep.start(0, 0);
sBeep.onSoundComplete = function () {
robot._alpha = 0;
isGameOver = true;
delete robot.onEnterFrame;
var _local4 = _root.attachMovie("hole", "hole", 29, {_x:robot._x + 29, _y:robot._y + 13});
_local4._xscale = (_local4._yscale = 75);
var _local5 = _root.attachMovie("explosion", "explosion", _root.getNextHighestDepth(), {_x:robot._x, _y:robot._y, _xscale:150, _yscale:150});
_local5.waitTime = 7;
_local5.onEnterFrame = function () {
if (this.waitTime >= 0) {
this.waitTime--;
} else {
for (var _local2 in movingObjects) {
if (movingObjects[_local2].type == 1) {
movingObjects[_local2].gotoAndPlay("Hit");
delete movingObjects[_local2].onEnterFrame;
}
}
delete this.onEnterFrame;
}
};
delete this.onSoundComplete;
};
delete _root.onEnterFrame;
}
}
} else {
moveEnvironment(-vx, 0);
vx = vx - friction;
}
if (!torso) {
var _local6 = -45 - robot.bot.head._rotation;
robot.bot.head._rotation = robot.bot.head._rotation + Math.abs(_local6 * 0.5);
}
if (distanceToNextEnemy <= distance) {
if ((distance / 100) > 500) {
distanceToNextEnemy = distance + ((500 + ((distance / 100) - 500)) + random(600));
} else {
distanceToNextEnemy = distance + (500 + random(600));
}
addEnemy();
}
}
function showGameOver() {
gameOver._alpha = 100;
gameOver._x = 337;
gameOver._y = -140;
gameOver.swapDepths(_root.getNextHighestDepth());
if (launched) {
var _local3 = score + Math.floor(distance / 100);
gameOver.points.text = formatWithCommas(_local3);
gameOver.winlost.gotoAndStop(1);
} else {
gameOver.points.text = score;
gameOver.winlost.gotoAndStop(2);
}
gameOver.waitTime = 20;
fadeAndSweep(scoreBoard, scoreBoard._x, -30, 0, 0.5, scoreBoard._xscale, undefined);
gameOver.onEnterFrame = function () {
if (this.waitTime > 0) {
this.waitTime--;
} else {
fadeAndSweep(this, this._x, 152, 100, 0.5, this._xscale, throwScraps);
newGameListener = new Object();
newGameListener.onKeyDown = function () {
if (Key.getCode() == 32) {
_root.playAgain();
Key.removeListener(newGameListener);
}
};
Key.addListener(newGameListener);
delete this.onEnterFrame;
}
};
}
function tryToPlaceTree() {
if (distance >= distanceToNextTree) {
addTree();
distanceToNextTree = (distance + 300) + random(500);
}
}
function moveEnvironment(x, y) {
mainBG._x = mainBG._x + x;
mainBG._y = mainBG._y + y;
wrapGraphic(mainBG);
grass._x = grass._x + (x * 2);
grass._y = grass._y + y;
wrapGraphic(grass);
tree._x = tree._x + x;
tree._y = tree._y + y;
if (tree._x < -115) {
tree._x = tree.startX + random(2000);
tree._xscale = (tree._yscale = 60 + random(40));
tree.gotoAndStop(random(2) + 1);
}
for (var _local3 in movingObjects) {
movingObjects[_local3]._x = movingObjects[_local3]._x + x;
movingObjects[_local3]._y = movingObjects[_local3]._y + y;
if (movingObjects[_local3]._x < movingObjects[_local3].doneX) {
removeFromMovingObjects(movingObjects[_local3]);
}
}
}
function removeFromMovingObjects(mc) {
var _local2 = movingObjects.length;
for (var _local3 in movingObjects) {
if (movingObjects[_local3] == mc) {
movingObjects[_local3] = movingObjects[_local2 - 1];
movingObjects.pop();
if (mc.removeLater) {
removeMovieClip(mc);
}
return(undefined);
}
}
}
function shakeMC(mc, force, dur, resetAfterDone) {
resetAfterDone = ((resetAfterDone == undefined) ? false : (resetAfterDone));
var _local2 = mc.createEmptyMovieClip("shaker", mc.getNextHighestDepth());
_local2.dur = dur;
_local2.force = force;
_local2.tempX = 0;
_local2.tempY = 0;
_local2.origX = mc._x;
_local2.origY = mc._y;
_local2.reset = false;
_local2.onEnterFrame = function () {
if (this.dur <= 0) {
if (this.setOriginal) {
mc._parent._x = this.origX;
mc._parent._y = this.origY;
}
delete this.onEnterFrame;
}
if (this.reset) {
this.tempX = this.tempX * -1;
this.tempY = this.tempY * -1;
this.reset = false;
} else {
this.tempX = random(this.force) + 1;
this.tempY = random(this.force) + 1;
this.reset = true;
this.dur--;
}
this._parent._x = this._parent._x - this.tempX;
this._parent._y = this._parent._y - this.tempY;
};
}
function addTree() {
var _local2 = _root.attachMovie("bgTrees", "bgTree" + bgTreeDepth, bgTreeDepth);
bgTreeDepth = ((bgTreeDepth >= 20) ? ((bgTreeDepth = 15)) : (bgTreeDepth + 1));
_local2._x = 1105;
_local2._y = mainBG._y - 95;
_local2.doneX = -358;
_local2.startY = 330;
_local2.removeLater = true;
_local2._xscale = (_local2._yscale = 50 + random(50));
_local2.gotoAndStop(random(2) + 1);
movingObjects.push(_local2);
}
function addEnemy() {
if (random(10) <= 2) {
switch (random(4)) {
case 0 :
enemy = _root.attachMovie("smallBuilding", "smallBuilding" + enemyDepth, enemyDepth);
enemy.startY = 356;
enemy.offsetY = 52;
enemy.multiplier = 0.8;
enemy.speed = 0;
enemy.force = 0;
enemy.type = 0;
enemy._xscale = (enemy._yscale = 50);
break;
case 1 :
enemy = _root.attachMovie("bigBuilding1", "bigBuilding" + enemyDepth, enemyDepth);
enemy.startY = 353;
enemy.offsetY = 55;
ememy._alpha = 90;
enemy.multiplier = 0.75;
enemy.speed = 0;
enemy.force = 0;
enemy.type = 0;
enemy._xscale = (enemy._yscale = 40);
break;
case 2 :
enemy = _root.attachMovie("bigBuilding2", "bigBuilding" + enemyDepth, enemyDepth);
enemy.startY = 353;
enemy.offsetY = 55;
ememy._alpha = 90;
enemy.multiplier = 0.75;
enemy.speed = 0;
enemy.force = 0;
enemy.type = 0;
enemy._xscale = (enemy._yscale = 40);
break;
case 3 :
enemy = _root.attachMovie("crane", "crane" + enemyDepth, enemyDepth);
enemy.startY = 342;
enemy.offsetY = 66;
ememy._alpha = 90;
enemy.multiplier = 0;
enemy.speed = 0;
enemy.force = 0;
enemy.type = 2;
enemy._xscale = (enemy._yscale = 40);
}
} else {
var _local6 = random(11);
var enemy;
if (_local6 <= 4) {
enemy = _root.attachMovie("enemy3", "enemy3" + enemyDepth, enemyDepth);
enemy.startY = 350;
enemy.speed = 2;
enemy.force = 10;
enemy.prize = 15;
enemy.offsetY = 58;
enemy._xscale = (enemy._yscale = 90);
} else if (_local6 <= 8) {
var _local5 = random(2) + 4;
enemy = _root.attachMovie("enemy" + _local5, ("enemy" + _local5) + enemyDepth, enemyDepth);
if (_local5 == 4) {
enemy.startY = 357.6;
enemy.offsetY = 50.4;
enemy.speed = 1.5;
enemy.force = 20;
enemy.prize = 25;
enemy.gotoAndPlay(random(32) + 1);
enemy._xscale = (enemy._yscale = 60);
} else {
enemy.startY = 244;
enemy.offsetY = 164;
enemy.speed = 1;
enemy.prize = 45;
enemy.force = 20;
enemy._xscale = (enemy._yscale = 60);
}
} else if (_local6 <= 10) {
var _local5 = random(2) + 1;
enemy = _root.attachMovie("enemy" + _local5, ("enemy" + _local5) + enemyDepth, enemyDepth);
if (_local5 == 1) {
enemy.startY = 120;
enemy.offsetY = 288;
enemy.speed = 0;
enemy.prize = 45;
enemy.force = 20;
enemy._xscale = (enemy._yscale = 60);
} else {
enemy.startY = 361;
enemy.offsetY = 47;
enemy.speed = 1;
enemy.prize = 35;
enemy.force = 20;
enemy._xscale = (enemy._yscale = 60);
}
}
enemy.type = 1;
}
enemyDepth = ((enemyDepth > 35) ? 30 : (enemyDepth + 1));
enemy._x = 890;
enemy._y = mainBG._y - enemy.offsetY;
enemy.doneX = -330;
enemy.hit = false;
enemy.removeLater = true;
movingObjects.push(enemy);
enemy.onEnterFrame = function () {
this._x = this._x - this.speed;
if (((!this.hit) && (!robot.exploded)) && (this.hitBox.hitTest(robot.hitBox))) {
this.hit = true;
if (this.type == 0) {
this.gotoAndPlay("Hit");
var _local5 = new Sound(this);
_local5.attachSound("smallHit" + (random(4) + 1));
_local5.start(0, 0);
if (_root.vy > 0) {
_root.vy = _root.vy * -1;
}
spin = false;
combo = 1;
robot.bot.gotoAndStop(4);
_root.vx = _root.vx * this.multiplier;
_root.vy = _root.vy * this.multiplier;
if (robot.skidding) {
_root.vx = 0;
}
if (Math.abs(_root.vy) < 50) {
_root.keepGroundView = false;
} else {
_root.keepGroundView = true;
}
} else if (this.type == 1) {
this.gotoAndPlay("Hit");
shakeMC(_root, 4, 6, true);
if (_root.vy > 0) {
_root.vy = _root.vy * -1;
}
if (torso) {
spin = true;
setSpinningRobot();
robot.bot.gotoAndPlay(2);
} else {
spin = false;
robot.bot.gotoAndStop(4);
updateRobotImage();
}
_root.score = _root.score + (this.prize * combo);
showPrize(this);
combo++;
_root.vx = _root.vx + (this.force * 2.2);
_root.vy = _root.vy - (this.force * 0.9);
if (robot.skidding) {
_root.onEnterFrame = flying2;
}
if (Math.abs(_root.vy) < 40) {
_root.keepGroundView = false;
} else {
_root.keepGroundView = true;
}
delete this.onEnterFrame;
} else if (this.type == 2) {
_root.crane = this;
robot.swapDepths(crane);
setSpinningRobot();
robot.bot.gotoAndStop(1);
robot.streak._alpha = 0;
keepGroundView = true;
_root.swingState = 0;
_root.vr = vx / 20;
var _local5 = new Sound(this);
_local5.attachSound("smallHit4");
_local5.start(0, 0);
_root.onEnterFrame = function () {
vx = vx * 0.5;
distToGround = (mainBG.startY - mainBG._y) * 0.1;
distToCrane = (600 - crane._x) * 0.1;
if (vx < 1) {
moveEnvironment(distToCrane, distToGround);
} else {
moveEnvironment(-vx, distToGround);
}
wrapGraphic(mainBG);
if (swingState == 0) {
crane.magnet._rotation = crane.magnet._rotation - vr;
vr = vr * 0.8;
if (vr < 0.5) {
swingState = 1;
}
} else if (swingState == 1) {
crane.magnet._rotation = crane.magnet._rotation + vr;
vr = vr * 1.25;
if (crane.magnet._rotation > 0) {
swingState = 2;
}
} else if (swingState == 2) {
crane.magnet._rotation = crane.magnet._rotation + vr;
vr = vr * 0.8;
if (vr < 0.5) {
throwPlank();
changeVolume(sMusic, 70);
robot.exploded = true;
showGameOver();
sBeep.start(0, 0);
sBeep.onSoundComplete = function () {
robot._alpha = 0;
crane.magnet._alpha = 0;
isGameOver = true;
delete robot.onEnterFrame;
var _local4 = _root.attachMovie("explosion", "explosion", _root.getNextHighestDepth(), {_x:robot._x, _y:robot._y, _xscale:150, _yscale:150});
_local4.waitTime = 7;
_local4.onEnterFrame = function () {
if (this.waitTime >= 0) {
this.waitTime--;
} else {
for (var _local2 in movingObjects) {
if (movingObjects[_local2].type == 1) {
movingObjects[_local2].gotoAndPlay("Hit");
delete movingObjects[_local2].onEnterFrame;
}
}
delete this.onEnterFrame;
}
};
delete this.onSoundComplete;
};
delete _root.onEnterFrame;
}
}
var _local3 = new Object();
_local3.x = 0;
_local3.y = 0;
crane.magnet.spot.localToGlobal(_local3);
robot._x = _local3.x;
robot._y = _local3.y;
robot._rotation = 39 + crane.magnet._rotation;
};
}
}
};
}
function showPrize(enemy) {
var sp = _root.attachMovie("showPoints", "showPoints", _root.getNextHighestDepth());
sp._x = enemy._x - vx;
sp._x = ((sp._x < 40) ? 40 : (sp._x));
sp._y = enemy._y - 50;
sp.points.text = String("+" + enemy.prize);
sp._rotation = vx / 20;
sp.waitTime = 15;
if (combo > 1) {
sp.combo._alpha = 100;
sp.combo.points.text = combo;
}
sp.onEnterFrame = function () {
sp._x = sp._x + 0.5;
if (this.waitTime > 0) {
this.waitTime--;
} else {
this._alpha = this._alpha - 4;
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
};
}
function initUpArrow() {
upArrow._alpha = 0;
upArrow.feet.text = "0";
upArrow.showing = false;
upArrow.onEnterFrame = function () {
this._x = robot._x - 10;
var _local2 = Math.floor((35 - robot._y) / 40) - 2;
this._rotation = 10 - (_local2 / 10);
if (this._rotation < 0) {
this._rotation = 0;
}
this.feet.text = _local2;
if (robot._y < -35) {
if (!this.showing) {
this.showing = true;
this._y = 30;
fadeAndSweep(this, _x, 20, 100, 0.8, 100, undefined);
}
} else if (this.showing) {
this.showing = false;
fadeAndSweep(this, _x, 30, 0, 0.8, 100, undefined);
}
};
}
function wrapGraphic(mc) {
if (mc._x <= mc.wrapX) {
mc._x = mc.startX + (mc._x - mc.wrapX);
}
}
function resetHeights() {
mainBG._y = mainBG.startY;
grass._y = grass.startY;
tree._y = tree.startY;
for (var _local1 in movingObjects) {
movingObjects[_local1]._y = movingObjects[_local1].startY;
}
}
function formatWithCommas(num) {
var _local1;
_local1 = String(num);
if (_local1.length > 3) {
var _local3 = _local1.substring(0, _local1.length - 3);
var _local2 = _local1.substring(_local1.length - 3, _local1.length);
return(String((_local3 + ",") + _local2));
}
return(_local1);
}
function playAgain() {
Key.removeListener(newGameListener);
changeVolume(sMusic, 0);
blackOut.swapDepths(_root.getNextHighestDepth());
fadeAndSweep(blackOut, blackOut._x, blackOut._y, 100, 0.2, 100, reset);
fadeAndSweep(gameOver, gameOver._x, -140, 0, 0.5, 100, undefined);
}
function throwPlank() {
var _local3 = _root.attachMovie("plank", "plank", 99);
_local3._x = robot._x + 140;
_local3._y = -85;
var _local4 = 1.74532925199433;
_local3.vx = 110 * Math.cos(_local4);
_local3.vy = 110 * Math.sin(_local4);
_local3._alpha = 90;
_local3.distance.text = String(Math.floor(distance / 100));
_local3.onEnterFrame = function () {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
this._vy = this._vy + 1.7;
if (this._y > 365) {
shakeMC(_root, 1, 2, true);
this._y = 365;
this.gotoAndStop(2);
this.vr = 3;
this.onEnterFrame = function () {
if (this._rotation > 0) {
this._rotation = -this.vr;
} else {
this._rotation = this.vr;
}
this.vr = this.vr - 1;
if (this.vr < 0) {
delete this.onEnterFrame;
}
};
}
};
}
function throwScraps() {
var _local6 = 180;
var _local7 = randRange(5, 10);
var _local5 = 0;
while (_local5 < _local7) {
var _local3 = _root.attachMovie("scrap", "scrap" + _local6, _local6);
_local6++;
_local3._y = randRange(-10, -1000);
_local3._alpha = 65;
_local3._xscale = (_local3._yscale = randRange(40, 80));
_local3.gotoAndStop(random(3) + 1);
_local3._x = randRange(30, 700);
_local3.vx = (_local3._x - 500) / 25;
_local3.vy = randRange(3, 9);
_local3.onEnterFrame = function () {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
this.vy = this.vy + 1.8;
this._rotation = this._rotation + (this.vx * 1.5);
if (this._y > 360) {
this.vy = this.vy * -0.5;
this.vx = this.vx * 0.7;
this._y = 360;
if (Math.abs(this.vy) > 15) {
var _local2 = new Sound(this);
_local2.attachSound("smallHit" + (random(4) + 1));
_local2.setVolume(20);
_local2.start(0, 0);
} else {
this._alpha = this._alpha - 7;
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
}
};
_local5++;
}
}
function reset() {
removeMovieClip(timeBonus);
removeMovieClip(chick);
removeMovieClip(grass);
removeMovieClip(mainBG);
removeMovieClip(groves);
removeMovieClip(holdBar);
removeMovieClip(leaveBar);
removeMovieClip(pointer);
removeMovieClip(readysetgo);
removeMovieClip(arrowKeyInfo);
removeMovieClip(tree);
removeMovieClip(upArrow);
removeMovieClip(scoreBoard);
removeMovieClip(gameOver);
removeMovieClip(hole);
removeMovieClip(plank);
var _local4 = 180;
while (_local4 <= 190) {
var _local3 = _root.getInstanceAtDepth(_local4);
removeMovieClip(_local3);
_local4++;
}
for (_local4 in movingObjects) {
removeMovieClip(movingObjects[_local4]);
}
_root.gotoAndPlay("reset");
blackOut.onEnterFrame = function () {
this._alpha = this._alpha - 4;
if (this._alpha <= 0) {
this._alpha = 0;
delete this.onEnterFrame;
}
};
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
Frame 29
stop();
Frame 31
gotoAndPlay ("game");
Symbol 49 MovieClip [body] Frame 45
_root.removeFromMovingObjects(this);
trace("moving Oobjects from tosro frame: " + _root.movingObjects);
removeMovieClip(this);
Symbol 70 MovieClip Frame 1
stop();
Symbol 71 MovieClip [crane] Frame 1
stop();
Symbol 82 MovieClip [bigBuilding1] Frame 1
stop();
Symbol 112 MovieClip [explosion] Frame 76
removeMovieClip(this);
Symbol 124 MovieClip [enemy3] Frame 31
gotoAndPlay (2);
Symbol 124 MovieClip [enemy3] Frame 82
stop();
Symbol 140 MovieClip [enemy5] Frame 24
gotoAndPlay (1);
Symbol 140 MovieClip [enemy5] Frame 68
_root.removeFromMovingObjects(this);
Symbol 191 MovieClip [enemy4] Frame 36
gotoAndPlay (1);
Symbol 191 MovieClip [enemy4] Frame 108
stop();
Symbol 193 MovieClip [enemy1] Frame 34
gotoAndPlay (1);
Symbol 193 MovieClip [enemy1] Frame 65
stop();
Symbol 195 MovieClip [smallBuilding] Frame 1
stop();
Symbol 203 MovieClip [enemy2] Frame 30
gotoAndPlay (1);
Symbol 203 MovieClip [enemy2] Frame 52
stop();
Symbol 207 MovieClip [arm] Frame 78
_root.removeFromMovingObjects(this);
removeMovieClip(this);
Symbol 212 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 4
if (_root.torso) {
if (numOfFeet == 0) {
_root.robot.hitBox.gotoAndStop(2);
}
} else {
_root.robot.hitBox.gotoAndStop(3);
}
head.gotoAndStop(2);
Symbol 235 MovieClip [robot] Frame 1
_root.updateRobotImage();
stop();
Symbol 240 MovieClip [bgTrees] Frame 1
stop();
Symbol 263 MovieClip [plank] Frame 1
stop();
Symbol 263 MovieClip [plank] Frame 2
stop();
Symbol 270 MovieClip [ActionSource] Frame 1
#initclip 5
Object.registerClass("ActionSource", com.omniture.AS2.ActionSource);
#endinitclip
Symbol 267 MovieClip [__Packages.com.omniture.AS2.FPL.ActionSource] Frame 0
class com.omniture.AS2.FPL.ActionSource extends MovieClip
{
var root, _visible, trackOnLoadInterval, _movie, accountVarList, _moduleMediaVariables;
function ActionSource () {
super();
var _local4 = this;
var _local5;
_local4.initPre();
_local4.version = "FAS-2.4";
if (_local4.isSet(_root)) {
_local4.movie = _root;
} else if (_local4.isSet(root)) {
_local4.movie = root;
}
var _local7 = getVersion();
var _local6 = _local7.split(" ");
_local4.flashVersion = parseInt(_local6[1].substr(0, 1));
_local4.requestNum = 0;
_local4.requestList = new Array();
_local4.lastRequest = "";
_local4.requiredVarList = ["dynamicVariablePrefix", "visitorID", "vmk", "charSet", "visitorNamespace", "cookieDomainPeriods", "cookieLifetime", "pageName", "pageURL", "referrer", "currencyCode"];
_local4.accountVarList = ["purchaseID", "variableProvider", "channel", "server", "pageType", "transactionID", "campaign", "state", "zip", "events", "products"];
_local5 = _local4.requiredVarList.length - 1;
while (_local5 >= 0) {
_local4.accountVarList.unshift(_local4.requiredVarList[_local5]);
_local5--;
}
_local5 = 1;
while (_local5 <= 50) {
_local4.accountVarList.push("prop" + _local5);
_local4.accountVarList.push("eVar" + _local5);
_local4.accountVarList.push("hier" + _local5);
_local5++;
}
_local4.accountVarList.push("pe");
_local4.accountVarList.push("pev1");
_local4.accountVarList.push("pev2");
_local4.accountVarList.push("pev3");
_local4.requiredVarList.push("pe");
_local4.requiredVarList.push("pev1");
_local4.requiredVarList.push("pev2");
_local4.requiredVarList.push("pev3");
_local4.accountConfigList = ["linkObject", "linkURL", "linkName", "linkType", "trackDownloadLinks", "trackExternalLinks", "trackClickMap", "linkLeaveQueryString", "linkTrackVars", "linkTrackEvents", "trackingServer", "trackingServerSecure", "dc", "movieID", "autoTrack", "delayTracking", "trackLocal", "debugTracking"];
_local4.modulesInit();
_local4.initPost();
}
function isSet(val, mbr) {
if ((mbr != null) && (mbr != undefined)) {
val = val[mbr];
}
return((((((val != null) && (val != undefined)) && (("" + val) != "NaN")) && (val != false)) && (val != "")) && (val != 0));
}
function initPre() {
_visible = false;
}
function initPost() {
setInterval(this, "setVariableCallHandler", 1000);
}
function get Capabilities() {
return(System.capabilities);
}
function setTrackOnLoadInterval() {
trackOnLoadInterval = setInterval(this, "doTrackOnLoad", 50);
}
function startDelayTrackingInterval() {
var _local2 = this;
_local2.delayTrackingInterval = setInterval(_local2, "delayTrackingDone", _local2.delayTracking);
}
function requestURL(url) {
var _local2 = new LoadVars();
var _local1 = new LoadVars();
_local2.sendAndLoad(url, _local1, "GET");
}
function callJavaScript(script) {
return(null);
}
function track(variableOverrides, bufferedRequestID) {
_track(variableOverrides, bufferedRequestID);
}
function trackLink(linkObject, linkType, linkName, variableOverrides) {
_trackLink(linkObject, linkType, linkName, variableOverrides);
}
function set movie(movie) {
_movie = movie;
if (isSet(_movie)) {
if (!flashLivePreview) {
if (flashASVersion < 3) {
_movie.s_s = this;
}
modulesUpdate();
}
}
//return(this.movie);
}
function get movie() {
return(_movie);
}
function set trackOnLoad(trackOnLoad) {
_trackOnLoad = trackOnLoad;
if (_trackOnLoad) {
setTrackOnLoadInterval();
}
//return(this.trackOnLoad);
}
function get trackOnLoad() {
return(_trackOnLoad);
}
function doTrackOnLoad() {
var _local2 = this;
if ((!_local2.isSet(_local2.account)) || (!_local2.isSet(_local2.movie))) {
return(undefined);
}
clearInterval(_local2.trackOnLoadInterval);
if (_local2._trackOnLoad && (!_local2.onLoadTracked)) {
_local2.onLoadTracked = true;
_local2.track();
}
}
function isNumber(num) {
return(!isNaN(parseInt(num)));
}
function replace(x, o, n) {
if (isSet(x)) {
if (x.indexOf(o) >= 0) {
return(x.split(o).join(n));
}
}
return(x);
}
function setVariableCallHandler() {
var _local4 = this;
var _local8;
var _local10;
var _local9;
var _local3;
var _local7;
var _local6;
var _local2;
var _local5;
for (_local10 in _local4) {
if (_local10.substr(0, 5) == "_svc_") {
_local3 = _local10.split("_");
if (_local4.isSet(_local3) && (_local3.length >= 4)) {
if ((_local3[3] == "dot") && (_local3.length > 4)) {
_local3[2] = _local3[2] + ("_dot_" + _local3[4]);
_local7 = 5;
while (_local7 < _local3.length) {
_local3[_local7 - 2] = _local3[_local7];
_local7++;
}
}
_local2 = null;
if (_local4.isSet(_local6)) {
_local5 = 0;
while (_local5 < _local6.length) {
if (_local6[_local5].methodName == _local3[2]) {
_local2 = _local6[_local5];
}
_local5++;
}
}
if (!_local4.isSet(_local2)) {
_local6 = new Array();
_local2 = new Object();
_local2.methodName = _local3[2];
_local6[0] = _local2;
}
if (_local3[3] == "call") {
if (_local4.isSet(_local4[_local10])) {
_local2.call = true;
}
_local4[_local10] = null;
} else if (((_local3[3] == "param") && (_local3.length > 4)) && (_local4.isSet(_local3[4]))) {
if (!_local4.isSet(_local2.paramList)) {
_local2.paramList = new Array();
}
_local2.paramList[_local3[4]] = _local4[_local10];
}
}
}
}
if (_local4.isSet(_local6) && (_local6.length > 0)) {
_local5 = 0;
while (_local5 < _local6.length) {
_local2 = _local6[_local5];
if (_local4.isSet(_local2.methodName) && (_local4.isSet(_local2.call))) {
_local3 = _local2.methodName.split("_dot_");
if (_local3.length > 1) {
_local8 = _local4[_local3[0]];
_local9 = _local3[1];
} else {
_local8 = _local4;
_local9 = _local2.methodName;
}
if (_local4.isSet(_local8[_local9])) {
if (_local4.isSet(_local2.paramList) && (_local2.paramList.length > 0)) {
if (_local2.paramList.length == 1) {
_local4["_svc_result_" + _local2.methodName] = _local8[_local9](_local2.paramList[0]);
} else if (_local2.paramList.length == 2) {
_local4["_svc_result_" + _local2.methodName] = _local8[_local9](_local2.paramList[0], _local2.paramList[1]);
} else if (_local2.paramList.length == 3) {
_local4["_svc_result_" + _local2.methodName] = _local8[_local9](_local2.paramList[0], _local2.paramList[1], _local2.paramList[2]);
}
} else {
_local4[("_svc_" + _local2.methodName) + "_result"] = _local8[_local9]();
}
}
}
_local5++;
}
}
}
function getMovieURL() {
var _local2 = this;
var _local3;
_local3 = _local2.callJavaScript("function s_ActionSource_wl(){return window.location.href;}");
if (_local2.isSet(_local3)) {
return(_local3);
}
if (_local2.isSet(_local2.movie)) {
if (((_local2.flashASVersion > 2) && (_local2.isSet(_local2.movie.loaderInfo))) && (_local2.isSet(_local2.movie.loaderInfo.loaderURL))) {
return(_local2.movie.loaderInfo.loaderURL);
}
if (_local2.isSet(_local2.movie._url)) {
return(_local2.movie._url);
}
}
return("");
}
function getMovieReferrer() {
var _local2 = this;
return(_local2.callJavaScript((((((("function s_ActionSource_r(){\tvar \t\tr = '',\t\tw = window,\t\te,\t\tp,\t\tl,\t\te;\tif ((w) && (w.document)) {\t\tr = w.document.referrer;\t\ttry {\t\t\tp = w.parent;\t\t\tl = w.location;\t\t\twhile ((p) && (p.location) && (p.location != l) && (p.location.host == l.host)) {\t\t\t\tw = p;\t\t\t\tp = w.parent;\t\t\t}" + "\t\t} catch (e) {}") + "\t\tif ((w) && (w.document)) {") + "\t\t\tr = w.document.referrer;") + "\t\t}") + "\t}") + "\treturn r;") + "}"));
}
function getBufferedRequests() {
var _local2 = this;
var _local3;
if (!_local2.isSet(_local2.disableBufferedRequests)) {
_local3 = SharedObject.getLocal("s_br", "/");
}
if (!_local2.isSet(_local3)) {
_local3 = _local2.bufferedRequests;
if (!_local2.isSet(_local3)) {
_local2.bufferedRequests = new Object();
_local2.bufferedRequests.flush = function () {
};
_local3 = _local2.bufferedRequests;
}
}
if (!_local2.isSet(_local3.data)) {
_local3.data = new Object();
}
if (!_local2.isSet(_local3.data.list)) {
_local3.data.list = new Array();
}
return(_local3);
}
function bufferRequest(account, bufferedRequestID, request) {
var _local5 = this;
var _local3;
var _local7;
var _local2;
var _local6;
_local3 = _local5.getBufferedRequests();
if (_local5.isSet(_local3)) {
_local6 = -1;
_local2 = 0;
while (_local2 < _local3.data.list.length) {
if (_local3.data.list[_local2].id == bufferedRequestID) {
_local3.data.list[_local2].request = request;
request = "";
} else if (!_local5.isSet(_local3.data.list[_local2].id)) {
_local6 = _local2;
}
_local2++;
}
if (_local5.isSet(request)) {
_local7 = new Object();
_local7.account = account;
_local7.id = bufferedRequestID;
_local7.request = request;
if (_local6 >= 0) {
_local3.data.list[_local6] = _local7;
} else {
_local3.data.list.push(_local7);
}
}
_local3.flush();
}
}
function _flushBufferedRequests(account) {
var _local6 = this;
var _local4;
var _local3;
var _local2;
_local4 = _local6.getBufferedRequests();
if (_local6.isSet(_local4)) {
_local2 = 0;
while (_local2 < _local4.data.list.length) {
_local3 = _local4.data.list[_local2];
if (_local3.account == account) {
_local6.flushBufferedRequest(account, _local3.id);
}
_local2++;
}
}
}
function flushBufferedRequests() {
var _local2 = this;
if (_local2.isSet(_local2.account)) {
_local2._flushBufferedRequests(_local2.account);
}
}
function flushBufferedRequest(account, bufferedRequestID) {
var _local6 = this;
var _local3;
var _local4;
var _local2;
var _local5;
_local3 = _local6.getBufferedRequests();
if (_local6.isSet(_local3)) {
_local2 = 0;
while (_local2 < _local3.data.list.length) {
_local4 = _local3.data.list[_local2];
if ((_local4.account == account) && (_local4.id == bufferedRequestID)) {
_local5 = _local3.data.list[_local2].request;
_local3.data.list[_local2].account = "";
_local3.data.list[_local2].id = "";
_local3.data.list[_local2].request = "";
_local3.flush();
_local6.makeRequest("", "", _local5, "");
}
_local2++;
}
}
}
function makeRequest(cacheBusting, queryString, request, bufferedRequestID) {
var _local2 = this;
var _local5 = _local2.getMovieURL();
var _local6;
if (!_local2.isSet(request)) {
if (_local2.isSet(_local2.trackingServer)) {
_local6 = _local2.trackingServer;
if (_local2.isSet(_local2.trackingServerSecure) && (_local5.toLowerCase().substr(0, 6) == "https:")) {
_local6 = _local2.trackingServerSecure;
}
} else {
var _local3 = _local2.visitorNamespace;
var _local7;
if (!_local2.isSet(_local3)) {
_local3 = _local2.account;
_local7 = _local3.indexOf(",");
if (_local7 >= 0) {
_local3 = _local3.substr(0, _local7);
}
_local3 = _local3.split("_").join("-");
}
_local6 = ((_local3 + ".") + (_local2.isSet(_local2.dc) ? (_local2.dc) : 112)) + ".2o7.net";
}
if (_local5.toLowerCase().substr(0, 6) == "https:") {
request = "https://";
} else {
request = "http://";
}
request = request + (((((((((((((_local6 + "/b/ss/") + _local2.account) + "/") + (_local2.mobile ? "5.0" : "0")) + "/") + _local2.version) + "-AS") + _local2.flashASVersion) + "/") + cacheBusting) + "?AQB=1&ndh=1&") + queryString) + "&AQE=1");
if (_local2.isSet(bufferedRequestID)) {
_local2.bufferRequest(_local2.account, bufferedRequestID, request);
return(undefined);
}
}
if ((_local5.toLowerCase().substr(0, 6) == "https:") && (request.toLowerCase().substr(0, 5) == "http:")) {
request = "https:" + request.substr(5);
}
if (((_local2.isSet(_local2.trackLocal) || (_local2.flashVersion < 8)) || (!_local2.isSet(_local5))) || (_local5.toLowerCase().substr(0, 4) == "http")) {
_local2.requestList.push(request);
if ((!_local2.isSet(_local2.delayTracking)) || (_local2.isSet(_local2.delayTrackingStage) && (_local2.delayTrackingStage == 2))) {
_local2.flushRequestList();
} else if (_local2.isSet(_local2.delayTracking) && (!_local2.isSet(_local2.delayTrackingStage))) {
_local2.delayTrackingStage = 1;
_local2.startDelayTrackingInterval();
}
}
}
function flushRequestList() {
var _local2 = this;
while (_local2.requestNum < _local2.requestList.length) {
if (_local2.isSet(_local2.debugTracking)) {
var _local5 = "ActionSource Debug: " + _local2.requestList[_local2.requestNum];
var _local4 = _local2.requestList[_local2.requestNum].split("&");
var _local3;
_local3 = 0;
while (_local3 < _local4.length) {
_local5 = _local5 + ("\n\t" + unescape(_local4[_local3]));
_local3++;
}
trace(_local5);
}
_local2.requestURL(_local2.requestList[_local2.requestNum]);
_local2.lastRequest = _local2.requestList[_local2.requestNum];
_local2.requestNum++;
}
}
function delayTrackingDone() {
var _local2 = this;
clearInterval(_local2.delayTrackingInterval);
_local2.delayTrackingStage = 2;
_local2.flushRequestList();
}
function clearVars() {
var _local4 = this;
var _local3;
var _local2;
_local3 = 0;
while (_local3 < accountVarList.length) {
_local2 = _local4.accountVarList[_local3];
if (((((((((((_local2.substr(0, 4) == "prop") || (_local2.substr(0, 4) == "eVar")) || (_local2.substr(0, 4) == "hier")) || (_local2 == "channel")) || (_local2 == "events")) || (_local2 == "purchaseID")) || (_local2 == "transactionID")) || (_local2 == "products")) || (_local2 == "state")) || (_local2 == "zip")) || (_local2 == "campaign")) {
_local4[_local2] = undefined;
}
_local3++;
}
}
function queryStringAccountVariables() {
var _local4 = this;
var _local12 = "";
var _local9;
var _local5;
var _local2;
var _local3;
var _local6;
var _local8;
var _local7;
var _local11 = "";
var _local10 = "";
var _local13 = "";
if (_local4.isSet(_local4.linkType)) {
_local11 = _local4.linkTrackVars;
_local10 = _local4.linkTrackEvents;
} else if (_local4.isSet(_local4.pe)) {
_local13 = _local4.pe.substr(0, 1).toUpperCase() + _local4.pe.substr(1);
if (_local4.isSet(_local4[_local13])) {
_local11 = _local4[_local13].trackVars;
_local10 = _local4[_local13].trackEvents;
}
}
if (_local4.isSet(_local11)) {
_local11 = ((("," + _local11) + ",") + _local4.requiredVarList.join(",")) + ",";
}
if (_local4.isSet(_local10)) {
_local10 = ("," + _local10) + ",";
}
_local9 = 0;
while (_local9 < _local4.accountVarList.length) {
_local2 = _local4.accountVarList[_local9];
_local3 = _local4[_local2];
_local8 = _local2.substr(0, 4);
_local7 = _local2.substr(4);
if (_local4.isSet(_local3) && ((!_local4.isSet(_local11)) || (_local11.indexOf(("," + _local2) + ",") >= 0))) {
switch (_local2) {
case "dynamicVariablePrefix" :
_local2 = "D";
break;
case "visitorID" :
_local2 = "vid";
break;
case "pageURL" :
_local2 = "g";
break;
case "referrer" :
_local2 = "r";
break;
case "vmk" :
_local2 = "vmt";
break;
case "charSet" :
_local2 = "ce";
break;
case "visitorNamespace" :
_local2 = "ns";
break;
case "cookieDomainPeriods" :
_local2 = "cdp";
break;
case "cookieLifetime" :
_local2 = "cl";
break;
case "currencyCode" :
_local2 = "cc";
break;
case "channel" :
_local2 = "ch";
break;
case "transactionID" :
_local2 = "xact";
break;
case "campaign" :
_local2 = "v0";
break;
case "events" :
if (_local4.isSet(_local10)) {
_local6 = _local3.split(",");
_local3 = "";
_local5 = 0;
while (_local5 < _local6.length) {
if (_local10.indexOf(("," + _local6[_local5]) + ",") >= 0) {
_local3 = _local3 + ((_local4.isSet(_local3) ? "," : "") + _local6[_local5]);
}
_local5++;
}
}
break;
default :
if (!_local4.isNumber(_local7)) {
break;
}
if (_local8 == "prop") {
_local2 = "c" + _local7;
} else if (_local8 == "eVar") {
_local2 = "v" + _local7;
} else {
if (_local8 != "hier") {
break;
}
_local2 = "h" + _local7;
_local3 = _local3.substr(0, 255);
}
}
if (_local4.isSet(_local3)) {
_local12 = _local12 + ((("&" + escape(_local2)) + "=") + ((_local2.substr(0, 3) != "pev") ? (escape(_local3)) : (_local3)));
}
}
_local9++;
}
return(_local12);
}
function queryStringLinkTracking() {
var _local2 = this;
var _local5 = _local2.linkType;
var _local3 = _local2.linkURL;
var _local9 = _local2.linkName;
var _local4;
var _local7;
var _local8;
var _local6 = "";
var _local10;
if ((!_local2.isSet(_local3)) && (_local2.isSet(_local2.linkObject))) {
if (_local2.isSet(_local2.linkObject, "url")) {
_local3 = _local2.linkObject.url;
} else if (_local2.isSet(_local2.linkObject, "URL")) {
_local3 = _local2.linkObject.URL;
} else if (_local2.isSet(_local2.linkObject, "href")) {
_local3 = _local2.linkObject.href;
} else if (_local2.isSet(_local2.linkObject, "HREF")) {
_local3 = _local2.linkObject.HREF;
} else if (_local2.isSet(_local2.linkObject, "htmlText")) {
_local4 = _local2.linkObject.htmlText.toLowerCase().indexOf("href=");
if (_local4 >= 0) {
_local4 = _local4 + 5;
_local8 = _local2.linkObject.htmlText.substr(_local4, 1);
if ((_local8 == "\"") || (_local8 == "'")) {
_local4++;
_local7 = _local2.linkObject.htmlText.toLowerCase().indexOf(_local8, _local4);
if (_local7 >= 0) {
_local7--;
if (_local7 > _local4) {
_local3 = _local2.linkObject.htmlText.substr(_local4, (_local7 - _local4) + 1);
}
}
}
}
}
}
if (_local2.isSet(_local5) && (_local2.isSet(_local3) || (_local2.isSet(_local9)))) {
_local5 = _local5.toLowerCase();
if ((_local5 != "d") && (_local5 != "e")) {
_local5 = "o";
}
if (_local2.isSet(_local3) && (!_local2.isSet(_local2.linkLeaveQueryString))) {
_local10 = _local3.indexOf("?");
if (_local10 >= 0) {
_local3 = _local3.substr(0, _local10);
}
}
_local6 = _local6 + ("&pe=lnk_" + escape(_local5));
_local6 = _local6 + (_local2.isSet(_local3) ? ("&pev1=" + escape(_local3)) : "");
_local6 = _local6 + (_local2.isSet(_local9) ? ("&pev2=" + escape(_local9)) : "");
}
return(_local6);
}
function queryStringClickMap() {
var _local2 = this;
var _local3 = "";
var _local4 = _local2.pageName;
var _local6 = 1;
var _local5 = _local2.objectID;
var _local7 = 1;
var _local8 = "FLASH";
if (((!_local2.isSet(_local5)) && (_local2.isSet(_local2.linkObject))) && (_local2.isSet(_local2.linkObject, "name") || (_local2.isSet(_local2.linkObject, "_name")))) {
_local5 = _local2.ClickMap.getObjectID(_local2.linkObject);
}
if (!_local2.isSet(_local4)) {
_local4 = _local2.pageURL;
_local6 = 0;
}
if (((_local2.isSet(_local2.trackClickMap) && (_local2.isSet(_local4))) && (_local2.isSet(_local5))) && (_local2.isSet(_local8))) {
_local3 = _local3 + ("&pid=" + escape(_local4));
_local3 = _local3 + (_local2.isSet(_local6) ? ("&pidt=" + escape("" + _local6)) : "");
_local3 = _local3 + ("&oid=" + escape(_local5.substr(0, 100)));
_local3 = _local3 + (_local2.isSet(_local7) ? ("&oidt=" + escape("" + _local7)) : "");
_local3 = _local3 + ("&ot=" + escape(_local8));
}
return(_local3);
}
function queryStringTechnology() {
var _local3 = this;
var _local4 = "";
var _local2 = Capabilities;
if ((_local3.isSet(_local2) && (_local3.isSet(_local2.screenResolutionX))) && (_local3.isSet(_local2.screenResolutionY))) {
_local4 = _local4 + ((("&s=" + _local2.screenResolutionX) + "x") + _local2.screenResolutionY);
}
return(_local4);
}
function variableOverridesApply(variableOverrides) {
var _local2 = this;
var _local4;
var _local3;
_local4 = 0;
while (_local4 < _local2.accountVarList.length) {
_local3 = _local2.accountVarList[_local4];
if (_local2.isSet(variableOverrides[_local3]) || (_local2.isSet(variableOverrides["!" + _local3]))) {
_local2[_local3] = variableOverrides[_local3];
}
_local4++;
}
_local4 = 0;
while (_local4 < _local2.accountConfigList.length) {
_local3 = _local2.accountConfigList[_local4];
if (_local2.isSet(variableOverrides[_local3]) || (_local2.isSet(variableOverrides["!" + _local3]))) {
_local2[_local3] = variableOverrides[_local3];
}
_local4++;
}
}
function variableOverridesBuild(variableOverrides) {
var _local3 = this;
var _local4;
var _local2;
_local4 = 0;
while (_local4 < _local3.accountVarList.length) {
_local2 = _local3.accountVarList[_local4];
if (!_local3.isSet(variableOverrides[_local2])) {
variableOverrides[_local2] = _local3[_local2];
if (!_local3.isSet(variableOverrides[_local2])) {
variableOverrides["!" + _local2] = 1;
}
}
_local4++;
}
_local4 = 0;
while (_local4 < _local3.accountConfigList.length) {
_local2 = _local3.accountConfigList[_local4];
if (!_local3.isSet(variableOverrides[_local2])) {
variableOverrides[_local2] = _local3[_local2];
if (!_local3.isSet(variableOverrides[_local2])) {
variableOverrides["!" + _local2] = 1;
}
}
_local4++;
}
}
function _track(variableOverrides, bufferedRequestID) {
var _local2 = this;
var _local7;
var _local5 = new Date();
var _local8 = Math.floor(Math.random() * 10000000000000);
var _local11 = ("s" + (Math.floor(_local5.getTime() / 10800000) % 10)) + _local8;
var _local9 = (((((((((((((("" + _local5.getDate()) + "/") + _local5.getMonth()) + "/") + _local5.getFullYear()) + " ") + _local5.getHours()) + ":") + _local5.getMinutes()) + ":") + _local5.getSeconds()) + " ") + _local5.getDay()) + " ") + _local5.getTimezoneOffset();
var _local6 = "t=" + escape(_local9);
if (_local2.isSet(_local2.flashLivePreview)) {
return(undefined);
}
if (_local2.isSet(_local2.otherVariables)) {
var _local4;
var _local3;
_local4 = 0;
while (_local4 < _local2.accountVarList.length) {
_local3 = _local2.accountVarList[_local4];
if (_local2.isSet(_local2.otherVariables[_local3])) {
_local2[_local3] = _local2.otherVariables[_local3];
}
_local4++;
}
_local4 = 0;
while (_local4 < _local2.accountConfigList.length) {
_local3 = _local2.accountConfigList[_local4];
if (_local2.isSet(_local2.otherVariables[_local3])) {
_local2[_local3] = _local2.otherVariables[_local3];
}
_local4++;
}
}
if (_local2.isSet(variableOverrides)) {
_local7 = new Object();
_local2.variableOverridesBuild(_local7);
_local2.variableOverridesApply(variableOverrides);
}
if (_local2.isSet(_local2.usePlugins) && (_local2.isSet(_local2.doPlugins))) {
_local2.doPlugins(_local2);
}
if (_local2.isSet(_local2.account)) {
if (!_local2.isSet(_local2.pageURL)) {
_local2.pageURL = _local2.getMovieURL();
}
if ((!_local2.isSet(_local2.referrer)) && (!_local2.isSet(_local2._1_referrer))) {
_local2.referrer = _local2.getMovieReferrer();
_local2._1_referrer = 1;
}
_local6 = _local6 + _local2.queryStringAccountVariables();
_local6 = _local6 + _local2.queryStringLinkTracking();
_local6 = _local6 + _local2.queryStringClickMap();
_local6 = _local6 + _local2.queryStringTechnology();
_local2.makeRequest(_local11, _local6, "", bufferedRequestID);
}
if (_local2.isSet(variableOverrides)) {
_local2.variableOverridesApply(_local7);
}
_local2.referrer = undefined;
_local2.pe = undefined;
_local2.pev1 = undefined;
_local2.pev2 = undefined;
_local2.pev3 = undefined;
_local2.linkObject = undefined;
_local2.linkURL = undefined;
_local2.linkName = undefined;
_local2.linkType = undefined;
_local2.objectID = undefined;
if (_local2.isSet(_local2.account)) {
if ((!_local2.isSet(bufferedRequestID)) && (!_local2.isSet(_local2.trackCalled))) {
_local2.trackCalled = true;
_local2.flushBufferedRequests();
}
}
}
function _trackLink(linkObject, linkType, linkName, variableOverrides) {
var _local2 = this;
var _local4;
if (_local2.isSet(linkObject) && (typeof(linkObject) == "string")) {
_local4 = linkObject;
linkObject = new Object();
linkObject.url = _local4;
}
_local2.linkObject = linkObject;
_local2.linkType = linkType;
_local2.linkName = linkName;
_local2.track(variableOverrides);
}
function set moduleMediaVariables(moduleMediaVariables) {
_moduleMediaVariables = moduleMediaVariables;
modulesUpdate();
//return(this.moduleMediaVariables);
}
function get moduleMediaVariables() {
return(_moduleMediaVariables);
}
function modulesInit() {
var _local2 = this;
_local2.ClickMap = new com.omniture.AS2.ActionSource_Module_ClickMap(_local2);
_local2.Media = new com.omniture.AS2.ActionSource_Module_Media(_local2);
_local2.modulesUpdate();
}
function modulesUpdate() {
var _local2 = this;
var _local3;
if (_local2.isSet(_local2.Media)) {
if (_local2.isSet(_local2._moduleMediaVariables)) {
for (_local3 in _local2._moduleMediaVariables) {
if (_local2.isSet(_local2._moduleMediaVariables[_local3])) {
if (_local3 == "autoTrack") {
if (("" + _local2._moduleMediaVariables[_local3]).toLowerCase() == "true") {
_local2._moduleMediaVariables[_local3] = true;
} else {
_local2._moduleMediaVariables[_local3] = false;
}
}
_local2.Media[_local3] = _local2._moduleMediaVariables[_local3];
}
}
}
_local2.Media.autoTrack = _local2.Media.autoTrack;
}
}
var flashASVersion = 1.9;
var flashLivePreview = false;
var trackLocal = true;
var debugTracking = false;
var _trackOnLoad = false;
var onLoadTracked = false;
var trackCalled = false;
}
Symbol 271 MovieClip [__Packages.com.omniture.AS2.ActionSource_Module_ClickMap] Frame 0
class com.omniture.AS2.ActionSource_Module_ClickMap extends MovieClip
{
var s;
function ActionSource_Module_ClickMap (s) {
super();
var _local3 = this;
_local3.s = s;
_local3.clickMovie = s.movie.createEmptyMovieClip("s_ClickMap", 100);
_local3.clickMovie.m = _local3;
_local3.clickMovie.onMouseDown = function () {
var _local2 = this.m;
var _local3 = _local2.getHitTarget(_local2.s.movie);
if (_local2.s.isSet(_local3)) {
_local2.sendClickMapEvent(_local3);
}
};
}
function getHitTarget(tree) {
var _local4 = this;
var _local12 = _local4.s.movie._xmouse;
var _local13 = _local4.s.movie._ymouse;
for (var _local14 in tree) {
var _local3 = tree[_local14];
if (_local3._parent != tree) {
continue;
}
var _local8 = false;
var _local7 = _local3._x;
var _local5 = _local3._y;
var _local11 = _local3._width;
var _local10 = _local3._height;
if ((_local12 > _local7) && (_local12 < (_local7 + _local11))) {
if ((_local13 > _local5) && (_local13 < (_local5 + _local10))) {
_local8 = true;
}
}
if (((typeof(_local3) == "movieclip") || (_local3 instanceof MovieClip)) && (_local3.hitTest(_local4.s.movie._xmouse, _local4.s.movie._ymouse, true))) {
var _local6 = _local4.getHitTarget(_local3);
return(((_local6 != null) ? (_local6) : (_local3)));
}
if ((_local3 instanceof Button) && (!_local4.s.isSet(_local3.s_ClickMapSetup))) {
_local3.s_ClickMapSetup = true;
_local3.s_ClickMapOnPress = _local3.onPress;
_local3.onPress = function () {
_root.s_s.ClickMap.sendClickMapEvent(this);
if ((!(this.s_ClickMapOnPress === undefined)) && (!(this.s_ClickMapOnPress === null))) {
this.s_ClickMapOnPress();
}
};
} else if ((typeof(_local3) == "object") && (_local8 == true)) {
var _local6 = _local4.getHitTarget(_local3);
return(((_local6 != null) ? (_local6) : (_local3)));
}
}
return(null);
}
function getIndex() {
var _local2 = this;
var _local3;
if (_local2.s.isSet(_local2.s.movie)) {
_local3 = ((Stage.width + ",") + Stage.height) + _local2.indexChildren(_local2.s.movie);
return(_local3);
}
return("");
}
function indexChildren(node) {
var _local3 = this;
var _local5 = "";
var _local4;
var _local2;
var _local8 = node + ".";
var _local7;
for (_local4 in node) {
_local2 = node[_local4];
if ((_local3.s.isSet(_local2) && (_local3.s.isSet(_local2._name))) && (_local2._name == _local4)) {
_local7 = _local2 + "";
if (_local7 == (_local8 + _local4)) {
_local5 = _local5 + ("|" + _local3.getDOMID(_local2));
_local5 = _local5 + _local3.indexChildren(_local2);
}
}
}
return(_local5);
}
function nodePos(node) {
var _local1 = new Object();
_local1.x = node._x;
_local1.y = node._y;
return(_local1);
}
function nodeShift(node, x, y) {
node._x = x;
node._y = y;
}
function parentGetBounds(node) {
return(node._parent.getBounds());
}
function parentLocalToGlobal(node, p) {
node.parent.localToGlobal(p);
}
function getFullPath(node) {
var _local1 = "" + node;
var _local2 = _local1.substr(_local1.length - 4, 4);
if ((_local2 == ".frs") || (_local2 == ".fds")) {
_local1 = _local1.substr(0, _local1.length - 4);
}
return(_local1);
}
function getGeom(node) {
var _local2 = this;
var _local7 = new Object();
var _local3;
var _local6;
var _local5;
var _local9;
var _local8;
_local5 = _local2.parentGetBounds(node);
_local3 = _local2.nodePos(node);
_local6 = _local2.nodePos(node);
_local2.nodeShift(node, _local5.xMin, _local5.yMin);
_local9 = _local2.parentGetBounds(node);
_local2.nodeShift(node, _local5.xMax, _local5.yMax);
_local8 = _local2.parentGetBounds(node);
_local2.nodeShift(node, _local3.x, _local3.y);
_local3.x = _local3.x + (_local9.xMin - _local5.xMin);
_local3.y = _local3.y + (_local9.yMin - _local5.yMin);
_local6.x = _local6.x + (_local8.xMax - _local5.xMax);
_local6.y = _local6.y + (_local8.yMax - _local5.yMax);
_local2.parentLocalToGlobal(node, _local3);
_local2.parentLocalToGlobal(node, _local6);
_local7.x = Math.round(_local3.x);
_local7.y = Math.round(_local3.y);
_local7.w = Math.ceil(_local6.x - _local3.x);
_local7.h = Math.ceil(_local6.y - _local3.y);
return(_local7);
}
function getDOMID(node) {
var _local3 = this;
var _local2;
if (_local3.s.isSet(node)) {
_local2 = _local3.getGeom(node);
return((((((((_local3.getFullPath(node) + ",") + _local2.x) + ",") + _local2.y) + ",") + _local2.w) + ",") + _local2.h);
}
return("");
}
function getObjectID(node) {
var _local3 = this;
var _local4 = _local3.getMovieID();
var _local2 = "";
_local2 = _local3.getFullPath(node);
if (_local3.s.isSet(_local2)) {
_local2 = ((_local3.s.isSet(_local4) ? (_local4) : "") + ":") + _local2;
}
return(_local2);
}
function sendClickMapEvent(node) {
var _local2 = this;
var _local5 = _local2.s.getMovieURL();
var _local6 = _local2.getMovieID();
if (_local2.s.isSet(_local2.s.trackClickMap)) {
_local2.s.objectID = _local2.getObjectID(node);
}
if (_local2.s.autoTrack) {
var _local3 = _local5;
var _local4;
_local4 = _local3.indexOf("?");
if (_local4 >= 0) {
_local3 = _local3.substr(0, _local4);
}
if (_local3.length > 77) {
_local3 = _local3.substr(-77);
}
_local2.s.trackLink(_local5, "o", "ActionSource.AutoTrack:" + _local3);
}
}
function getMovieID() {
var _local6 = this;
var _local5 = _local6.getSWFURL();
var _local4 = s.movieID;
if ((!_local6.s.isSet(_local4)) && (_local6.s.isSet(_local5))) {
var _local3 = _local5.lastIndexOf("/");
var _local2 = _local5.lastIndexOf(".");
if (_local3 >= 0) {
_local3++;
} else {
_local3 = 0;
}
if (_local2 >= 0) {
_local2 = _local2 - _local3;
} else {
_local2 = _local5.length;
}
_local4 = _local5.substr(_local3, _local2);
}
if (!_local6.s.isSet(_local4)) {
_local4 = "movieID undefined";
}
return(_local4);
}
function getDOMIndex() {
var _local2 = this;
return(_local2.getIndex());
}
function getTrackClickMap() {
var _local2 = this;
return(_local2.s.trackClickMap.toString());
}
function getAccount() {
var _local2 = this;
return(_local2.s.account);
}
function getPageName() {
var _local2 = this;
return(_local2.s.pageName);
}
function getPageURL() {
var _local2 = this;
return(_local2.s.pageURL);
}
function getCharSet() {
var _local2 = this;
return(_local2.s.charSet);
}
function getSWFURL() {
var _local2 = this;
if (_local2.s.isSet(s.movie)) {
if (_local2.s.isSet(_local2.s.movie.loaderInfo) && (_local2.s.isSet(_local2.s.movie.loaderInfo.loaderURL))) {
return(_local2.s.movie.loaderInfo.loaderURL);
}
if (_local2.s.isSet(_local2.s.movie._url)) {
return(_local2.s.movie._url);
}
}
return("");
}
function getVersion() {
var _local2 = this;
return(_local2.s.version);
}
}
Symbol 272 MovieClip [__Packages.com.omniture.AS2.ActionSource_Module_Media] Frame 0
class com.omniture.AS2.ActionSource_Module_Media
{
var _autoTrack, autoTrackDone, s, listenerFLVPlayback, listenerMedia;
function ActionSource_Module_Media (s) {
var _local2 = this;
_local2.s = s;
_local2.monitorList = null;
}
function open(name, length, playerName, player) {
_open(name, length, playerName, player);
}
function startMonitor(monitor) {
var m = this;
var _local2;
var _local4 = 0;
if (m.s.isSet(m.monitorList)) {
_local4 = -1;
_local2 = 0;
while (_local2 < m.monitorList.length) {
if (m.s.isSet(m.monitorList[_local2])) {
if (((m.s.isSet(m.monitorList[_local2].node) && (m.s.isSet(monitor))) && (m.s.isSet(monitor.node))) && (m.monitorList[_local2].node == monitor.node)) {
return(undefined);
}
} else if (_local4 < 0) {
_local4 = _local2;
}
_local2++;
}
if (_local4 < 0) {
_local4 = m.monitorList.length;
}
} else {
m.monitorList = new Array();
}
monitor.update = function () {
if ((((((this.m == null) || (this.m == undefined)) || (this.m.s == null)) || (this.m.s == undefined)) || (this.node == null)) || (this.node == undefined)) {
clearInterval(this.interval);
this.m.monitorList[this.num] = null;
} else {
this.watch();
}
};
monitor.interval = setInterval(monitor, "update", 5000);
monitor.num = _local4;
m.monitorList[monitor.num] = monitor;
}
function set autoTrack(autoTrack) {
_autoTrack = autoTrack;
if ((_autoTrack && (!autoTrackDone)) && (s.isSet(s.movie))) {
autoTrackDone = true;
attach(s.movie);
}
//return(this.autoTrack);
}
function get autoTrack() {
return(_autoTrack);
}
function cleanName(name) {
var _local2 = this;
return(_local2.s.replace(_local2.s.replace(_local2.s.replace(name, newline, ""), "\r", ""), "--**--", ""));
}
function _open(name, length, playerName, player) {
var _local2 = this;
var _local4 = new Object();
var _local8 = new Date();
var _local5 = "";
var _local3;
name = _local2.cleanName(name);
length = Math.floor(length);
if (!_local2.s.isSet(length)) {
length = 1;
}
if ((_local2.s.isSet(name) && (_local2.s.isSet(length))) && (_local2.s.isSet(playerName))) {
if (!_local2.s.isSet(_local2.list)) {
_local2.list = new Object();
}
if (_local2.s.isSet(_local2.list[name])) {
_local2.close(name);
}
if (_local2.s.isSet(player)) {
_local5 = "" + player;
}
for (_local3 in _local2.list) {
if (_local2.s.isSet(_local2.list[_local3]) && (_local2.list[_local3].playerID == _local5)) {
_local2.close(_local2.list[_local3].name);
}
}
_local4.name = name;
_local4.length = length;
_local4.playerName = _local2.cleanName((_local2.s.isSet(_local2.playerName) ? (_local2.playerName) : (playerName)));
_local4.playerID = _local5;
_local4.timePlayed = 0;
_local4.timestamp = Math.floor(_local8.getTime() / 1000);
_local4.lastEventType = 0;
_local4.lastEventTimestamp = _local4.timestamp;
_local4.lastEventOffset = 0;
_local4.session = "";
_local4.eventList = new Object();
_local2.list[name] = _local4;
}
}
function close(name) {
event(name, 0, -1);
}
function play(name, offset) {
var _local2 = this;
var _local5;
var _local3;
_local2.event(name, 1, offset);
_local3 = new Object();
_local3.m = _local2;
_local3.node = _local2.cleanName(name);
_local3.watch = function () {
var _local2 = this.m;
var _local3 = this.node;
var _local4;
_local4 = (((_local2.s.isSet(_local3) && (_local2.s.isSet(_local2.list))) && (_local2.s.isSet(_local2.list[_local3]))) ? (_local2.list[_local3]) : null);
if (_local2.s.isSet(_local4)) {
if (_local4.lastEventType == 1) {
_local2.event(_local4.name, 3, -1);
}
} else {
this.node = null;
}
};
_local2.startMonitor(_local3);
}
function stop(name, offset) {
event(name, 2, offset);
}
function event(name, eventType, offset) {
var _local3 = this;
var _local2;
var _local9 = new Date();
var _local8 = Math.floor(_local9.getTime() / 1000);
var _local7 = "--**--";
name = _local3.cleanName(name);
_local2 = (((_local3.s.isSet(name) && (_local3.s.isSet(_local3.list))) && (_local3.s.isSet(_local3.list[name]))) ? (_local3.list[name]) : null);
if (_local3.s.isSet(_local2)) {
if ((eventType == 3) || ((eventType != _local2.lastEventType) && ((eventType != 2) || (_local2.lastEventType == 1)))) {
if (_local3.s.isSet(eventType)) {
if ((offset < 0) && (_local2.lastEventTimestamp > 0)) {
offset = (_local8 - _local2.lastEventTimestamp) + _local2.lastEventOffset;
offset = ((offset < _local2.length) ? (offset) : (_local2.length - 1));
}
offset = Math.floor(offset);
if (((eventType == 2) || (eventType == 3)) && (_local2.lastEventOffset < offset)) {
_local2.timePlayed = _local2.timePlayed + (offset - _local2.lastEventOffset);
}
if (eventType != 3) {
_local2.session = _local2.session + (((eventType == 1) ? "S" : "E") + offset);
_local2.lastEventType = eventType;
} else if (_local2.lastEventType != 1) {
_local3.event(name, 1, offset);
}
_local2.lastEventTimestamp = _local8;
_local2.lastEventOffset = offset;
_local3.s.pe = "media";
_local3.s.pev3 = ((((((((((("" + escape(_local2.name)) + _local7) + _local2.length) + _local7) + escape(_local2.playerName)) + _local7) + _local2.timePlayed) + _local7) + _local2.timestamp) + _local7) + _local2.session) + ((eventType == 3) ? ("E" + offset) : "");
_local3.s.track(null, "Media." + name);
} else {
_local3.event(name, 2, -1);
_local3.list[name] = 0;
_local3.s.flushBufferedRequest(_local3.s.account, "Media." + name);
}
}
}
}
function autoEvent(name, length, playerName, eventType, offset, player) {
var _local2 = this;
name = _local2.cleanName(name);
if ((_local2.s.isSet(name) && (_local2.s.isSet(length))) && (_local2.s.isSet(playerName))) {
if ((!_local2.s.isSet(_local2.list)) || (!_local2.s.isSet(_local2.list[name]))) {
_local2.open(name, length, playerName, player);
}
_local2.event(name, eventType, offset);
}
}
function attach(node) {
var m = this;
var _local2;
var _local3;
var _local4;
if (m.s.isSet(node)) {
if (m.s.isSet(node, "addEventListener") && (m.s.isSet(node, "isFLVCuePointEnabled"))) {
if (!m.s.isSet(m.listenerFLVPlayback)) {
m.listenerFLVPlayback = new Object();
m.listenerFLVPlayback.m = m;
m.listenerFLVPlayback.playerName = "Flash FLVPlayback";
m.listenerFLVPlayback.handleEvent = function (player, eventType) {
var _local2 = this.m;
var _local4;
var _local5;
var _local6;
if (_local2.s.isSet(_local2.autoTrack) && (_local2.s.isSet(player))) {
if (_local2.s.flashASVersion > 2) {
_local4 = player.source;
} else {
_local4 = player.contentPath;
}
_local5 = player.totalTime;
_local6 = player.playheadTime;
_local2.autoEvent(_local4, _local5, this.playerName, eventType, _local6, player);
}
};
m.listenerFLVPlayback.stateChange = function (event) {
var _local4 = this.m;
var _local3 = -1;
var _local2;
if (_local4.s.isSet(event) && (_local4.s.isSet(event.target))) {
_local2 = event.target;
if (_local4.s.isSet(_local2, "state")) {
if (_local2.state == "playing") {
_local3 = 1;
} else if (((((_local2.state == "stopped") || (_local2.state == "paused")) || (_local2.state == "buffering")) || (_local2.state == "rewinding")) || (_local2.state == "seeking")) {
_local3 = 2;
}
if (_local3 >= 0) {
this.handleEvent(event.target, _local3);
}
}
}
};
m.listenerFLVPlayback.complete = function (event) {
if (this.m.s.isSet(event)) {
this.handleEvent(event.target, 0);
}
};
}
if (m.s.flashASVersion > 2) {
node.addEventListener("complete", m.listenerFLVPlayback_complete);
node.addEventListener("stateChange", m.listenerFLVPlayback_stateChange);
} else {
node.addEventListener("complete", m.listenerFLVPlayback);
node.addEventListener("stateChange", m.listenerFLVPlayback);
}
_local4 = new Object();
_local4.m = m;
_local4.node = node;
_local4.watch = function () {
var _local3 = this.m;
var _local2 = this.node;
if (_local3.s.isSet(_local2.state) && (_local2.state == "playing")) {
this.m.listenerFLVPlayback.handleEvent(_local2, 3);
}
};
m.startMonitor(_local4);
} else if (m.s.isSet(node, "addEventListener") && (m.s.isSet(node, "addCuePoint"))) {
if (!m.s.isSet(m.listenerMedia)) {
m.listenerMedia = new Object();
m.listenerMedia.m = m;
m.listenerMedia.playerName = "Flash Media";
m.listenerMedia.handleEvent = function (player, eventType) {
var _local2 = this.m;
var _local4;
var _local5;
var _local6;
if (_local2.s.isSet(_local2.autoTrack) && (_local2.s.isSet(player))) {
_local4 = player.contentPath;
_local5 = player.totalTime;
_local6 = player.playheadTime;
_local2.autoEvent(_local4, _local5, this.playerName, eventType, _local6, player);
}
};
m.listenerMedia.complete = function (event) {
if (this.m.s.isSet(event)) {
this.handleEvent(event.target, 0);
}
};
m.listenerMedia.click = function (event) {
if (this.m.s.isSet(event) && (this.m.s.isSet(event.target))) {
this.handleEvent(event.target, (this.m.s.isSet(event.target.playing) ? 1 : 2));
}
};
m.listenerMedia.change = function (event) {
if (this.m.s.isSet(event) && (this.m.s.isSet(event.target))) {
this.handleEvent(event.target, (this.m.s.isSet(event.target.playing) ? 1 : 2));
}
};
m.listenerMedia.scrubbing = function (event) {
if (this.m.s.isSet(event)) {
this.handleEvent(event.target, 2);
}
};
}
if (m.s.flashASVersion > 2) {
node.addEventListener("complete", m.listenerMedia_complete);
node.addEventListener("click", m.listenerMedia_click);
node.addEventListener("change", m.listenerMedia_change);
node.addEventListener("scrubbing", m.listenerMedia_scrubbing);
} else {
node.addEventListener("complete", m.listenerMedia);
node.addEventListener("click", m.listenerMedia);
node.addEventListener("change", m.listenerMedia);
node.addEventListener("scrubbing", m.listenerMedia);
}
_local4 = new Object();
_local4.m = m;
_local4.node = node;
_local4.watch = function () {
var _local3 = this.m;
var _local2 = this.node;
if (_local3.s.isSet(_local2.playing)) {
this.m.listenerMedia.handleEvent(_local2, 3);
}
};
m.startMonitor(_local4);
} else if (m.s.flashASVersion > 2) {
if (m.s.isSet(node, "numChildren") && (m.s.isSet(node, "getChildAt"))) {
_local3 = 0;
while (_local3 < node.numChildren) {
m.attach(node.getChildAt(_local3));
_local3++;
}
}
} else {
for (_local2 in node) {
if (((m.s.isSet(node[_local2]) && (m.s.isSet(node[_local2]._name))) && (node[_local2]._name == _local2)) && (((("" + node) + ".") + _local2) == ("" + node[_local2]))) {
m.attach(node[_local2]);
}
}
}
}
}
function listenerFLVPlayback_complete(event) {
listenerFLVPlayback.complete(event);
}
function listenerFLVPlayback_stateChange(event) {
listenerFLVPlayback.stateChange(event);
}
function listenerMedia_complete(event) {
listenerMedia.complete(event);
}
function listenerMedia_click(event) {
listenerMedia.click(event);
}
function listenerMedia_change(event) {
listenerMedia.change(event);
}
function listenerMedia_scrubbing(event) {
listenerMedia.scrubbing(event);
}
}
Symbol 268 MovieClip [__Packages.com.omniture.AS2.ActionSource] Frame 0
class com.omniture.AS2.ActionSource extends com.omniture.AS2.FPL.ActionSource
{
function ActionSource () {
super();
}
function callJavaScript(script) {
var _local2 = this;
if ((_local2.isSet(flash.external.ExternalInterface) && (_local2.isSet(flash.external.ExternalInterface.available))) && (_local2.isSet(flash.external.ExternalInterface.call))) {
return(flash.external.ExternalInterface.call(script));
}
return(null);
}
var flashASVersion = 2;
}
Symbol 322 Button
on (release) {
_root.nextFrame();
}
Symbol 332 Button
on (release) {
_root.gotoAndPlay("game");
}
Symbol 355 Button
on (release) {
_root.playAgain();
}
Symbol 669 MovieClip Frame 33
stop();
Symbol 672 MovieClip Frame 1
goRZ_btn.onRelease = function () {
_root.endPlateClick();
};
Symbol 677 MovieClip Frame 1
stop();
Symbol 681 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 11
if (_root.chickReadyToThrow) {
_root.throwBot();
}
Symbol 753 MovieClip Frame 16
if (_root.useChick == 2) {
_root.chick.gotoAndStop(2);
}
if (_root.useChick == 3) {
_root.chick.gotoAndStop(3);
}
Symbol 778 MovieClip Frame 5
if (_root.chickReadyToThrow) {
_root.throwBot();
}
Symbol 778 MovieClip Frame 8
if (_root.useChick == 1) {
_root.chick.gotoAndStop(1);
} else if (_root.useChick == 3) {
_root.chick.gotoAndStop(3);
}
Symbol 789 MovieClip Frame 3
if (_root.chickReadyToThrow) {
_root.throwBot();
}
Symbol 789 MovieClip Frame 4
if (_root.useChick == 1) {
_root.chick.gotoAndStop(1);
} else if (_root.useChick == 2) {
_root.chick.gotoAndStop(2);
}
Symbol 791 MovieClip Frame 2
stop();
Symbol 793 MovieClip Frame 1
stop();
Symbol 793 MovieClip Frame 48
stop();
Symbol 797 MovieClip Frame 41
_root.startSpinning();
Symbol 797 MovieClip Frame 42
stop();
Symbol 802 MovieClip Frame 7
gotoAndPlay ("repeat");