Frame 1
stop();
Stage.scaleMode = "noScale";
_quality = "MEDIUM";
_global.buttonLock = false;
if (url == undefined) {
_global.HighScoreXML = "../../drift/scores.php?action=g";
_global.sendToFriendURL = "../../drift/sendtoafriend.php";
_global.sendScore = "../../drift/scores.php";
_global.AMGcarLink = "http://www.mercedes-amg.com";
_global.MercedesAMGsite = "http://www.mercedes-amg.com";
} else {
_global.HighScoreXML = url + _root.highScoreXML;
_global.sendToFriendURL = url + _root.sendToFriendURL;
_global.sendScore = url + _root.sendScore;
_global.AMGcarLink = _root.AMGcarLink;
_global.MercedesAMGsite = _root.MercedesAMGsite;
}
changeSec = function (whatSec) {
if ((_global.currSec == "intro") && (_global.buttonLock != true)) {
_global.buttonLock = true;
_global.nextSec = whatSec;
intro.introCopy.gotoAndPlay("out");
} else if ((whatSec != _global.currSec) && (_global.buttonLock != true)) {
_global.buttonLock = true;
_global.nextSec = whatSec;
this[_global.currSec].gotoAndPlay("out");
}
};
var ExpressInstall = function () {
this.needsUpdate = ((_root.MMplayerType == undefined) ? false : true);
};
ExpressInstall.prototype = {init:function () {
if (this.needsUpdate) {
this.loadUpdater();
return(true);
}
return(false);
}, loadUpdater:function () {
System.security.allowDomain("fpdownload.macromedia.com");
this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
var _self = this;
this.updater.installStatus = _self.onInstallStatus;
this.hold = this.updater.createEmptyMovieClip("hold", 1);
this.updater.onEnterFrame = function () {
if (typeof(this.hold.startUpdate) == "function") {
_self.initUpdater();
this.onEnterFrame = null;
}
};
var _local3 = Math.random();
this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + _local3);
}, initUpdater:function () {
this.hold.redirectURL = _root.MMredirectURL;
this.hold.MMplayerType = _root.MMplayerType;
this.hold.MMdoctitle = _root.MMdoctitle;
this.hold.startUpdate();
}, onInstallStatus:function (msg) {
if (msg == "Download.Complete") {
} else if (msg == "Download.Cancelled") {
getURL ("javascript:alert('This content requires a more recent version of the Macromedia Flash Player.')");
} else if (msg == "Download.Failed") {
getURL ("javascript:alert('There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.')");
}
}};
var ExpressInstall = new ExpressInstall();
if (ExpressInstall.needsUpdate) {
var upgradeMsg = attachMovie("upgradeMsg_src", "upgradeMsg", 1);
upgradeMsg._x = Stage.width / 2;
upgradeMsg._y = Stage.height / 2;
upgradeMsg.upgradeBtn.onRelease = function () {
ExpressInstall.init();
};
stop();
}
Frame 3
function parseXML(success) {
if (success) {
_ob.score = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(_xml, "//score/text()");
var _local3 = _ob.score.toString();
var _local2 = _local3.split(",");
_global.lowScore = _local2[_local2.length - 1];
} else {
trace("Can't load XML");
}
}
function init() {
_xml.onLoad = mx.utils.Delegate.create(this, parseXML);
_xml.load(_global.HighScoreXML);
}
var _xml = new XML();
var _ob = new Object();
init();
stop();
Frame 17
stop();
Frame 32
stop();
Frame 47
stop();
Instance of Symbol 378 MovieClip "highscores" in Frame 47
/* no clip actions */
Frame 62
_global.currSec = "game";
_global.buttonLock = false;
_global.globalSound = new Sound();
globalSound.setVolume(60);
_root.createEmptyMovieClip("engineIdle", 100);
sfxIdle = new Sound(engineIdle);
sfxIdle.attachSound("idle");
sfxIdle.setVolume(40);
_root.createEmptyMovieClip("engineAccel", 101);
sfxAccel = new Sound(engineAccel);
sfxAccel.attachSound("startup");
sfxAccel.setVolume(60);
_root.createEmptyMovieClip("engineLoop", 102);
sfxLoop = new Sound(engineLoop);
sfxLoop.attachSound("drive");
sfxLoop.setVolume(50);
_root.createEmptyMovieClip("engineSlow", 103);
sfxSlow = new Sound(engineSlow);
sfxSlow.attachSound("slow");
sfxSlow.setVolume(50);
_root.createEmptyMovieClip("skid2", 104);
sfxSkid2 = new Sound(skid2);
sfxSkid2.attachSound("skid");
sfxSkid2.setVolume(40);
_root.createEmptyMovieClip("crash", 105);
sfxCrash = new Sound(crash);
sfxCrash.attachSound("crash");
sfxCrash.setVolume(10);
function getQuadrantPieces(array, piece) {
var _local1 = track["q" + piece];
for (i in track.perimeter) {
if (track.perimeter[i].hitTest(_local1)) {
array.push(track.perimeter[i]);
}
}
}
stop();
scoreboard.score.text = "0'0";
var track_x = -160;
var track_y = -1600;
track._x = track_x;
track._y = track_y;
_global.q0 = [];
_global.q1 = [];
_global.q2 = [];
_global.q3 = [];
_global.q4 = [];
_global.q5 = [];
_global.q6 = [];
_global.q7 = [];
_global.q8 = [];
getQuadrantPieces(_global.q0, 0);
getQuadrantPieces(_global.q1, 1);
getQuadrantPieces(_global.q2, 2);
getQuadrantPieces(_global.q3, 3);
getQuadrantPieces(_global.q4, 4);
getQuadrantPieces(_global.q5, 5);
getQuadrantPieces(_global.q6, 6);
getQuadrantPieces(_global.q7, 7);
getQuadrantPieces(_global.q8, 8);
Frame 63
function radar() {
var _local1 = scoreboard.radar.dot;
_local1._x = ((-(track_x - 328)) / 2200) * radarWidth;
_local1._y = ((-(track_y - 306)) / 2200) * radarWidth;
}
function setSkidPos() {
i = 0;
while (i < displaywheels) {
wheelsPos[i] = getPos(car["w" + i]);
lastPos[i] = {x:wheelsPos[i].x - track_x, y:wheelsPos[i].y - track_y};
i++;
}
}
function getPos(clip) {
var _local1 = {x:0, y:0};
clip.localToGlobal(_local1);
return(_local1);
}
function skid() {
var _local1 = skidLayer.attachMovie("skidmark", "skidleft" + skids, skids);
i = 0;
while (i < displaywheels) {
wheelsPos[i] = getPos(car["w" + i]);
_local1.lineStyle(3, 14739949, 100);
_local1.moveTo(lastPos[i].x, lastPos[i].y);
_local1.lineTo(wheelsPos[i].x - track_x, wheelsPos[i].y - track_y);
lastPos[i].x = wheelsPos[i].x - track_x;
lastPos[i].y = wheelsPos[i].y - track_y;
skids++;
i++;
}
return(true);
}
function adjust(v, threshold, maximum) {
dx = 0;
if (v < 2) {
dx = 0;
} else if (v <= threshold) {
dx = v / threshold;
} else {
dx = 1;
}
return(dx);
}
function sign(val) {
if (val < 0) {
return(-1);
}
if (val > 0) {
return(1);
}
return(0);
}
function updateScore(num) {
num = (num / driftMaxHeight) * driftScale;
driftsTotalScore = driftsTotalScore + num;
var _local1 = convertScore(driftsTotalScore);
scoreboard.score.text = ((_local1.feet + "'") + _local1.inches) + "\"";
}
function convertScore(metric) {
var _local1 = Math.floor(metric);
var _local2 = Math.floor((metric - _local1) * 12);
return({feet:_local1, inches:_local2});
}
function getHeight(val) {
return(0.85 * realSpeed);
}
function soundControls() {
if ((realSpeed < 8) && (soundState == "accelerate")) {
if (!playingSfxAccel) {
playingSfxAccel = true;
playinfSfxIdle = false;
playingSfxLoop = false;
sfxLoop.stop();
sfxIdle.stop();
sfxSlow.stop();
sfxAccel.start(0, 1);
}
} else if ((realSpeed >= 8) && (soundState == "accelerate")) {
if (!playingSfxLoop) {
sfxLoop.start(0, 999);
playingSfxLoop = true;
}
} else if ((realSpeed < 2) && (soundState == "decay")) {
if (!playinfSfxIdle) {
playinfSfxIdle = true;
playingSfxAccel = false;
playingSfxLoop = false;
playingSfxSlow = false;
sfxAccel.stop();
sfxLoop.stop();
sfxIdle.start(0, 999);
}
} else if ((realSpeed > 7) && (soundState == "decay")) {
if (!playingSfxSlow) {
playinfSfxIdle = false;
playingSfxAccel = false;
playingSfxLoop = false;
playingSfxSlow = true;
sfxAccel.stop();
sfxLoop.stop();
sfxSlow.start(0, 1);
}
}
engineVolume = (realSpeed / speedMax) * 80;
if (skidding && (isTurning)) {
if (!playingSkid) {
sfxSkid2.setVolume(engineVolume);
playingSkid = true;
sfxSkid2.start(0, 1);
}
} else if ((!skidding) || (!isTurning)) {
playingSkid = false;
sfxSkid2.stop();
}
currSpeed = realSpeed;
}
function crashSound() {
if ((sfxCrash.position == 0) || (sfxCrash.position == sfxCrash.duration)) {
sfxLoop.stop();
playingSfxLoop = false;
if (sfxAccel.position == sfxAccel.duration) {
playingSfxAccel = false;
}
sfxCrash.start(0, 1);
}
}
function collisions() {
fl = getPos(car.fl);
fr = getPos(car.fr);
rl = getPos(car.rl);
rr = getPos(car.rr);
ml = getPos(car.ml);
mr = getPos(car.mr);
hitDrift = null;
i = 0;
while (i < bigDrifts.length) {
if (((bigDrifts[i].hitTest(rl.x, rl.y, true) || (bigDrifts[i].hitTest(rr.x, rr.y, true))) || (bigDrifts[i].hitTest(fl.x, fl.y, true))) || (bigDrifts[i].hitTest(fr.x, fr.y, true))) {
hitDrift = i;
boardHit = i;
break;
}
i++;
}
var _local4 = track.driftBoards.hitTest(fl.x, fl.y, true);
var _local2 = track.driftBoards.hitTest(fr.x, fr.y, true);
var _local3 = track.driftBoards.hitTest(rl.x, rl.y, true);
var _local1 = track.driftBoards.hitTest(rr.x, rr.y, true);
if (hitDrift != null) {
if (((_local3 || (_local4)) || (_local1)) || (_local2)) {
hasCollided = true;
bounce(driftBoardNormals[hitDrift]);
}
} else {
normal = checkWheels();
if (normal != null) {
hasCollided = true;
bounce(normal);
}
}
if (hasCollided) {
crashSound();
}
if ((hitDrift != null) && (!hasCollided)) {
if (((realSpeed > speedSlide) && (isTurning)) && (isValid)) {
scoreboardSnow(driftHeight);
isScoring = true;
}
} else {
if (isScoring) {
clearDrift(boardHit);
isScoring = false;
}
hasCollided = false;
}
if (!hasCollided) {
vx = vx + (((Math.cos(angle) * speed) - vx) / traction);
vy = vy + (((Math.sin(angle) * speed) - vy) / traction);
}
}
function checkWheels() {
if (car.hitTest(track.q0)) {
array = _global.q0;
} else if (car.hitTest(track.q1)) {
array = _global.q1;
} else if (car.hitTest(track.q2)) {
array = _global.q2;
} else if (car.hitTest(track.q3)) {
array = _global.q3;
} else if (car.hitTest(track.q4)) {
array = _global.q4;
} else if (car.hitTest(track.q5)) {
array = _global.q5;
} else if (car.hitTest(track.q6)) {
array = _global.q6;
} else if (car.hitTest(track.q7)) {
array = _global.q7;
} else if (car.hitTest(track.q8)) {
array = _global.q8;
}
for (i in array) {
if (array[i].hitTest(fl.x + vx, fl.y + vy, true)) {
return((array[i]._rotation + 90) * DEG2RAD);
}
if (array[i].hitTest(fr.x + vx, fr.y + vy, true)) {
return((array[i]._rotation + 90) * DEG2RAD);
}
if (array[i].hitTest(ml.x + vx, ml.y + vy, true)) {
return((array[i]._rotation + 90) * DEG2RAD);
}
if (array[i].hitTest(mr.x + vx, mr.y + vy, true)) {
return((array[i]._rotation + 90) * DEG2RAD);
}
if (array[i].hitTest(rl.x + vx, rl.y + vy, true)) {
return((array[i]._rotation + 90) * DEG2RAD);
}
if (array[i].hitTest(rr.x + vx, rr.y + vy, true)) {
return((array[i]._rotation + 90) * DEG2RAD);
}
}
return(null);
}
function bounce(bounceAngle) {
bounceAmount = realSpeed + 1;
track_x = track_x - (bounceAmount * Math.cos(bounceAngle));
track_y = track_y - (bounceAmount * Math.sin(bounceAngle));
speed = speed * bounceBack;
traction = tractionMin;
}
function moveLayers(x, y) {
track._x = x;
track._y = y;
skidLayer._x = x;
skidLayer._y = y;
driftLayer._x = x;
driftLayer._y = y;
}
function snow(dir) {
var _local2 = driftLayer.attachMovie("drift", "drift" + driftDepth, driftDepth);
driftDepth++;
driftDepth = driftDepth % driftDepthMax;
if (dir == "left") {
var _local4 = getPos(car.sm);
snowAngle = (car._rotation * DEG2RAD) - (Math.PI/2);
speedSnow = 1 * realSpeed;
} else if (dir == "right") {
var _local4 = getPos(car.sm);
snowAngle = (car._rotation * DEG2RAD) + (Math.PI/2);
speedSnow = 1 * realSpeed;
} else {
var _local4 = getPos(car.sm);
snowAngle = car._rotation * DEG2RAD;
speedSnow = 0.2 * realSpeed;
}
_local2._x = _local4.x - track_x;
_local2._y = _local4.y - track_y;
_local2._rotation = Math.floor(Math.random() * 180);
_local2.dx = speedSnow * Math.sin(snowAngle);
_local2.dy = speedSnow * Math.cos(snowAngle);
_local2.dz = realSpeed * 5;
_local2._z = 0;
_local2.onEnterFrame = function () {
this._alpha = this._alpha - snowFade;
this._y = this._y + this.dx;
this._x = this._x + this.dy;
this._z = this._z + this.dz;
this.dz = this.dz - snowGravity;
this._xscale = this._z * snowScale;
this._yscale = this._z * snowScale;
var _local2 = getPos(this);
if (track.driftBoards.hitTest(_local2.x, _local2.y, true)) {
isValid = true;
this.dx = this.dx * (-snowBounce);
this.dy = this.dy * (-snowBounce);
}
if (this._z <= 0) {
isValid = false;
this.removeMovieClip();
}
};
}
function scoreboardSnow(amount) {
driftHeight = driftHeight + getHeight(realSpeed);
driftHeight = Math.min(driftHeight, driftMaxHeight);
if (toggle) {
var _local3 = scoreboard.snow.attachMovie("ice", "drift" + snowDepth, snowDepth);
_local3._xscale = (Math.random() * 300) + 100;
_local3._yscale = (Math.random() * 300) + 100;
_local3._x = Math.random() * 100;
_local3._y = driftMaxHeight - driftHeight;
_local3._rotation = Math.floor(Math.random() * 2) * 180;
_root.scoreboard.driftLine._y = 128 - Math.floor(driftHeight);
snowDepth++;
snowDepth = snowDepth % 50;
_local3.fallRate = 0;
_local3.onEnterFrame = function () {
this._y = this._y + this.fallRate;
this.fallRate = this.fallRate + sideGravity;
if (this._y > 500) {
this.removeMovieClip();
}
};
}
}
function clearDrift(num) {
if (!hasCollided) {
if ((num != null) || (num != undefined)) {
driftScores[num] = "hit";
boardHit = null;
}
driftTotal.push(driftHeight);
updateScore(driftHeight);
} else {
_root.scoreboard.noscore.gotoAndPlay(2);
}
var _local3 = convertScore((driftHeight / driftMaxHeight) * driftScale);
_root.scoreboard.driftLine.lastHeight.text = ((_local3.feet + "' ") + _local3.inches) + "\"";
driftHeight = 0;
var driftRate = 0;
_root.scoreboard.driftLine.startTime = getTimer();
_root.scoreboard.driftLine.onEnterFrame = function () {
if (getTimer() > (this.startTime + driftLineHold)) {
this._y = this._y + driftRate;
driftRate = driftRate + driftLineGravity;
}
if (this._y >= driftLineBase) {
delete this.onEnterFrame;
_root.scoreboard.driftLine.lastHeight.text = "";
this._y = Math.floor(driftLineBase);
}
};
}
var HALFPI = (Math.PI/2);
var TWOPI = (Math.PI*2);
var DEG2RAD = (Math.PI/180);
var RAD2DEG = 57.2957795130823;
var PI2 = (Math.PI/2);
sfxMusic.setVolume(20);
var accel = 0.25;
var steer = 0.08;
var steer_normal = 0.08;
var steer_handbrake = 0.099;
var steer_threshold = 4;
var deccel = 0.92;
var handbrake = 0.95;
var handbrake_traction = 10;
var drift = 0.95;
var handbraking = false;
var seconds = 60;
var tractionMin = 2;
var tractionMax = 70;
var traction = tractionMin;
var tractionRate = 1.2;
var speed = 0;
var realSpeed = 0;
var speedMax = 15;
var speedSlide = 10;
var speedMin = -9;
var bounceBack = 0.4;
var vx = 0;
var vy = 0;
var dw = 0;
var isTurning = false;
var isColliding = false;
var snowGravity = 2.3;
var snowScale = 0.5;
var snowHeight = 6;
var snowFade = 2;
var snowBounce = 0.3;
var snowMaxHeight = 0;
var snowSpeedDecay = 1;
var sideGravity = 0.5;
var snowDepth = 0;
var track_x = -160;
var track_y = -1600;
var radarScale_x = 1;
var radarScale_y = 1;
var trackRange_x = (-(track._width - (radarScale_x * Stage.width)));
var trackRange_y = (-(track._height - (radarScale_y * Stage.height)));
var angle = 1.5609317684435;
var dir = null;
car._x = 327;
car._y = 300;
car._rotation = (angle * 180) / Math.PI;
var fl = getPos(car.fl);
var fr = getPos(car.fr);
var rl = getPos(car.rl);
var rr = getPos(car.rr);
var ml = getPos(car.ml);
var mr = getPos(car.mr);
var bigDrifts = [track.h0, track.h1, track.h2, track.h3, track.h4, track.h5, track.h6];
var hitDrift = null;
var radarWidth = 53;
var displaywheels = 4;
var wheelsPos = [];
var lastPos = [];
var skidding = false;
var turnskidding = false;
var skids = 1;
var toggle = true;
var isScoring = false;
var isValid = false;
var driftHeight = 0;
var driftMaxHeight = 275;
var driftsTotalScore = 0;
var driftScale = 12;
var driftTotal = [];
var driftLineBase = 142;
var driftLineGravity = 0.25;
var driftLineHold = 1000;
var driftBoardNormals = [7.38649197461464, 7.67916491858974, 8.37225761228001, 8.8353043875661, 3.33188265117261, 5.38473236301164, 3.77435035044936];
var driftDepth = 0;
var driftDepthMax = 10;
var driftScores = [null, null, null, null, null, null, null];
var boardHit = null;
var soundState = null;
i = 0;
while (i < displaywheels) {
wheelsPos[i] = getPos(car["w" + i]);
lastPos[i] = {x:wheelsPos[i].x - track_x, y:wheelsPos[i].y - track_y};
i++;
}
countDown = function () {
if (seconds >= 1) {
seconds--;
scoreboard.timer.text = seconds;
} else {
clearInterval(timer);
clearInterval(soundController);
clearInterval(radarController);
_root.gotoAndStop("gameover");
seconds = 60;
}
};
var playingSfxAccel = false;
var playingSfxLoop = false;
var playingSfxIdle = false;
var playingSfxSlow = false;
var currSpeed = 0;
soundController = setInterval(soundControls, 100);
radarController = setInterval(radar, 200);
timer = setInterval(countDown, 1000);
car.onEnterFrame = function () {
this._rotation = (angle * 180) / Math.PI;
realSpeed = Math.sqrt((vx * vx) + (vy * vy));
moveLayers(track_x, track_y);
if (Key.isDown(37)) {
isTurning = true;
dir = "left";
if (speed > speedSlide) {
traction = Math.min(tractionMax, traction * tractionRate);
this.gotoAndStop("left2");
} else {
traction = Math.max(tractionMin, traction / tractionRate);
this.gotoAndStop("left");
}
dw = ((-steer) * adjust(Math.abs(speed), steer_threshold)) * sign(speed);
angle = angle + dw;
} else if (Key.isDown(39)) {
isTurning = true;
dir = "right";
if (speed > speedSlide) {
traction = Math.min(tractionMax, traction * tractionRate);
this.gotoAndStop("right2");
} else {
traction = Math.max(tractionMin, traction / tractionRate);
this.gotoAndStop("right");
}
dw = (steer * adjust(Math.abs(speed), steer_threshold)) * sign(speed);
angle = angle + dw;
} else {
dir = null;
dw = 0;
if (isTurning) {
speed = realSpeed * sign(speed);
}
isTurning = false;
traction = Math.max(tractionMin, traction / tractionRate);
this.gotoAndStop("straight");
}
if ((!skidding) && (speed > speedSlide)) {
setSkidPos();
skidding = true;
} else if (speed < speedSlide) {
skidding = false;
}
if (skidding || (handbraking)) {
skid();
}
if (toggle && (realSpeed > speedSlide)) {
snow(dir);
}
if (Key.isDown(32)) {
speed = speed * handbrake;
traction = Math.min(tractionMax, traction * tractionRate);
handbraking = true;
soundState = "decay";
} else if (Key.isDown(38)) {
speed = Math.min(speed + accel, speedMax);
soundState = "accelerate";
playingSfxSlow = false;
} else if (Key.isDown(40)) {
speed = Math.max(speed - accel, speedMin);
soundState = "decay";
} else {
soundState = "decay";
speed = speed * drift;
traction = Math.max(tractionMin, traction / tractionRate);
handbraking = false;
}
if (Math.abs(speed) < (accel / 2)) {
speed = 0;
}
collisions();
track_x = track_x + vx;
track_y = track_y + vy;
vx = vx + (((Math.cos(angle) * speed) - vx) / traction);
vy = vy + (((Math.sin(angle) * speed) - vy) / traction);
toggle = !toggle;
scoreboard.speedo.speedHand._rotation = Math.max(-20, realSpeed * 14) - 100;
};
stop();
Frame 64
function nfmt(num, precision) {
multiplier = 1;
if (precision < 0) {
return(num);
}
m = 1;
while (m < (precision + 1)) {
multiplier = multiplier * 10;
m++;
}
num = Math.round(num * multiplier);
num = num / multiplier;
num = num.toString();
decimal = num.indexOf(".");
if (decimal == -1) {
if (precision == 0) {
num = num.toString();
} else {
num = num.toString() + ".";
}
m = 0;
while (m < precision) {
num = num + "0";
m++;
}
return(num);
}
before = num.substring(0, decimal);
after = num.substring(decimal + 1);
places = Math.abs(after.length - precision);
m = 0;
while (m < places) {
after = after + "0";
m++;
}
return((before + ".") + after);
}
stop();
var score = convertScore(driftsTotalScore);
boardsHit = 0;
i = 0;
while (i < driftScores.length) {
if (driftScores[i] != null) {
boardsHit++;
}
i++;
}
_global.gameoverBoards = boardsHit;
_global.gameoverSnowcast = ((score.feet + "' ") + score.inches) + "\"";
_global.gameoverTotal = nfmt((score.feet + (score.inches / 12)) * boardsHit, 3);
var driftBest = 0;
i = 0;
while (i < driftTotal.length) {
if (driftTotal[i] > driftBest) {
driftBest = driftTotal[i];
}
i++;
}
driftBest = (driftBest / driftMaxHeight) * driftScale;
var driftBestObject = convertScore(driftBest);
sfxLoop.stop();
sfxIdle.stop();
sfxMusic.setVolume(5);
Frame 71
clearInterval(timer);
clearInterval(soundController);
clearInterval(radarController);
sfxLoop.stop();
sfxIdle.stop();
Symbol 1 MovieClip [skidmark] Frame 71
this.removeMovieClip();
Symbol 8 MovieClip [RemotingDebugClasses] Frame 1
#initclip 67
Object.registerClass("RemotingDebugClasses", mx.remoting.DebugClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 60 MovieClip Frame 8
stop();
Instance of Symbol 52 MovieClip "checkLoadStatus" in Symbol 64 MovieClip Frame 1
onClipEvent (enterFrame) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent = (loading / total) * 100;
if (percent > 90) {
loaded = true;
_root.gotoAndPlay("intro");
}
}
Symbol 64 MovieClip Frame 7
stop();
Instance of Symbol 61 MovieClip in Symbol 64 MovieClip Frame 7
onClipEvent (load) {
var loaded = false;
}
onClipEvent (enterFrame) {
if (loaded != true) {
loading = _root.getBytesLoaded();
total = _root.getBytesTotal();
percent = (loading / total) * 100;
per = int(percent);
_parent.percentage.text = per + "%";
if (percent > 99) {
_parent.gotoAndPlay("loaded");
loaded = true;
}
advance = int(0.65 * per);
_parent.gotoAndStop(advance);
}
}
Symbol 64 MovieClip Frame 83
_root.gotoAndPlay("intro");
Symbol 497 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPath] Frame 0
class com.xfactorstudio.xml.xpath.XPath
{
function XPath () {
}
static function selectNodes(context, path) {
var _local1 = new com.xfactorstudio.xml.xpath.types.Query(path);
return(_local1.execute([context]));
}
static function selectSingleNode(context, path) {
return(selectNodes(context, path)[0]);
}
static function selectNodesAsString(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0];
_local1++;
}
return(_local2);
}
static function selectNodesAsNumber(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0]);
_local1++;
}
return(_local2);
}
static function selectNodesAsBoolean(context, path) {
var _local3 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local3[_local1])[0];
_local3[_local1] = (((_local2.toUpperCase() == "TRUE") || (Number(_local2) == 1)) ? true : false);
_local1++;
}
return(_local3);
}
static function getNamedNodes(axis, name) {
var _local2 = new Array();
switch (name) {
case "*" :
var _local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 1) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "text()" :
_local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 3) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "node()" :
_local3 = 0;
while (_local3 < axis.length) {
_local2.push(axis[_local3]);
_local3++;
}
break;
default :
if (name.indexOf(":*") != -1) {
var _local5 = name.split(":*")[0];
_local3 = 0;
while (_local3 < axis.length) {
if (prefix(axis[_local3]) == _local5) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else if (name.indexOf("*:") != -1) {
var _local6 = name.split("*:")[1];
_local3 = 0;
while (_local3 < axis.length) {
if (localName(axis[_local3]) == _local6) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else {
_local3 = 0;
for(;;){
if (_local3 >= axis.length) {
break;
}
if (axis[_local3].nodeName == name) {
_local2.push(axis[_local3]);
}
_local3++;
};
}
}
return(_local2);
}
static function getDocumentElement(context) {
while (context.parentNode != null) {
context = context.parentNode;
}
if (context.firstChild.nodeName == null) {
return(context.firstChild.nextSibling);
}
return(context.firstChild);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function prefix(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[0]) : null));
}
static function localName(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[1]) : (node.nodeName)));
}
static function getXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + ("/" + _local2[_local1].nodeName);
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
static function getAbsoluteXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + (((("/" + _local2[_local1].nodeName) + "[") + com.xfactorstudio.xml.xpath.types.Predicate.getIndexOfType(_local2[_local1])) + "]");
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
}
Symbol 498 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.QueryPart] Frame 0
class com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes, parentNode, nodeValue;
function QueryPart () {
childNodes = new Array();
}
function register() {
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone(obj) {
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2].nodeValue != null) {
obj.parentNode = parentNode;
obj.nodeValue = nodeValue;
obj.nodeName = nodeName;
obj.childNodes.push(childNodes[_local2].clone());
} else {
obj.childNodes.push(childNodes[_local2]);
}
_local2++;
}
}
function toString(tabs) {
if (tabs == null) {
tabs = "\t";
}
var _local3 = new Array();
_local3.push(newline);
_local3.push(tabs);
_local3.push("<");
_local3.push(nodeName);
_local3.push(">");
if (nodeValue != null) {
_local3.push(nodeValue);
}
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2] instanceof Array) {
_local3.push((((newline + tabs) + "\t<nodeset>") + childNodes[_local2]) + "</nodset>");
} else {
_local3.push(childNodes[_local2].toString(tabs + "\t"));
}
_local2++;
}
if (childNodes.length > 0) {
_local3.push(newline);
_local3.push(tabs);
}
_local3.push("</");
_local3.push(nodeName);
_local3.push(">");
return(_local3.join(""));
}
function execute(context) {
}
var nodeName = "querypart";
}
Symbol 499 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Query] Frame 0
class com.xfactorstudio.xml.xpath.types.Query extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var currentChild, nodeName, pathString, childNodes;
function Query (query) {
super();
com.xfactorstudio.xml.xpath.XPathFunctions.registerDefaultFunctions();
currentChild = this;
nodeName = "query";
pathString = query;
var _local3 = new com.xfactorstudio.xml.xpath.XPathLexer();
_local3.handler = this;
var _local4 = getTimer();
_local3.parse(pathString);
}
function onFunctionStart(name) {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Func(name));
}
function onComma() {
}
function onGroupStart() {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Group());
}
function onGroupEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Group)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onFunctionEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Func)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onIdentifier(name) {
if (name == ".") {
onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
onAxis(com.xfactorstudio.xml.xpath.Axes.CHILD);
} else {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Identifier(name));
}
}
function onAxis(axis) {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Axis(axis));
}
function onPredicateStart() {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Predicate());
}
function onPredicateEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Predicate)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onOperator(type) {
onNotPath();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Operator(type));
}
function onLitteral(litteral) {
onNotPath();
currentChild.appendChild(litteral);
}
function onNumber(num) {
onNotPath();
currentChild.appendChild(num);
}
function onPathPart() {
if (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Path)) {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Path());
}
}
function onNotPath() {
if (currentChild instanceof com.xfactorstudio.xml.xpath.types.Path) {
currentChild = currentChild.parentNode;
}
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Query();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local8 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local3 = 0;
while (_local3 < childNodes.length) {
_local8.appendChild(childNodes[_local3]);
_local3++;
}
var _local7 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
var _local5 = _local8.clone();
var _local4 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2]);
if (_local4 instanceof Array) {
_local7 = _local7.concat(com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2], context));
} else {
_local7.push(_local4);
}
_local2++;
}
return(_local7);
}
}
Symbol 500 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathFunctions] Frame 0
class com.xfactorstudio.xml.xpath.XPathFunctions
{
function XPathFunctions () {
}
static function registerFunction(id, func) {
if (Tokens[id] == null) {
Functions.push(func);
Tokens[id] = Functions.length - 1;
} else {
throw new Error(("XPath Error: The function identifier (" + Tokens[id]) + ") is already in use");
}
}
static function registerDefaultFunctions() {
if (!defaultFunctionsInited) {
registerFunction("last", last);
registerFunction("position", position);
registerFunction("count", count);
registerFunction("id", id);
registerFunction("name", name);
registerFunction("string", string);
registerFunction("concat", concat);
registerFunction("starts-with", startsWith);
registerFunction("contains", contains);
registerFunction("substring-before", substringBefore);
registerFunction("substring-after", substringAfter);
registerFunction("substring", substring);
registerFunction("string-length", stringLength);
registerFunction("normalize-space", normalizeSpace);
registerFunction("translate", translate);
registerFunction("boolean", boolean);
registerFunction("not", Not);
registerFunction("true", True);
registerFunction("false", False);
registerFunction("lang", lang);
registerFunction("number", number);
registerFunction("sum", sum);
registerFunction("floor", floor);
registerFunction("ceiling", ceiling);
registerFunction("round", round);
registerFunction("local-name", localName);
registerFunction("namespaceURI", namespaceURI);
defaultFunctionsInited = true;
}
}
static function getFunction(i) {
return(Functions[i]);
}
static function last(args, context, nodeSet) {
return(Number(nodeSet.length));
}
static function position(args, context, nodeSet) {
return(com.xfactorstudio.xml.xpath.XPath.getChildIndex(context));
}
static function count(args, context, nodeSet) {
return(args[0].length);
}
static function id(args, context, nodeSet) {
}
static function name(args, context, nodeSet) {
var _local1 = ((args.length == 0) ? (context) : (args[0][0]));
return(_local1.nodeName);
}
static function localName(args, context, nodeSet) {
var _local2 = ((args.length == 0) ? (context) : (args[0][0]));
var _local1 = _local2.nodeName.split(":");
return(((_local1.length > 1) ? (_local1[1]) : (_local1[0])));
}
static function namespaceURI(args, context, nodeSet) {
var _local4 = ((args.length == 0) ? (context) : (args[0][0]));
var _local3 = _local4.nodeName.split(":")[0];
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.namespace(_local4);
var _local1 = 0;
while (_local1 < _local2.length) {
if (localName([[_local2[_local1]]]) == _local3) {
return(_local2[_local1].nodeValue);
}
_local1++;
}
}
static function toString(args) {
if (args instanceof Array) {
args = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0]).join("");
}
return(String(args));
}
static function string(args, context, nodeSet) {
return(toString(args[0]));
}
static function concat(args, context, nodeSet) {
var _local1 = 0;
while (_local1 < args.length) {
args[_local1] = toString(args[_local1]);
_local1++;
}
return(args.join(""));
}
static function startsWith(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].substr(0, args[1].length) == args[1]) ? true : false));
}
static function contains(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].indexOf(args[1]) != -1) ? true : false));
}
static function substringBefore(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(0, args[0].indexOf(args[1])));
}
static function substringAfter(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[0].indexOf(args[1]) + args[1].length, args[0].length));
}
static function substring(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[1] - 1, Math.min(args[2], args[0].length)));
}
static function stringLength(argsA, context, nodeSet) {
var _local1 = toString(argsA[0]);
return(((_local1 != null) ? (_local1.length) : (com.xfactorstudio.xml.xpath.XPathAxes.stringValue(context).length)));
}
static function normalizeSpace(argsA, context, nodeSet) {
var _local2 = toString(argsA[0]);
var _local1;
var _local3;
_local1 = 0;
while (_local1 < _local2.length) {
if (_local2.charCodeAt(_local1) < 33) {
_local3 = _local1;
while (_local2.charCodeAt(_local3) < 33) {
_local3++;
}
if (_local3 > (_local1 + 1)) {
_local2 = _local2.split(_local2.substr(_local1, _local3 - _local1)).join(" ");
}
}
_local1++;
}
_local1 = 0;
while (_local2.charCodeAt(_local1) < 33) {
_local1++;
}
_local2 = _local2.substr(_local1, _local2.length);
_local1 = _local2.length - 1;
while (_local2.charCodeAt(_local1) < 33) {
_local1--;
}
_local2 = _local2.substr(0, _local1 + 1);
return(_local2);
}
static function translate(args, context, nodeSet) {
var _local3 = toString(args[0]);
var _local4 = toString(args[1]);
var _local2 = toString(args[2]);
return(_local3.split(_local4).join(_local2));
}
static function toNumber(args) {
if (args instanceof Array) {
args = toString(args);
}
switch (typeof(args)) {
case "string" :
return(Number(args));
case "boolean" :
return((args ? 1 : 0));
}
return(Number(args.toString()));
}
static function number(args, context, nodeSet) {
return(toNumber(args[0]));
}
static function sum(args, context, nodeSet) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < args[0].length) {
_local3 = _local3 + Number(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0][_local1])[0]);
_local1++;
}
return(_local3);
}
static function floor(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.floor(Number(args[0])));
}
static function ceiling(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.ceil(Number(args[0])));
}
static function round(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.round(Number(args[0])));
}
static function toBoolean(args) {
return(boolean([args]));
}
static function boolean(argsA, context, nodeSet) {
var _local1 = argsA[0];
if (_local1 instanceof Array) {
return(((_local1.length > 0) ? true : false));
}
switch (typeof(_local1)) {
case "number" :
return(((_local1 != 0) ? true : false));
case "string" :
return(((_local1.length > 0) ? true : false));
}
return(Boolean(_local1));
}
static function Not(args, context, nodeSet) {
args = args[0];
if ((args == "false") || (args == false)) {
return(true);
}
return(false);
}
static function True(args, context, nodeSet) {
return(true);
}
static function False(args, context, nodeSet) {
return(false);
}
static function lang(args, context, nodeSet) {
return(((com.xfactorstudio.xml.xpath.XPath.getNamedNodes(com.xfactorstudio.xml.xpath.XPathAxes.attribute(context), "*:lang")[0].toString() == args[0].toString()) ? true : false));
}
static var Tokens = new Object();
static var Names = new Array();
static var Functions = new Array();
static var defaultFunctionsInited = false;
}
Symbol 501 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxes] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxes
{
function XPathAxes () {
}
static function ancestor(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.parentNode , _local1 != null) {
_local2.push(_local1);
}
_local2.reverse();
return(_local2);
}
static function namespace(contextNode) {
var _local4;
var _local3;
var _local5;
var _local12 = contextNode.parentNode;
if (_local12 != null) {
_local3 = namespace(_local12);
} else {
_local3 = new Array();
var _local13 = {parentNode:contextNode, nodeName:"xmlns:xml", nodeType:5, nodeValue:"http://www.w3.org/XML/1998/namespace", toString:function () {
return(this.nodeValue);
}};
_local3.push(_local13);
}
for (var _local11 in contextNode.attributes) {
if (_local11.substr(0, 5) == "xmlns") {
_local4 = {parentNode:contextNode, nodeName:_local11, nodeType:5, nodeValue:contextNode.attributes[_local11], toString:function () {
return(this.nodeValue);
}};
_local5 = -1;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].nodeName == _local4.nodeName) {
_local5 = _local2;
break;
}
_local2++;
}
if (_local5 != -1) {
if (_local4.nodeValue == "") {
_local3.splice(_local5, 1);
} else {
_local3[_local5] = _local4;
}
} else if (_local4.nodeValue != "") {
_local3.push(_local4);
}
}
}
return(_local3);
}
static function ancestorOrSelf(contextNode) {
var _local1 = ancestor(contextNode);
_local1.push(contextNode);
return(_local1);
}
static function attribute(contextNode) {
var _local7 = new Array();
for (var _local8 in contextNode.attributes) {
_local7.push({parentNode:contextNode, nodeName:_local8, nodeType:5, nodeValue:contextNode.attributes[_local8], toString:function () {
return(this.nodeValue);
}});
}
return(_local7);
}
static function child(contextNode) {
return(contextNode.childNodes);
}
static function stringValue(contextNode) {
var _local4 = new Array();
var _local3;
switch (contextNode.nodeType) {
case 1 :
_local3 = new Array();
var _local1 = 0;
while (_local1 < contextNode.childNodes.length) {
switch (contextNode.childNodes[_local1].nodeType) {
case 3 :
if (!com.xfactorstudio.xml.xpath.XPathUtils.checkEmpty(contextNode.childNodes[_local1])) {
_local3.push(contextNode.childNodes[_local1].nodeValue);
}
break;
case 1 :
_local3.push(stringValue(contextNode.childNodes[_local1]));
}
_local1++;
}
_local4.push(_local3.join(""));
break;
case 3 :
case 5 :
_local4.push(contextNode.nodeValue);
}
return(_local4);
}
static function descendant(contextNode) {
var _local4 = contextNode;
var _local5 = new Array();
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
if (_local4.childNodes[_local2].nodeType == 1) {
_local5.push(_local4.childNodes[_local2]);
var _local3 = descendant(_local4.childNodes[_local2]);
var _local1 = 0;
while (_local1 < _local3.length) {
_local5.push(_local3[_local1]);
_local1++;
}
}
_local2++;
}
return(_local5);
}
static function descendantOrSelf(contextNode) {
var _local1 = descendant(contextNode);
_local1.splice(0, 0, contextNode);
return(_local1);
}
static function following(contextNode) {
var _local6 = new Array();
var _local9 = followingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local9.length) {
var _local4 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
_local6.push(_local4[_local3]);
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local8.length) {
var _local5 = followingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = descendantOrSelf(_local5[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
return(_local6);
}
static function followingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.nextSibling , _local1 != null) {
_local2.push(_local1);
}
return(_local2);
}
static function parent(contextNode) {
return(new Array(contextNode.parentNode));
}
static function preceding(contextNode) {
var _local6 = new Array();
var _local9 = precedingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local8.length) {
var _local4 = precedingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = descendantOrSelf(_local4[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local9.length) {
var _local5 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
_local6.push(_local5[_local3]);
_local3++;
}
_local7++;
}
return(_local6);
}
static function precedingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.previousSibling , _local1 != null) {
_local2.push(_local1);
}
_local2.reverse();
return(_local2);
}
static function self(contextNode) {
return([contextNode]);
}
static function root(contextNode) {
while (contextNode.parentNode != null) {
contextNode = contextNode.parentNode;
}
return([contextNode.firstChild]);
}
}
Symbol 502 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathUtils] Frame 0
class com.xfactorstudio.xml.xpath.XPathUtils
{
function XPathUtils () {
}
static function cloneArray(obj) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < obj.length) {
_local3.push(obj[_local1]);
_local1++;
}
return(_local3);
}
static function checkEmpty(contextNode) {
var _local2 = contextNode.nodeValue;
var _local4 = _local2.length;
var _local3 = true;
var _local1 = 1;
while (_local1 < _local4) {
if (_local2.substr(_local1 - 1, 1).charCodeAt() > 32) {
_local3 = false;
break;
}
_local1 = _local1 + 2;
}
return(_local3);
}
}
Symbol 503 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathLexer] Frame 0
class com.xfactorstudio.xml.xpath.XPathLexer
{
var functionNames, axisNames, operatorNames, path, tokenizer, lastToken, handler, lastOpenPeran;
function XPathLexer (path) {
functionNames = com.xfactorstudio.xml.xpath.XPathFunctions.Tokens;
axisNames = new com.xfactorstudio.xml.xpath.XPathAxisNames();
operatorNames = new com.xfactorstudio.xml.xpath.XPathPredicateOperator();
}
function parse(path) {
this.path = path;
tokenizer = new com.xfactorstudio.xml.xpath.Tokenizer(this.path);
var _local2;
while (tokenizer.hasMoreChars()) {
_local2 = tokenizer.nextToken();
switch (_local2.getTokenType()) {
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
onSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER :
onIdentifier(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
onAt();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
onOperator(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.INTEGER :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE :
onNumber(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT :
onDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT :
onDoubleDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
onDoubleSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.EOF :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
onLeftBracket(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
onLeftParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LITERAL :
onLitteral(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET :
onRightBracket();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN :
onRightParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
if (tokenizer.LA(1) == ":") {
var _local3 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER, _local2.getTokenText() + tokenizer.nextToken().getTokenText());
onIdentifier(_local3);
} else {
onStar();
break;
}
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.SKIP :
}
lastToken = _local2;
}
}
function onSlash(t) {
switch (lastTokenType) {
case IDENTIFIER :
case PREDICATEEND :
case AXIS :
lastTokenType = OPERATOR;
break;
default :
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ROOT);
lastTokenType = AXIS;
}
}
function onStar() {
switch (lastToken.getTokenType()) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
handler.onOperator("*");
break;
default :
handler.onIdentifier("*");
}
}
function onAt() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE);
lastTokenType = AXIS;
}
function onDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
lastTokenType = AXIS;
}
function onDoubleDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.PARENT);
lastTokenType = AXIS;
}
function onDoubleSlash(t) {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF);
lastTokenType = AXIS;
}
function onNumber(t) {
handler.onNumber(Number(t.getTokenText()));
lastTokenType = NUMBER;
}
function onIdentifier(t) {
var _local2 = t.getTokenText();
if (tokenizer.LA(1) == "(") {
switch (_local2) {
case "node" :
case "text" :
handler.onIdentifier(_local2 + "()");
lastTokenType = IDENTIFIER;
tokenizer.nextToken();
tokenizer.nextToken();
return(undefined);
}
handler.onFunctionStart(functionNames[_local2]);
lastTokenType = FUNCTIONSTART;
lastOpenPeran = FUNCTIONSTART;
tokenizer.nextToken();
return(undefined);
}
if (tokenizer.LA(1) == ":") {
if (tokenizer.LA(2) == ":") {
_local2 = _local2 + tokenizer.nextToken().getTokenText();
handler.onAxis(axisNames[_local2]);
lastTokenType = AXIS;
return(undefined);
}
_local2 = _local2 + tokenizer.nextToken().getTokenText();
_local2 = _local2 + tokenizer.nextToken().getTokenText();
}
switch (lastTokenType) {
case AXIS :
case PREDICATESTART :
case GROUPSTART :
case FUNCTIONSTART :
case OPERATOR :
case -1 :
handler.onIdentifier(_local2);
lastTokenType = IDENTIFIER;
break;
}
}
function onRightParen() {
switch (lastOpenPeran) {
case GROUPSTART :
handler.onGroupEnd();
lastTokenType = GROUPEND;
break;
case FUNCTIONSTART :
handler.onFunctionEnd();
lastTokenType = FUNCTIONEND;
}
}
function onLeftParen() {
handler.onGroupStart();
lastTokenType = GROUPSTART;
lastOpenPeran = GROUPSTART;
}
function onLitteral(t) {
handler.onLitteral(t.getTokenText());
lastTokenType = LITTERAL;
}
function onLeftBracket(t) {
handler.onPredicateStart();
lastTokenType = PREDICATESTART;
}
function onRightBracket(t) {
handler.onPredicateEnd();
lastTokenType = PREDICATEEND;
}
function onOperator(t) {
handler.onOperator(operatorNames[t.getTokenText()]);
lastTokenType = OPERATOR;
}
var lastTokenType = -1;
var inFunction = 0;
var inGroup = 0;
var inPredicate = 0;
static var AXIS = 0;
static var PREDICATESTART = 1;
static var PREDICATEEND = 2;
static var IDENTIFIER = 3;
static var FUNCTIONSTART = 4;
static var FUNCTIONEND = 5;
static var OPERATOR = 6;
static var COMMA = 7;
static var GROUPSTART = 8;
static var GROUPEND = 9;
static var NUMBER = 10;
static var LITTERAL = 11;
}
Symbol 504 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Token] Frame 0
class com.xfactorstudio.xml.xpath.Token
{
var tokenType, parseText, tokenBegin, tokenEnd;
function Token (tokenType, parseText, tokenBegin, tokenEnd) {
setTokenType(tokenType);
setParseText(parseText);
setTokenBegin(tokenBegin);
setTokenEnd(tokenEnd);
}
function setTokenType(tokenType) {
this.tokenType = tokenType;
}
function getTokenType() {
return(tokenType);
}
function setParseText(parseText) {
this.parseText = parseText;
}
function getTokenText() {
return(parseText.substring(getTokenBegin(), getTokenEnd()));
}
function setTokenBegin(tokenBegin) {
this.tokenBegin = tokenBegin;
}
function getTokenBegin() {
return(tokenBegin);
}
function setTokenEnd(tokenEnd) {
this.tokenEnd = tokenEnd;
}
function getTokenEnd() {
return(tokenEnd);
}
function toString() {
return(((("[ (" + com.xfactorstudio.xml.xpath.TokenTypes.getName(tokenType)) + ") (") + getTokenText()) + ")");
}
}
Symbol 505 MovieClip [__Packages.com.xfactorstudio.xml.xpath.TokenTypes] Frame 0
class com.xfactorstudio.xml.xpath.TokenTypes
{
function TokenTypes () {
}
static function getName(i) {
switch (i) {
case AND :
return("AND");
case AT :
return("AT");
case COLON :
return("COLON");
case COMMA :
return("COMMA");
case DIV :
return("DIV");
case DOLLAR :
return("DOLLAR");
case DOT :
return("DOT");
case DOT_DOT :
return("DOT_DOT");
case DOUBLE :
return("DOUBLE");
case DOUBLE_COLON :
return("DOUBLE_COLON");
case DOUBLE_SLASH :
return("DOUBLE_SLASH");
case EOF :
return("EOF");
case EQUALS :
return("EQUALS");
case GREATER_THAN :
return("GREATER_THAN");
case GREATER_THAN_EQUALS :
return("GREATER_THAN_EQUALS");
case IDENTIFIER :
return("IDENTIFIER");
case INTEGER :
return("INTEGER");
case LEFT_BRACKET :
return("LEFT_BRACKET");
case LEFT_PAREN :
return("LEFT_PAREN");
case LESS_THAN :
return("LESS_THAN");
case LESS_THAN_EQUALS :
return("LESS_THAN_EQUALS");
case LITERAL :
return("LITERAL");
case MINUS :
return("MINUS");
case MOD :
return("MOD");
case NOT :
return("NOT");
case NOT_EQUALS :
return("NOT_EQUALS");
case OR :
return("OR");
case PIPE :
return("PIPE");
case PLUS :
return("PLUS");
case RIGHT_BRACKET :
return("RIGHT_BRACKET");
case RIGHT_PAREN :
return("RIGHT_PAREN");
case SKIP :
return("SKIP");
case SLASH :
return("SLASH");
case STAR :
return("STAR");
}
}
static var LEFT_PAREN = 1;
static var RIGHT_PAREN = 2;
static var LEFT_BRACKET = 3;
static var RIGHT_BRACKET = 4;
static var PLUS = 5;
static var MINUS = 6;
static var LESS_THAN = 7;
static var LESS_THAN_EQUALS = 8;
static var GREATER_THAN = 9;
static var GREATER_THAN_EQUALS = 10;
static var SLASH = 11;
static var DOUBLE_SLASH = 12;
static var DOT = 13;
static var DOT_DOT = 14;
static var IDENTIFIER = 15;
static var AT = 16;
static var PIPE = 17;
static var COLON = 18;
static var DOUBLE_COLON = 19;
static var STAR = 20;
static var EQUALS = 21;
static var NOT_EQUALS = 22;
static var NOT = 23;
static var DIV = 24;
static var MOD = 25;
static var DOLLAR = 26;
static var LITERAL = 27;
static var AND = 28;
static var OR = 29;
static var INTEGER = 30;
static var DOUBLE = 31;
static var COMMA = 32;
static var SKIP = -2;
static var EOF = -1;
}
Symbol 506 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Tokenizer] Frame 0
class com.xfactorstudio.xml.xpath.Tokenizer
{
var xpath, currentPosition, endPosition;
function Tokenizer (xpath) {
setXPath(xpath);
}
function setXPath(xpath) {
this.xpath = xpath;
currentPosition = 0;
endPosition = xpath.length;
}
function nextToken() {
var _local2 = null;
do {
_local2 = null;
switch (LA(1)) {
case "$" :
_local2 = dollar();
break;
case "\"" :
case "'" :
_local2 = literal();
break;
case "/" :
_local2 = slashes();
break;
case "," :
_local2 = comma();
break;
case "(" :
_local2 = leftParen();
break;
case ")" :
_local2 = rightParen();
break;
case "[" :
_local2 = leftBracket();
break;
case "]" :
_local2 = rightBracket();
break;
case "+" :
_local2 = plus();
break;
case "-" :
_local2 = minus();
break;
case "<" :
case ">" :
_local2 = relationalOperator();
break;
case "=" :
_local2 = equals();
break;
case "!" :
if (LA(2) == "=") {
_local2 = notEquals();
} else {
_local2 = Not();
}
break;
case "|" :
_local2 = pipe();
break;
case "@" :
_local2 = at();
break;
case ":" :
if (LA(2) == ":") {
_local2 = doubleColon();
} else {
_local2 = colon();
}
break;
case "*" :
_local2 = star();
break;
case "." :
switch (LA(2)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
default :
_local2 = dots();
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
case " " :
case "\t" :
case newline :
case "\r" :
_local2 = whitespace();
break;
default :
if (!isIdentifierStartChar(LA(1))) {
break;
}
_local2 = identifierOrOperatorName();
}
if (_local2 == null) {
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.EOF, xpath.substring(currentPosition, endPosition));
}
} while (_local2.getTokenType() == com.xfactorstudio.xml.xpath.TokenTypes.SKIP);
previousToken = _local2;
return(_local2);
}
function identifierOrOperatorName() {
var _local2 = null;
if (previousToken != null) {
switch (previousToken.getTokenType()) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
_local2 = identifier();
break;
default :
_local2 = operatorName();
}
} else {
_local2 = identifier();
}
return(_local2);
}
function identifier() {
var _local2 = null;
var _local3 = currentPosition;
while (hasMoreChars()) {
if (isIdentifierChar(LA(1))) {
consume();
} else {
break;
}
}
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER, xpath.substring(_local3, currentPosition));
return(_local2);
}
function operatorName() {
var _local2 = null;
switch (LA(1)) {
case "a" :
_local2 = And();
break;
case "o" :
_local2 = Or();
break;
case "m" :
_local2 = mod();
break;
case "d" :
_local2 = div();
}
return(_local2);
}
function mod() {
var _local2 = null;
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.MOD, "mod");
consume();
consume();
consume();
return(_local2);
}
function div() {
var _local2 = null;
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DIV, xpath.substring(currentPosition, currentPosition + 3));
consume();
consume();
consume();
return(_local2);
}
function And() {
var _local2 = null;
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.AND, "and");
consume();
consume();
consume();
return(_local2);
}
function Or() {
var _local2 = null;
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.OR, "or");
consume();
consume();
return(_local2);
}
function numberTok() {
var _local5 = currentPosition;
var _local2 = true;
var _local3 = true;
while (_local3) {
switch (LA(1)) {
case "." :
if (_local2) {
_local2 = false;
consume();
} else {
break;
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
consume();
break;
default :
_local3 = false;
}
}
var _local4 = null;
if (_local2) {
_local4 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.INTEGER, xpath.substring(_local5, currentPosition));
} else {
_local4 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE, xpath.substring(_local5, currentPosition));
}
return(_local4);
}
function whitespace() {
consume();
while (hasMoreChars()) {
switch (LA(1)) {
case " " :
case "\t" :
case newline :
case "\r" :
consume();
continue;//outer level
}
return(new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.SKIP, xpath.substring(0, 0)));
}
}
function comma() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.COMMA, ",");
consume();
return(_local2);
}
function equals() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.EQUALS, "=");
consume();
return(_local2);
}
function minus() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.MINUS, "-");
consume();
return(_local2);
}
function plus() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.PLUS, "+");
consume();
return(_local2);
}
function dollar() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR, "$");
consume();
return(_local2);
}
function pipe() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.PIPE, "|");
consume();
return(_local2);
}
function at() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.AT, "@");
consume();
return(_local2);
}
function colon() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.COLON, ":");
consume();
return(_local2);
}
function doubleColon() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON, "::");
consume();
consume();
return(_local2);
}
function Not() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.NOT, "!");
consume();
return(_local2);
}
function notEquals() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS, "!=");
consume();
consume();
return(_local2);
}
function relationalOperator() {
var _local2 = null;
switch (LA(1)) {
case "<" :
if (LA(2) == "=") {
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS, "<=");
consume();
} else {
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN, "<");
}
consume();
break;
case ">" :
if (LA(2) == "=") {
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS, ">=");
consume();
} else {
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN, ">");
}
consume();
}
return(_local2);
}
function star() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.STAR, "*");
consume();
return(_local2);
}
function literal() {
var _local2 = null;
var _local3 = LA(1);
consume();
var _local4 = currentPosition;
while ((_local2 == null) && (hasMoreChars())) {
if (LA(1) == _local3) {
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.LITERAL, xpath.substring(_local4, currentPosition));
}
consume();
}
return(_local2);
}
function dots() {
var _local2 = null;
switch (LA(2)) {
case "." :
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT, "..");
consume();
consume();
break;
default :
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DOT, ".");
consume();
}
return(_local2);
}
function leftBracket() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET, "[");
consume();
return(_local2);
}
function rightBracket() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET, "]");
consume();
return(_local2);
}
function leftParen() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN, "(");
consume();
return(_local2);
}
function rightParen() {
var _local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN, ")");
consume();
return(_local2);
}
function slashes() {
var _local2 = null;
switch (LA(2)) {
case "/" :
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH, "//");
consume();
consume();
break;
default :
_local2 = new com.xfactorstudio.xml.xpath.Token(com.xfactorstudio.xml.xpath.TokenTypes.SLASH, "/");
consume();
}
return(_local2);
}
function LA(i) {
return(xpath.charAt(currentPosition + (i - 1)));
}
function consume() {
currentPosition++;
}
function hasMoreChars() {
return(currentPosition < endPosition);
}
function isIdentifierChar(c) {
return(isUnicodeIdentifierPart(c));
}
function isIdentifierStartChar(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(c) != -1);
}
static function isUnicodeIdentifierPart(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".indexOf(c) != -1);
}
static function isNumber(c) {
return(!isNaN(c));
}
var previousToken = null;
}
Symbol 507 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxisNames] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxisNames
{
var ancestor::, ancestor-or-self::, attribute::, @, child::, descendant::, descendant-or-self::, //, following::, following-sibling::, parent::, .., preceding::, preceding-sibling::, self::, namespace::;
function XPathAxisNames () {
ancestor:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR;
ancestor-or-self:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR_OR_SELF;
attribute:: = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
@ = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
child:: = com.xfactorstudio.xml.xpath.Axes.CHILD;
descendant:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT;
descendant-or-self:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
// = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
following:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING;
following-sibling:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING_SIBLING;
parent:: = com.xfactorstudio.xml.xpath.Axes.PARENT;
.. = com.xfactorstudio.xml.xpath.Axes.PARENT;
preceding:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING;
preceding-sibling:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING_SIBLING;
self:: = com.xfactorstudio.xml.xpath.Axes.SELF;
this["."] = com.xfactorstudio.xml.xpath.Axes.SELF;
namespace:: = com.xfactorstudio.xml.xpath.Axes.NAMESPACE;
}
}
Symbol 508 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Axes] Frame 0
class com.xfactorstudio.xml.xpath.Axes
{
function Axes () {
}
static function getName(index) {
switch (index) {
case 0 :
return("root");
case 1 :
return("ancestor");
case 2 :
return("ancestorOrSelf");
case 3 :
return("attribute");
case 4 :
return("child");
case 5 :
return("descendant");
case 6 :
return("descendantOrSelf");
case 7 :
return("following");
case 8 :
return("followingSibling");
case 9 :
return("parent");
case 10 :
return("preceding");
case 11 :
return("precedingSibling");
case 12 :
return("self");
case 13 :
return("namespace");
}
}
static var ROOT = 0;
static var ANCESTOR = 1;
static var ANCESTOR_OR_SELF = 2;
static var ATTRIBUTE = 3;
static var CHILD = 4;
static var DECENDANT = 5;
static var DECENDANT_OR_SELF = 6;
static var FOLLOWING = 7;
static var FOLLOWING_SIBLING = 8;
static var PARENT = 9;
static var PRECEDING = 10;
static var PRECEDING_SIBLING = 11;
static var SELF = 12;
static var NAMESPACE = 13;
}
Symbol 509 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathPredicateOperator] Frame 0
class com.xfactorstudio.xml.xpath.XPathPredicateOperator
{
var +, -, =, !, >, <, !=, >=, <=, *, mod, div, and, or, |;
function XPathPredicateOperator () {
+ = 200;
- = 201;
= = 202;
! = 203;
> = 204;
< = 205;
!= = 206;
>= = 207;
<= = 208;
* = 209;
mod = 210;
div = 211;
and = 212;
or = 213;
| = 214;
}
}
Symbol 510 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Func] Frame 0
class com.xfactorstudio.xml.xpath.types.Func extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode, childNodes;
function Func (name) {
super();
nodeValue = name;
}
function register() {
parentNode.hasFunctions = true;
}
function clone() {
var _local3 = new com.xfactorstudio.xml.xpath.types.Func(Number(nodeValue));
super.clone(_local3);
return(_local3);
}
function execute(context, axis) {
var _local2 = 0;
while (_local2 < childNodes.length) {
switch (typeof(childNodes[_local2])) {
case "string" :
case "boolean" :
case "number" :
break;
default :
childNodes[_local2] = childNodes[_local2].execute(context);
}
_local2++;
}
return(com.xfactorstudio.xml.xpath.XPathFunctions.getFunction(Number(nodeValue)).call(this, childNodes, context[0], axis));
}
var nodeName = "function";
}
Symbol 511 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Group] Frame 0
class com.xfactorstudio.xml.xpath.types.Group extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Group () {
super();
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Group();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local7;
var _local5 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local2 = 0;
while (_local2 < childNodes.length) {
_local5.appendChild(childNodes[_local2]);
_local2++;
}
var _local8 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local4 = _local5.clone();
_local7 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local4, context[_local3]);
_local3++;
}
return(_local7);
}
var nodeName = "group";
}
Symbol 512 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Predicate] Frame 0
class com.xfactorstudio.xml.xpath.types.Predicate extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Predicate () {
super();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
child.register();
return(childNodes[childNodes.length - 1]);
}
function execute(context) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local5 = clone();
var _local2 = evaluate(_local5, context[_local3], context);
if (typeof(_local2) == "number") {
_local2 = _local2 == getChildIndex(context[_local3]);
} else {
_local2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(_local2);
}
if (_local2) {
_local6.push(context[_local3]);
}
_local3++;
}
return(_local6);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Predicate();
super.clone(_local2);
return(_local2);
}
static function staticEvaluate(test, contextNode, axis) {
solveGroups(test, contextNode);
solveFunctions(test, contextNode, axis);
solvePaths(test, contextNode);
solveUnions(test, contextNode);
solveMultiplicativeExpressions(test, contextNode);
solveAdditiveExpressions(test, contextNode);
solveRelationalExpressions(test, contextNode);
solveEqualityExpressions(test, contextNode);
solveLogicalAndExpressions(test, contextNode);
solveLogicalOrExpressions(test, contextNode);
return(test.childNodes[0]);
}
function evaluate(test, contextNode, axis) {
if (hasGroups) {
solveGroups(test, contextNode);
}
if (hasFunctions) {
solveFunctions(test, contextNode, axis);
}
if (hasPaths) {
solvePaths(test, contextNode);
}
if (hasUnions) {
solveUnions(test, contextNode);
}
if (hasMultiplicativeExpressions) {
solveMultiplicativeExpressions(test, contextNode);
}
if (hasAdditiveExpressions) {
solveAdditiveExpressions(test, contextNode);
}
if (hasRelationalExpressions) {
solveRelationalExpressions(test, contextNode);
}
if (hasEqualityExpressions) {
solveEqualityExpressions(test, contextNode);
}
if (hasLogicalAndExpressions) {
solveLogicalAndExpressions(test, contextNode);
}
if (hasLogicalOrExpressions) {
solveLogicalOrExpressions(test, contextNode);
}
return(test.childNodes[0]);
}
static function solveEqualityExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
switch (Number(test.childNodes[_local1].nodeValue)) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
test.childNodes.splice(_local1 - 1, 3, isEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
test.childNodes.splice(_local1 - 1, 3, isNotEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveMultiplicativeExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (Number(test.childNodes[_local1].nodeValue)) {
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) * Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MOD :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) % Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.DIV :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) / Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveAdditiveExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (Number(test.childNodes[_local1].nodeValue)) {
case com.xfactorstudio.xml.xpath.Operators.PLUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) + Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MINUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) - Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalAndExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (Number(test.childNodes[_local1].nodeValue) == com.xfactorstudio.xml.xpath.Operators.AND) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) && (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalOrExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (Number(test.childNodes[_local1].nodeValue) == com.xfactorstudio.xml.xpath.Operators.OR) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) || (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveRelationalExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (Number(test.childNodes[_local1].nodeValue)) {
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
test.childNodes.splice(_local1 - 1, 3, isGreaterThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
test.childNodes.splice(_local1 - 1, 3, isLessThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isGreaterThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isLessThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solvePaths(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Path) {
test.childNodes[_local1] = test.childNodes[_local1].execute([contextNode]);
}
_local1++;
}
}
static function solveUnions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.UNION) {
test.childNodes[_local1 - 1] = test.childNodes[_local1 - 1].concat(test.childNodes[_local1 + 1]);
test.childNodes[_local1 - 1].sort(sortByIndexFunction);
test.childNodes.splice(_local1 - 1, 3, test.childNodes[_local1 - 1]);
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveGroups(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Group) {
var _local3 = test.childNodes[_local1].execute([contextNode]);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function solveFunctions(test, contextNode, axis) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Func) {
var _local3 = test.childNodes[_local1].execute([contextNode], axis);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function sortByIndexFunction(a, b) {
var _local3 = getDocumentOrder(a);
var _local2 = getDocumentOrder(b);
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local2[_local1] == null) {
return(1);
}
if (_local3[_local1] > _local2[_local1]) {
return(1);
}
if (_local3[_local1] < _local2[_local1]) {
return(-1);
}
_local1++;
}
if (_local2.length > _local3.length) {
return(-1);
}
return(0);
}
static function isEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 == _local1.val2);
}
static function isNotEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 != _local1.val2);
}
static function isGreaterThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 > _local1.val2);
}
static function isLessThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 < _local1.val2);
}
static function isGreaterThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 >= _local1.val2);
}
static function isLessThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 <= _local1.val2);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function getDocumentOrder(kid) {
var _local2 = new Array();
while (kid.parentNode != null) {
_local2.push(getIndex(kid));
kid = kid.parentNode;
}
_local2.reverse();
return(_local2);
}
static function getIndex(kid) {
var _local3 = kid.parentNode.childNodes;
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2++;
if (_local3[_local1] === kid) {
return(_local2);
}
_local1++;
}
return(0);
}
static function getIndexOfType(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
if (_local2[_local1] === kid) {
return(_local3);
}
}
_local1++;
}
return(0);
}
static function convertForComparison(val1, val2) {
var _local2;
var _local1;
_local2 = typeof(val1);
_local1 = typeof(val2);
if ((_local2 == "boolean") || (_local1 == "boolean")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "number") || (_local1 == "number")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "string") || (_local1 == "string")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val2);
return({val1:val1, val2:val2});
}
return({val1:val1, val2:val2});
}
static function isTrue(test) {
return(com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(test));
}
var nodeName = "predicate";
var hasGroups = false;
var hasPaths = false;
var hasFunctions = false;
var hasUnions = false;
var hasAdditiveExpressions = false;
var hasMultiplicativeExpressions = false;
var hasRelationalExpressions = false;
var hasEqualityExpressions = false;
var hasLogicalAndExpressions = false;
var hasLogicalOrExpressions = false;
}
Symbol 513 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Operator] Frame 0
class com.xfactorstudio.xml.xpath.types.Operator extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode;
function Operator (type) {
super();
nodeValue = type;
}
function register() {
switch (Number(nodeValue)) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
parentNode.hasEqualityExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
case com.xfactorstudio.xml.xpath.Operators.MOD :
case com.xfactorstudio.xml.xpath.Operators.DIV :
parentNode.hasMultiplicativeExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.PLUS :
case com.xfactorstudio.xml.xpath.Operators.MINUS :
parentNode.hasAdditiveExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.AND :
parentNode.hasLogicalAndExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.OR :
parentNode.hasLogicalOrExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
parentNode.hasRelationalExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.UNION :
parentNode.hasUnions = true;
}
}
function clone() {
return(this);
}
var nodeName = "operator";
}
Symbol 514 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Operators] Frame 0
class com.xfactorstudio.xml.xpath.Operators
{
function Operators () {
}
static var PLUS = 200;
static var MINUS = 201;
static var EQUALS = 202;
static var NOT = 203;
static var GREATER_THAN = 204;
static var LESS_THAN = 205;
static var NOT_EQUALS = 206;
static var GREATER_THAN_OR_EQUAL_TO = 207;
static var LESS_THAN_OR_EQUAL_TO = 208;
static var MULTIPLY = 209;
static var MOD = 210;
static var DIV = 211;
static var AND = 212;
static var OR = 213;
static var UNION = 214;
}
Symbol 515 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Path] Frame 0
class com.xfactorstudio.xml.xpath.types.Path extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var parentNode, childNodes;
function Path () {
super();
}
function register() {
parentNode.hasPaths = true;
}
function appendChild(child) {
if ((childNodes.length == 0) && (Number(child.nodeValue) == com.xfactorstudio.xml.xpath.Axes.SELF)) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
if (((!(childNodes[childNodes.length - 1] instanceof com.xfactorstudio.xml.xpath.types.Axis)) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Axis))) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Predicate))) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Path();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local2 = 0;
while (_local2 < childNodes.length) {
context = childNodes[_local2].execute(context);
_local2++;
}
return(context);
}
var nodeName = "path";
}
Symbol 516 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Axis] Frame 0
class com.xfactorstudio.xml.xpath.types.Axis extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Axis (axis) {
super();
nodeValue = axis;
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Axis();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
_local3 = _local3.concat(com.xfactorstudio.xml.xpath.XPathAxes[com.xfactorstudio.xml.xpath.Axes.getName(Number(nodeValue))].call(this, context[_local2]));
_local2++;
}
return(_local3);
}
var nodeName = "axis";
}
Symbol 517 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Identifier] Frame 0
class com.xfactorstudio.xml.xpath.types.Identifier extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Identifier (name) {
super();
nodeValue = name;
}
function execute(context) {
var _local2 = com.xfactorstudio.xml.xpath.XPath.getNamedNodes(context, String(nodeValue));
return(_local2);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Identifier();
super.clone(_local2);
return(_local2);
}
var nodeName = "identifier";
}
Symbol 518 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 4 MovieClip [__Packages.mx.remoting.DebugClasses] Frame 0
class mx.remoting.DebugClasses extends MovieClip
{
function DebugClasses () {
super();
}
}
Symbol 9 MovieClip [__Packages.mx.remoting.Connection] Frame 0
class mx.remoting.Connection extends NetConnection
{
var uri;
function Connection () {
super();
}
function getService(serviceName, client) {
var _local1 = new mx.remoting.NetServiceProxy(this, serviceName, client);
return(_local1);
}
function setCredentials(userId, password) {
addHeader("Credentials", false, {userid:userId, password:password});
}
function clone() {
var _local1 = new mx.remoting.Connection();
_local1.connect(uri);
return(_local1);
}
function getDebugId() {
return(null);
}
function getDebugConfig() {
return(null);
}
function setDebugId(id) {
}
function call() {
super.call.apply(super, arguments);
}
function close() {
super.close();
}
function connect(url) {
return(super.connect(url));
}
function addHeader(name, mustUnderstand, obj) {
super.addHeader(name, mustUnderstand, obj);
}
function trace(traceObj) {
}
function AppendToGatewayUrl(urlSuffix) {
var _local1 = this;
_local1.__urlSuffix = urlSuffix;
if (_local1.__originalUrl == null) {
_local1.__originalUrl = _local1.uri;
}
var _local2 = _local1.__originalUrl + urlSuffix;
_local1.connect(_local2);
}
function ReplaceGatewayUrl(newUrl) {
connect(newUrl);
}
function RequestPersistentHeader(info) {
var _local1 = info;
addHeader(_local1.name, _local1.mustUnderstand, _local1.data);
}
static var version = "1.2.0.124";
}
Symbol 10 MovieClip [__Packages.mx.remoting.NetServiceProxy] Frame 0
class mx.remoting.NetServiceProxy extends Object
{
var nc, client;
function NetServiceProxy (netC, servName, cli) {
var _local1 = this;
super();
if (netC != null) {
_local1.nc = netC;
_local1.serviceName = servName;
_local1.client = cli;
}
_local1._allowRes = true;
}
function _setParentService(service) {
nc = service.nc;
client = service.client;
}
function __resolve(methodName) {
var _local1 = this;
var _local2 = arguments;
if (_local1._allowRes) {
var _local3 = function () {
var _local1 = this;
var _local2 = arguments;
if (_local1.client != null) {
_local2.unshift(new mx.remoting.NetServiceProxyResponder(_local1, methodName));
} else if (typeof(_local2[0].onResult) != "function") {
mx.remoting.NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, and no responder was given in call to " + methodName);
_local2.unshift(new mx.remoting.NetServiceProxyResponder(_local1, methodName));
}
if (typeof(_local1.serviceName) == "function") {
_local1.serviceName = _local1.servicename;
}
_local2.unshift((_local1.serviceName + ".") + methodName);
return(_local1.nc.call.apply(_local1.nc, _local2));
};
return(_local3);
}
return(null);
}
static function registerNetServiceProxy() {
Object.registerClass("NetServiceProxy", mx.remoting.NetServiceProxy);
return(true);
}
static var init = registerNetServiceProxy();
var _allowRes = false;
}
Symbol 11 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange{}
Symbol 12 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData{}
Symbol 13 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList{}
Symbol 14 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
var _local3 = queue;
if (_local3 != undefined) {
var l = _local3.length;
var _local1;
_local1 = 0;
while (_local1 < l) {
var _local2 = _local3[_local1];
if (_local2 == handler) {
_local3.splice(_local1, 1);
return;
}
_local1++;
}
}
}
static function initialize(object) {
var _local1 = object;
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
_local1.addEventListener = _fEventDispatcher.addEventListener;
_local1.removeEventListener = _fEventDispatcher.removeEventListener;
_local1.dispatchEvent = _fEventDispatcher.dispatchEvent;
_local1.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local2 = eventObj;
var queueName = ("__q_" + _local2.type);
var queue = queueObj[queueName];
if (queue != undefined) {
var i;
for (i in queue) {
var _local1 = queue[i];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(_local2);
}
if (_local1[_local2.type] != undefined) {
if (exceptions[_local2.type] == undefined) {
_local1[_local2.type](_local2);
}
}
} else {
_local1.apply(queueObj, [_local2]);
}
}
}
}
function dispatchEvent(eventObj) {
var _local1 = eventObj;
var _local2 = this;
if (_local1.target == undefined) {
_local1.target = _local2;
}
_local2[_local1.type + "Handler"](_local1);
_local2.dispatchQueue(_local2, _local1);
}
function addEventListener(event, handler) {
var _local2 = this;
var _local1 = "__q_" + event;
if (_local2[_local1] == undefined) {
_local2[_local1] = new Array();
}
_global.ASSetPropFlags(_local2, _local1, 1);
_removeEventListener(_local2[_local1], event, handler);
_local2[_local1].push(handler);
}
function removeEventListener(event, handler) {
var _local1 = "__q_" + event;
_removeEventListener(this[_local1], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = ["move", "draw"];
}
Symbol 15 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
var _local1 = this;
var _local2 = level;
if (_local2 == undefined) {
_local2 = BRIEF;
}
if (_local2 <= _local1.level) {
if (_local2 == DEBUG) {
_local1.onLog((((_local1.getDateString() + " [DEBUG] ") + _local1.name) + ": ") + msg);
} else {
_local1.onLog((((_local1.getDateString() + " [INFO] ") + _local1.name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
trace(message);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 16 MovieClip [__Packages.mx.remoting.NetServices] Frame 0
class mx.remoting.NetServices extends Object
{
static var defaultGatewayUrl, logger, traceNetServices;
function NetServices () {
super();
}
static function setDefaultGatewayUrl(url) {
defaultGatewayUrl = url;
}
static function setGatewayUrl(url) {
gatewayUrl = url;
}
static function createGatewayConnection(url, infoLogger) {
var _local1 = url;
logger = infoLogger;
if (_local1 == undefined) {
_local1 = gatewayUrl;
if (_local1 == undefined) {
_local1 = defaultGatewayUrl;
}
}
if (_local1 == undefined) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is undefined");
logger.logInfo(("NetServices: createGatewayConnection - gateway url <" + _local1) + "> is undefined", mx.services.Log.DEBUG);
return(null);
}
var _local2 = new mx.remoting.Connection();
_local2.connect(_local1);
__sharedConnections[_local1] = _local2;
return(_local2);
}
static function getConnection(uri) {
return(__sharedConnections[uri]);
}
static function getHostUrl() {
var _local2 = _root;
if (!isHttpUrl(_local2._url)) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
var _local1 = _local2._url.indexOf("/", 8);
if (_local1 < 0) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
return(_local2._url.substring(0, _local1));
}
static function isHttpUrl(url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
static function getHttpUrl(url) {
var _local1 = url;
if (!isHttpUrl(_local1)) {
_local1 = getHostUrl() + _local1;
}
return(_local1);
}
static function trace(who, severity, number, message) {
traceNetServices(who, severity, number, message);
}
static var version = "1.2.0.124";
static var gatewayUrl = _root.gatewayUrl;
static var __sharedConnections = new Array();
}
Symbol 17 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator{}
Symbol 18 MovieClip [__Packages.mx.remoting.RecordSet] Frame 0
class mx.remoting.RecordSet extends Object
{
var mTitles, _items, mRecordSetID, dispatchEvent, gateway_conn, mDataFetcher;
function RecordSet (columnNames) {
var _local1 = this;
super();
mx.events.EventDispatcher.initialize(_local1);
_local1._items = new Array();
_local1.uniqueID = 0;
if (_local1.mTitles != null) {
} else {
if (_local1.serverInfo == null) {
if (_local1.serverinfo != null) {
_local1.serverInfo = _local1.serverinfo;
}
}
if (_local1.serverInfo == null) {
_local1.mTitles = columnNames;
} else if (_local1.serverInfo.version != 1) {
mx.remoting.NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
} else {
_local1.mTitles = _local1.serverInfo.columnNames;
_local1.mRecordsAvailable = 0;
_local1.setData(((_local1.serverInfo.cursor == null) ? 0 : (_local1.serverInfo.cursor - 1)), _local1.serverInfo.initialData);
if (_local1.serverInfo.initialData.length != _local1.serverInfo.totalCount) {
_local1.mRecordSetID = _local1.serverInfo.id;
if (_local1.mRecordSetID != null) {
_local1.serviceName = ((_local1.serverInfo.serviceName == null) ? "RecordSet" : (_local1.serverInfo.serviceName));
_local1.mTotalCount = _local1.serverInfo.totalCount;
_local1.mDeliveryMode = "ondemand";
_local1.mAllNotified = false;
_local1.mOutstandingRecordCount = 0;
} else {
mx.remoting.NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
_local1.serverInfo = null;
}
}
}
function addItem(item) {
addItemAt(length, item);
}
function addItemAt(index, item) {
var _local1 = index;
var _local2 = this;
var _local3 = true;
if ((_local1 < _local2.__get__length()) && (_local1 >= 0)) {
_local2.items.splice(_local1, 0, item);
} else if (_local1 == _local2.__get__length()) {
_local2.items[_local1] = item;
} else {
_local3 = false;
mx.remoting.NetServices.trace("Cannot add an item outside the bounds of the RecordSet");
return;
}
if (_local3) {
item.__ID__ = _local2.uniqueID++;
}
_local2.updateViews("addItems", _local1, _local1);
}
function addEventListener(event, listener) {
}
function clear() {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
var _local2 = _local1.items.length;
_local1.items.splice(0);
_local1.uniqueID = 0;
_local1.updateViews("removeItems", 0, _local2);
}
}
function contains(itmToCheck) {
var _local2 = itmToCheck;
if (isObjectEmpty(_local2)) {
return(false);
}
var itemAtIndex;
var _local3;
var _local1 = 0;
while (_local1 < items.length) {
itemAtIndex = items[_local1];
_local3 = true;
for (var t in _local2) {
if (_local2[t] != itemAtIndex[t]) {
_local3 = false;
break;
}
}
if (_local3) {
return(true);
}
_local1++;
}
return(false);
}
function getColumnNames() {
return(mTitles);
}
function get columnNames() {
return(getColumnNames());
}
function getLocalLength() {
return(items.length);
}
function getLength() {
var _local1 = this;
if (_local1.mRecordSetID != null) {
return(_local1.mTotalCount);
}
return(_local1.items.length);
}
function getIterator() {
var _local1 = new mx.remoting.RecordSetIterator(this);
return(_local1);
}
function get length() {
return(getLength());
}
function getItemAt(index) {
var _local1 = index;
var _local2 = this;
if ((_local1 < 0) || (_local1 >= _local2.__get__length())) {
return(null);
}
if (_local2.mRecordSetID == null) {
return(_local2.items[_local1]);
}
_local2.requestRecord(_local1);
var _local3 = _local2.items[_local1];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
}
function getItemID(index) {
return(items[index].__ID__);
}
function get items() {
return(_items);
}
function initialize(info) {
}
function filter(filterFunction, context) {
if (checkLocal()) {
} else {
var _local3 = new mx.remoting.RecordSet(mTitles);
var rcount = length;
var _local2 = 0;
while (_local2 < rcount) {
var _local1 = getItemAt(_local2);
if (((_local1 != null) && (_local1 != 1)) && (filterFunction(_local1, context))) {
_local3.addItem(_local1);
}
_local2++;
}
return(_local3);
}
return(undefined);
}
function sortItems(compareFunc, optionFlags) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
_local1.items.sort(compareFunc, optionFlags);
_local1.updateViews("sort");
}
}
function sortItemsBy(fieldNames, order, optionFlags) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
if (typeof(order) == "string") {
_local1.items.sortOn(fieldNames);
if (order.toUpperCase() == "DESC") {
_local1.items.reverse();
}
} else {
_local1.items.sortOn(fieldNames, optionFlags);
}
_local1.updateViews("sort");
}
}
function sort(compareFunc) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
_local1.items.sort(compareFunc);
_local1.updateViews("sort");
}
}
function isEmpty() {
return(items.length == 0);
}
function isLocal() {
return(mRecordSetID == null);
}
function isFullyPopulated() {
return(isLocal());
}
function getRemoteLength() {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.mRecordsAvailable);
}
return(_local1.mTotalCount);
}
function getNumberAvailable() {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.getLength());
}
return(_local1.mRecordsAvailable);
}
function replaceItemAt(index, item) {
var _local1 = index;
var _local2 = this;
if ((_local1 >= 0) && (_local1 <= _local2.__get__length())) {
var _local3 = _local2.getItemID(_local1);
_local2.items[_local1] = item;
_local2.items[_local1].__ID__ = _local3;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function removeAll() {
clear();
}
function removeItemAt(index) {
var _local1 = index;
var _local2 = this;
var _local3 = _local2._items[_local1];
_local2._items.splice(_local1, 1);
var rItems = [_local2._items[_local1]];
var rIDs = [_local2.getItemID(_local1)];
_local2.dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local1, lastItem:_local1, removedItems:rItems, removedIDs:rIDs});
return(_local3);
}
function removeEventListener(event, listener) {
}
function requestRange(range) {
var _local1 = range.getStart();
var _local2 = range.getEnd();
return(internalRequestRange(_local1, _local2));
}
function setDeliveryMode(mode, pagesize, numPrefetchPages) {
var _local1 = this;
var _local2 = pagesize;
var _local3 = numPrefetchPages;
_local1.mDeliveryMode = mode.toLowerCase();
_local1.stopFetchAll();
if ((_local2 == null) || (_local2 <= 0)) {
_local2 = 25;
}
switch (_local1.mDeliveryMode) {
case "ondemand" :
return;
case "page" :
if (_local3 == null) {
_local3 = 0;
}
_local1.mPageSize = _local2;
_local1.mNumPrefetchPages = _local3;
return;
case "fetchall" :
_local1.stopFetchAll();
_local1.startFetchAll(_local2);
return;
default :
mx.remoting.NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
}
function editField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function getEditingData(index, fieldName) {
return(items[index][fieldName]);
}
function setField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function changeFieldValue(index, fieldName, value) {
var _local1 = index;
var _local2 = this;
if (_local2.checkLocal()) {
} else if ((_local1 < 0) || (_local1 >= _local2.getLength())) {
} else {
_local2.items[_local1][fieldName] = value;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function isObjectEmpty(objToCheck) {
var _local2 = objToCheck;
var _local1 = true;
for (var _local3 in _local2) {
_local1 = false;
return(_local1);
}
return(_local1);
}
function arrayToObject(anArray) {
if (mTitles == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local3 = new Object();
var alen = anArray.length;
var _local2;
var _local1 = 0;
while (_local1 < alen) {
_local2 = mTitles[_local1];
if (_local2 == null) {
_local2 = ("column" + _local1) + 1;
}
_local3[_local2] = anArray[_local1];
_local1++;
}
return(_local3);
}
function checkLocal() {
if (isLocal()) {
return(false);
}
mx.remoting.NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(true);
}
function getRecordSetService() {
var _local1 = this;
if (_local1.mRecordSetService == null) {
if (_local1.gateway_conn == null) {
_local1.gateway_conn = mx.remoting.NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
_local1.gateway_conn = _local1.gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
_local1.gateway_conn.setupRecordSet();
_local1.gateway_conn.setDebugId("RecordSet " + _local1.mRecordSetID);
}
_local1.mRecordSetService = _local1.gateway_conn.getService(_local1.serviceName, _local1);
if (_local1.mRecordSetService == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
_local1.mRecordSetService = null;
}
}
return(_local1.mRecordSetService);
}
function internalRequestRange(index, lastIndex) {
var _local1 = index;
var _local2 = this;
var highestRequested = -1;
if (_local1 < 0) {
_local1 = 0;
}
if (lastIndex >= _local2.getRemoteLength()) {
lastIndex = _local2.getRemoteLength() - 1;
}
var _local3;
var last;
while (_local1 <= lastIndex) {
while ((_local1 <= lastIndex) && (_local2.items[_local1] != null)) {
_local1++;
}
_local3 = _local1;
while ((_local1 <= lastIndex) && (_local2.items[_local1] == null)) {
_local2.mOutstandingRecordCount++;
_local2.items[_local1] = 1;
_local1++;
}
last = _local1 - 1;
if (_local3 <= last) {
_local2.logger.logInfo((((" Fetching records from index [" + _local3) + "] to index [") + last) + "]");
_local2.getRecordSetService().getRecords(_local2.mRecordSetID, _local3 + 1, (last - _local3) + 1);
highestRequested = last;
_local2.updateViews("fetchRows", _local3, last);
}
}
return(highestRequested);
}
function removeItems(index, len) {
var _local3 = index;
var _local2 = new Array();
var _local1 = 0;
while (_local1 < len) {
_local2.push(getItemID(_local3 + _local1));
_local1++;
}
var oldItems = items.splice(_local3, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local3, lastItem:(_local3 + len) - 1, removedItems:oldItems, removedIDs:_local2});
}
function getRecords_Result(info) {
var _local1 = this;
var _local2 = info;
_local1.setData(_local2.Cursor - 1, _local2.Page);
_local1.mOutstandingRecordCount = _local1.mOutstandingRecordCount - _local2.Page.length;
_local1.updateViews("updateItems", _local2.Cursor - 1, ((_local2.Cursor - 1) + _local2.Page.length) - 1);
if ((_local1.mRecordsAvailable == _local1.mTotalCount) && (!_local1.mAllNotified)) {
_local1.updateViews("allRows");
_local1.mRecordSetService.release();
_local1.mAllNotified = true;
_local1.mRecordSetID = null;
_local1.mRecordSetService = null;
}
}
function release_Result() {
}
function requestOneRecord(index) {
var _local1 = this;
var _local2 = index;
if (_local1.items[_local2] == null) {
if (_local1.mDeliveryMode == "ondemand") {
_local1.logger.logInfo((" INFO: Fetching Record [" + _local2) + "]");
}
_local1.getRecordSetService().getRecords(_local1.mRecordSetID, _local2 + 1, 1);
_local1.mOutstandingRecordCount++;
_local1.items[_local2] = 1;
_local1.updateViews("fetchRows", _local2, _local2);
}
}
function requestRecord(index) {
var _local1 = this;
if (_local1.mDeliveryMode != "page") {
_local1.requestOneRecord(index);
} else {
var _local2 = int(index / _local1.mPageSize) * _local1.mPageSize;
var _local3 = (_local2 + (_local1.mPageSize * (_local1.mNumPrefetchPages + 1))) - 1;
_local1.internalRequestRange(_local2, _local3);
}
}
function _setParentService(service) {
gateway_conn = service.nc;
}
function setData(start, dataArray) {
var _local1 = this;
var datalen = dataArray.length;
var _local3;
var rec;
var _local2 = 0;
while (_local2 < datalen) {
_local3 = _local2 + start;
rec = _local1.items[_local3];
if ((rec != null) && (rec != 1)) {
mx.remoting.NetServices.trace("RecordSet", "warning", 106, "Already got record # " + _local3);
} else {
_local1.mRecordsAvailable = _local1.mRecordsAvailable + 1;
}
_local1.items[_local3] = _local1.arrayToObject(dataArray[_local2]);
_local1.items[_local3].__ID__ = _local1.uniqueID++;
_local2++;
}
}
function startFetchAll(pagesize) {
var _local1 = this;
if (_local1.mDataFetcher != null) {
_local1.mDataFetcher.disable();
}
_local1.mDataFetcher = new mx.remoting.RsDataFetcher(_local1, pagesize);
}
function stopFetchAll() {
mDataFetcher.disable();
mDataFetcher = null;
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static function registerRecordSet() {
Object.registerClass("RecordSet", mx.remoting.RecordSet);
return(true);
}
static var version = "1.2.0.124";
static var init = registerRecordSet();
}
Symbol 19 MovieClip [__Packages.mx.remoting.RecordSetIterator] Frame 0
class mx.remoting.RecordSetIterator
{
var _recordSet, _cursor;
function RecordSetIterator (rec) {
_recordSet = rec;
_cursor = 0;
}
function hasNext() {
return(_cursor < _recordSet.getLength());
}
function next() {
return(_recordSet.getItemAt(_cursor++));
}
static var version = "1.2.0.124";
}
Symbol 20 MovieClip [__Packages.mx.remoting.RsDataRange] Frame 0
class mx.remoting.RsDataRange extends Object
{
var _start, _end;
function RsDataRange (s, e) {
super();
_start = s;
_end = e;
}
function getStart() {
return(_start);
}
function getEnd() {
return(_end);
}
function setEnd(e) {
_end = e;
}
function setStart(s) {
_start = s;
}
}
Symbol 21 MovieClip [__Packages.mx.remoting.RsDataFetcher] Frame 0
class mx.remoting.RsDataFetcher extends Object
{
var mEnabled;
function RsDataFetcher (pgRS, increment) {
var _local1 = this;
super();
_local1.mRecordSet = pgRS;
_local1.mRecordSet.addEventListener("modelChanged", _local1);
_local1.mIncrement = increment;
_local1.mNextRecord = 0;
_local1.mEnabled = true;
_local1.doNext();
}
function disable() {
mEnabled = false;
}
function doNext() {
var _local1 = this;
if (_local1.mEnabled) {
do {
if (_local1.mNextRecord >= _local1.mRecordSet.getRemoteLength()) {
return;
}
var _local2 = new mx.remoting.RsDataRange(_local1.mNextRecord, (_local1.mNextRecord + _local1.mIncrement) - 1);
_local1.mHighestRequested = _local1.mRecordSet.requestRange(_local2);
_local1.mNextRecord = _local1.mNextRecord + _local1.mIncrement;
} while (_local1.mHighestRequested <= 0);
}
}
function modelChanged(eventObj) {
var _local1 = this;
var _local2 = eventObj;
if (((_local2.eventName == "updateItems") && (_local2.firstItem <= _local1.mHighestRequested)) && (_local2.lastItem >= _local1.mHighestRequested)) {
_local1.doNext();
}
if (_local2.eventName == "allRows") {
_local1.disable();
}
}
}
Symbol 22 MovieClip [__Packages.mx.remoting.NetServiceProxyResponder] Frame 0
class mx.remoting.NetServiceProxyResponder extends Object
{
var service, methodName;
function NetServiceProxyResponder (serv, method) {
super();
service = serv;
methodName = method;
}
function onResult(result) {
var _local2 = result;
var _local1 = service.client;
if ((_local2 instanceof mx.remoting.NetServiceProxy) || (_local2 instanceof mx.remoting.RecordSet)) {
_local2._setParentService(service);
}
var _local3 = methodName + "_Result";
if (typeof(_local1[_local3]) == "function") {
_local1[_local3].apply(_local1, [_local2]);
} else if (typeof(_local1.onResult) == "function") {
_local1.onResult(_local2);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + _local2);
}
}
function onStatus(result) {
var _local2 = result;
var _local1 = service.client;
var _local3 = methodName + "_Status";
if (typeof(_local1[_local3]) == "function") {
_local1[_local3].apply(_local1, [_local2]);
} else if (typeof(_local1.onStatus) == "function") {
_local1.onStatus(_local2);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(_local2);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(_local2);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 2, (((_local3 + " was received from server: <") + _local2.level) + "> ") + _local2.description);
}
}
}
Symbol 23 MovieClip [__Packages.mx.remoting.debug.NetDebugConfig] Frame 0
class mx.remoting.debug.NetDebugConfig extends Object
{
function NetDebugConfig () {
super();
Object.registerClass("NetDebugConfig", mx.remoting.debug.NetDebugConfig);
}
static function getNetDebugVersion() {
return(1);
}
static function attachNetDebugConfigFunctions(ndc) {
var _local1 = ndc;
_local1.setDebug = function (setval) {
this.m_debug = setval;
};
_local1.getDebug = function () {
return(this.m_debug);
};
for (var _local2 in _local1) {
if (typeof(_local1[_local2]) == "object") {
attachNetDebugConfigFunctions(_local1[_local2]);
}
}
return(null);
}
static function getDefaultNetDebugConfig(isController) {
var _local1 = _global;
if (_local1.netDebugConfigSO == undefined) {
var _local2 = "TestMovie_Config_Info";
if (isController) {
_local2 = "Controller_Config_Info";
}
_local1.netDebugConfigSO = SharedObject.getLocal(_local2);
}
if (_local1.netDebugConfigSO.data.config == undefined) {
_local1.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_local1.netDebugConfigSO.flush();
return(_local1.netDebugConfigSO.data.config);
}
static function getRealDefaultNetDebugConfig() {
var _local1 = new mx.remoting.debug.NetDebugConfig();
_local1.m_debug = true;
_local1.client = new mx.remoting.debug.NetDebugConfig();
_local1.client.m_debug = true;
_local1.client.trace = true;
_local1.client.recordset = true;
_local1.client.http = true;
_local1.client.rtmp = true;
_local1.realtime_server = new mx.remoting.debug.NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new mx.remoting.debug.NetDebugConfig();
_local1.app_server.m_debug = true;
_local1.app_server.trace = true;
_local1.app_server.error = true;
_local1.app_server.recordset = true;
_local1.app_server.httpheaders = false;
_local1.app_server.amf = false;
_local1.app_server.amfheaders = false;
_local1.app_server.coldfusion = true;
return(_local1);
}
}
Symbol 24 MovieClip [__Packages.mx.utils.ObjectCopy] Frame 0
class mx.utils.ObjectCopy
{
function ObjectCopy () {
}
static function copy(refObj) {
var _local1 = new Function(refObj.__proto__.constructor)();
copyProperties(_local1, refObj);
return(_local1);
}
static function copyProperties(dstObj, srcObj) {
var _local2 = srcObj;
var to;
for (var i in _local2) {
to = typeof(_local2[i]);
if (to != "function") {
if (to == "object") {
if (_local2[i] instanceof Array) {
var p = new Array();
var _local3 = _local2[i];
var _local1 = 0;
while (_local1 < _local3.length) {
p[_local1] = _local3[_local1];
_local1++;
}
dstObj[i] = p;
} else if (_local2[i] instanceof String) {
dstObj[i] = new String(_local2[i]);
} else if (_local2[i] instanceof Number) {
dstObj[i] = new Number(_local2[i]);
} else if (_local2[i] instanceof Boolean) {
dstObj[i] = new Boolean(_local2[i]);
} else {
dstObj[i] = copy(_local2[i]);
}
} else {
dstObj[i] = _local2[i];
}
}
}
}
}
Symbol 25 MovieClip [__Packages.mx.remoting.debug.events.NetDebug] Frame 0
class mx.remoting.debug.events.NetDebug extends Object
{
var date, time;
function NetDebug () {
super();
init();
}
function init() {
var _local1 = this;
_local1.eventType = "DebugEvent";
_local1.source = "Client";
_local1.movieUrl = unescape(_root._url);
_local1.initDate();
}
function initDate() {
var _local1 = new Date();
date = _local1;
time = _local1.getTime();
}
}
Symbol 26 MovieClip [__Packages.mx.remoting.debug.events.NetDebugNetConnection] Frame 0
class mx.remoting.debug.events.NetDebugNetConnection extends mx.remoting.debug.events.NetDebug
{
function NetDebugNetConnection () {
super();
}
}
Symbol 27 MovieClip [__Packages.mx.remoting.debug.events.NetDebugConnect] Frame 0
class mx.remoting.debug.events.NetDebugConnect extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugConnect (args) {
var _local1 = args;
var _local2 = this;
super();
_local2.eventType = "Connect";
_local2.connectString = _local1[0];
if (_local1[1] != null) {
_local2.userName = _local1[1];
}
if (_local1[2] != null) {
_local2.password = _local1[2];
}
}
}
Symbol 28 MovieClip [__Packages.mx.remoting.debug.commands.Local] Frame 0
class mx.remoting.debug.commands.Local extends Object
{
var command, data;
function Local () {
super();
}
function init(commandname, dataobj) {
command = commandname;
data = dataobj;
}
}
Symbol 29 MovieClip [__Packages.mx.remoting.debug.commands.StartRTMPTrace] Frame 0
class mx.remoting.debug.commands.StartRTMPTrace extends mx.remoting.debug.commands.Local
{
var init;
function StartRTMPTrace (cs) {
super();
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
init("startRealTimeTrace", _local1);
}
}
Symbol 30 MovieClip [__Packages.mx.remoting.debug.ConnectionMixin] Frame 0
class mx.remoting.debug.ConnectionMixin extends Object
{
var _protocol, _id, _config;
function ConnectionMixin () {
super();
}
static function initialize() {
var _local1 = mx.remoting.Connection.prototype;
var _local2 = mx.remoting.debug.ConnectionMixin.prototype;
if (!_local1.netDebugProxyFunctions) {
_local1.netDebugProxyFunctions = true;
_local1.realConnect = _local1.connect;
_local1.realCall = _local1.call;
_local1.realClose = _local1.close;
_local1.realAddHeader = _local1.addHeader;
_local1.connect = _local2.netDebugProxyConnect;
_local1.call = _local2.netDebugProxyCall;
_local1.close = _local2.netDebugProxyClose;
_local1.addHeader = _local2.netDebugProxyAddHeader;
_local1.attachDebug = _local2.attachDebug;
_local1.sendDebugEvent = _local2.sendDebugEvent;
_local1.sendServerEvent = _local2.sendServerEvent;
_local1.sendClientEvent = _local2.sendClientEvent;
_local1.addNetDebugHeader = _local2.addNetDebugHeader;
_local1.updateConfig = _local2.updateConfig;
_local1.getNetDebug = _local2.getNetDebug;
_local1.isRealTime = _local2.isRealTime;
_local1.setupRecordSet = _local2.setupRecordSet;
_local1.setDebugId = _local2.setDebugId;
_local1.getDebugId = _local2.getDebugId;
_local1.getDebugConfig = _local2.getDebugConfig;
_local1.trace = _local2.trace;
return(true);
}
return(false);
}
function attachDebug() {
var _local1 = this;
if (!_attached) {
_attached = true;
_local1._headerAdded = false;
_local1._configured = false;
_local1._config = new mx.remoting.debug.NetDebugConfig();
mx.utils.ObjectCopy.copyProperties(_local1._config, _local1.getNetDebug().getConfig());
_local1._protocol = "none";
_local1._id = String(_local1.getNetDebug().addNetConnection(_local1));
}
}
function sendDebugEvent(eventobj) {
var _local1 = this;
var _local2 = eventobj;
_local2.protocol = _local1._protocol;
_local2.debugId = _local1._id;
return(_local1.getNetDebug().onEvent(_local2));
}
function sendServerEvent(eventobj) {
eventobj.movieUrl = unescape(_root._url);
if (!sendDebugEvent(eventobj)) {
}
}
function sendClientEvent(eventobj) {
var _local1 = this;
if (_local1._config.m_debug && (_local1._config.client.m_debug)) {
if ((_local1._config.client.http && (_local1._protocol == "http")) || (_local1._config.client.rtmp && (_local1._protocol.substr(0, 4) == "rtmp"))) {
if (!_local1.sendDebugEvent(eventobj)) {
}
}
}
}
function addNetDebugHeader() {
var _local1 = this;
if (!_local1._headerAdded) {
_local1._headerAdded = true;
if ((_local1._config.m_debug && (_local1._config.app_server.m_debug)) && (_local1._protocol == "http")) {
_local1.realAddHeader("amf_server_debug", true, _local1._config.app_server);
} else {
_local1.realAddHeader("amf_server_debug", true, undefined);
}
}
}
function updateConfig(config) {
var _local1 = this;
var _local2 = config;
_local1.attachDebug();
if ((_local2 == null) && (!_local1._configured)) {
_local1._configured = true;
_local2 = mx.remoting.debug.NetDebugConfig.getRealDefaultNetDebugConfig();
}
mx.utils.ObjectCopy.copyProperties(_local1._config, _local2);
_local1._headerAdded = false;
}
function isRealTime() {
return(_protocol.substr(0, 4) == "rtmp");
}
function setupRecordSet() {
var _local1 = this;
_local1.attachDebug();
_local1._config.client.http = _local1._config.client.recordset;
}
function netDebugProxyConnect() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
var _local3 = _local2[0].substr(0, 4);
if ((_local3 == "http") || (_local3.substr(0, 4) == "rtmp")) {
if (_local2[0].charAt(4) == ":") {
_local1._protocol = _local3;
} else {
_local1._protocol = _local2[0].substr(0, 5);
}
} else {
_local1._protocol = "http";
}
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugConnect(_local2));
if (_local1.isRealTime()) {
_local1._connectString = _local2[0];
_local1.getNetDebug().sendCommand(new mx.remoting.debug.commands.StartRTMPTrace(_local2[0]));
var ret = _local1.realConnect.apply(_local1, _local2);
_local1.realCall("@getClientID", new mx.remoting.RTMPClientIDResponse(_local2[0], _local1));
return(ret);
}
return(Boolean(_local1.realConnect.apply(_local1, _local2)));
}
function netDebugProxyCall() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugCall(_local2));
_local1.addNetDebugHeader();
if (_local1._config.app_server) {
_local2[1] = new mx.remoting.debug.NetDebugResponseProxy(_local1, _local2[1]);
return(Boolean(_local1.realCall.apply(_local1, _local2)));
}
return(Boolean(_local1.realCall.apply(_local1, _local2)));
}
function netDebugProxyClose() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugClose());
if (_local1.isRealTime()) {
_local1.getNetDebug().sendCommand(new mx.remoting.debug.commands.StopRTMPTrace(_local1._connectString, _local1._clientId));
}
var _local2 = _local1.realClose();
_local1.getNetDebug().removeNetConnection(_local1);
return(_local2);
}
function netDebugProxyAddHeader() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugAddHeader(arguments));
return(Boolean(_local1.realAddHeader.apply(_local1, arguments)));
}
function setDebugId(id) {
attachDebug();
_id = id;
}
function getDebugId() {
attachDebug();
return(_id);
}
function trace(traceobj) {
var _local1 = this;
_local1.attachDebug();
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTrace(traceobj));
}
}
function getDebugConfig() {
attachDebug();
return(_config);
}
function getNetDebug() {
return(mx.remoting.debug.NetDebug.getNetDebug());
}
static var _attached = false;
}
Symbol 31 MovieClip [__Packages.mx.remoting.debug.events.NetDebugDuplicateNCDError] Frame 0
class mx.remoting.debug.events.NetDebugDuplicateNCDError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugDuplicateNCDError () {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.message = "NCD_ALREADY_RUNNING";
}
}
Symbol 32 MovieClip [__Packages.mx.remoting.debug.GlobalLocalConnection] Frame 0
class mx.remoting.debug.GlobalLocalConnection extends Object
{
var sendPrefix;
function GlobalLocalConnection (isController, receiver, domainName) {
var _local2 = this;
var _local3 = _global;
super();
_local2.maxConnections = 10;
var sToMovie = "_NetDebugLocalToDebugMovie";
var sToController = "_NetDebugLocalToController";
var connectname = null;
if (isController) {
connectname = sToController;
_local2.sendNames = new Array();
_local2.sendNames.push(sToMovie);
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
_local2.sendNames.push(sToMovie + _local1);
_local1++;
}
_local2.maxConnections = 0;
} else {
connectname = sToMovie;
_local2.sendNames = new Array();
_local2.sendNames.push(sToController);
}
_local2.setDomainName(domainName);
if (_local3.g_NetDebugLocalConnection == undefined) {
_local3.g_NetDebugLocalConnection = new LocalConnection();
_local3.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_local3.g_NetDebugLocalConnection.m_Receiver = receiver;
_local3.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_local3.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_local3.g_NetDebugLocalConnection.connect(connectname)) {
var connected = false;
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
if (_local3.g_NetDebugLocalConnection.connect(connectname + _local1)) {
connected = true;
break;
}
_local1++;
}
if (!connected) {
if (isController) {
receiver.onReceiveError(new mx.remoting.debug.events.NetDebugDuplicateNCDError());
}
}
}
}
}
function setDomainName(domainName) {
var _local1 = domainName;
if ((_local1 != null) && (_local1 != "")) {
sendPrefix = _local1 + ":";
} else {
sendPrefix = "";
}
}
function send(dataobj) {
return(sendRaw("onData", dataobj));
}
function sendCommand(commandObj) {
return(sendRaw("onCommand", commandObj));
}
function sendRaw(functionName, obj) {
var _local3 = this;
var _local2 = true;
var snlen = _local3.sendNames.length;
var _local1 = 0;
while (_local1 < snlen) {
_local2 = Boolean(_local2 & _global.g_NetDebugLocalConnection.send(_local3.sendPrefix + _local3.sendNames[_local1], functionName, obj));
_local1++;
}
return(_local2);
}
}
Symbol 33 MovieClip [__Packages.mx.remoting.debug.commands.GetConfig] Frame 0
class mx.remoting.debug.commands.GetConfig extends mx.remoting.debug.commands.Local
{
var init;
function GetConfig () {
super();
}
function GetConfigCommand() {
super();
init("getConfig", null);
}
}
Symbol 34 MovieClip [__Packages.mx.remoting.debug.events.NetDebugFailedSendError] Frame 0
class mx.remoting.debug.events.NetDebugFailedSendError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugFailedSendError (ev) {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.originalEvent = ev;
_local1.message = "NCD_FAILED_TO_SEND_EVENT";
}
}
Symbol 35 MovieClip [__Packages.mx.remoting.debug.events.NetDebugStatus] Frame 0
class mx.remoting.debug.events.NetDebugStatus extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType, status;
function NetDebugStatus (statusobj) {
super();
eventType = "Status";
status = statusobj;
}
}
Symbol 36 MovieClip [__Packages.mx.remoting.debug.events.NetDebugError] Frame 0
class mx.remoting.debug.events.NetDebugError extends mx.remoting.debug.events.NetDebug
{
var eventType, error;
function NetDebugError (dataobj) {
super();
eventType = "NetDebugError";
error = dataobj;
}
}
Symbol 37 MovieClip [__Packages.mx.remoting.debug.events.NetDebugTraceNetServices] Frame 0
class mx.remoting.debug.events.NetDebugTraceNetServices extends mx.remoting.debug.events.NetDebug
{
function NetDebugTraceNetServices (w, s, n, m) {
var _local1 = this;
super();
_local1.eventType = "NetServicesTrace";
_local1.trace = m;
_local1.who = w;
_local1.severity = s;
_local1.number = n;
}
}
Symbol 38 MovieClip [__Packages.mx.remoting.debug.events.NetDebugTrace] Frame 0
class mx.remoting.debug.events.NetDebugTrace extends mx.remoting.debug.events.NetDebug
{
var eventType, trace;
function NetDebugTrace (traceobj) {
super();
eventType = "Trace";
trace = traceobj;
}
}
Symbol 39 MovieClip [__Packages.mx.remoting.debug.NetDebug] Frame 0
class mx.remoting.debug.NetDebug extends Object
{
static var ndSingleton;
var _ncs, _nextNewId, _glc, _config;
function NetDebug () {
var _local1 = this;
super();
_local1._ncs = new Array();
_local1._config = mx.remoting.debug.NetDebugConfig.getDefaultNetDebugConfig(false);
_local1._glc = new mx.remoting.debug.GlobalLocalConnection(false, _local1);
_local1._glc.sendCommand(new mx.remoting.debug.commands.GetConfig());
_local1._nextNewId = 0;
if (_global.System.onStatus == undefined) {
_global.System.onStatus = globalOnStatus;
}
mx.remoting.NetServices.traceNetServices = traceNetServices;
}
function addNetConnection(nc) {
_ncs.push(nc);
return(_nextNewId++);
}
function requestNewConfig() {
return(sendCommand(new mx.remoting.debug.commands.GetConfig()));
}
function removeNetConnection(nc) {
var _local2 = this;
var _local3 = _local2._ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (nc == _local2._ncs[_local1]) {
_local2._ncs.splice(_local1, 1);
return;
}
_local1++;
}
}
function sendDebugEvent(eventobj) {
if (!_glc.send(eventobj)) {
_glc.send(new mx.remoting.debug.events.NetDebugFailedSendError(stripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
}
function sendCommand(commandobj) {
return(_glc.sendCommand(commandobj));
}
function updateConfig(config) {
var _local2 = this;
mx.utils.ObjectCopy.copyProperties(_local2._config, config);
var _local3 = _local2._ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (_local2._ncs[_local1] != null) {
_local2._ncs[_local1].updateConfig(config);
}
_local1++;
}
}
function sendStatus(statusobj) {
var _local1 = this;
if (_local1._config.m_debug && (_local1._config.client.m_debug)) {
return(_local1._glc.send(new mx.remoting.debug.events.NetDebugStatus(statusobj)));
}
return(undefined);
}
function onEvent(eventObj) {
return(sendDebugEvent(eventObj));
}
function onEventError(errorObj) {
return(sendDebugEvent(new mx.remoting.debug.events.NetDebugError(errorObj)));
}
function onReceiveCommand(commandobj) {
this[commandobj.command](commandobj.data);
}
function onReceiveError(errorobj) {
sendDebugEvent(new mx.remoting.debug.events.NetDebugError(errorobj));
}
function getConfig() {
return(_config);
}
static function getNetDebug() {
return(ndSingleton);
}
static function trace(obj) {
getNetDebug()._trace(obj);
}
static function traceNetServices(who, severity, number, message) {
getNetDebug()._traceNetServices(who, severity, number, message);
}
static function globalOnStatus(statusobj) {
getNetDebug().sendStatus(statusobj);
}
static function initialize() {
if (ndSingleton == null) {
ndSingleton = new mx.remoting.debug.NetDebug();
mx.remoting.debug.ConnectionMixin.initialize();
}
return(true);
}
static function stripNCDEventToMinmal(ev) {
var _local1 = ev;
var _local2 = new Object();
if (_local1.eventType != null) {
_local2.eventType = _local1.eventType;
}
if (_local1.source != null) {
_local2.source = _local1.source;
}
if (_local1.movieUrl != null) {
_local2.movieUrl = _local1.movieUrl;
}
if (_local1.date != null) {
_local2.date = _local1.date;
}
if (_local1.time != null) {
_local2.time = _local1.time;
}
if (_local1.protocol != null) {
_local2.protocol = _local1.protocol;
}
if (_local1.debugId != null) {
_local2.debugId = _local1.debugId;
}
return(_local2);
}
function _traceNetServices(who, severity, number, message) {
var _local1 = this;
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
if (!_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTraceNetServices(who, severity, number, message))) {
}
}
}
function _trace(traceobj) {
var _local1 = this;
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
if (!_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTrace(traceobj))) {
}
}
}
static var version = "1.2.0.124";
}
Symbol 40 MovieClip [__Packages.mx.remoting.debug.commands.AddRTMPClient] Frame 0
class mx.remoting.debug.commands.AddRTMPClient extends mx.remoting.debug.commands.Local
{
var init;
function AddRTMPClient (cs, cid) {
super();
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
init("addRealTimeClient", _local1);
}
}
Symbol 41 MovieClip [__Packages.mx.remoting.RTMPClientIDResponse] Frame 0
class mx.remoting.RTMPClientIDResponse extends Object
{
var _connectString, _nc;
function RTMPClientIDResponse (cs, nc) {
super();
_connectString = cs;
_nc = nc;
}
function onResult(cid) {
_nc._clientId = cid;
mx.remoting.debug.NetDebug.getNetDebug().sendCommand(new mx.remoting.debug.commands.AddRTMPClient(_connectString, cid));
}
}
Symbol 42 MovieClip [__Packages.mx.remoting.debug.events.NetDebugCall] Frame 0
class mx.remoting.debug.events.NetDebugCall extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugCall (args) {
var _local2 = this;
var _local3 = args;
super();
_local2.eventType = "Call";
_local2.methodName = _local3[0];
_local2.parameters = new Array();
var alen = _local3.length;
var _local1 = 2;
while (_local1 < alen) {
_local2.parameters[_local1 - 2] = _local3[_local1];
_local1++;
}
}
}
Symbol 43 MovieClip [__Packages.mx.remoting.debug.events.NetDebugResult] Frame 0
class mx.remoting.debug.events.NetDebugResult extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType, result;
function NetDebugResult (resultobj) {
super();
eventType = "Result";
result = resultobj;
}
}
Symbol 44 MovieClip [__Packages.mx.remoting.debug.events.NetDebugReceiveCall] Frame 0
class mx.remoting.debug.events.NetDebugReceiveCall extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugReceiveCall (mName, args) {
var _local1 = this;
super();
_local1.eventType = "ReceivedCall";
_local1.methodName = mName;
_local1.parameters = args;
}
}
Symbol 45 MovieClip [__Packages.mx.remoting.debug.NetDebugResponseProxy] Frame 0
class mx.remoting.debug.NetDebugResponseProxy extends Object
{
var _sourceNC, _originalNR;
function NetDebugResponseProxy (source, original) {
super();
_sourceNC = source;
_originalNR = original;
}
function onDebugEvents(debugevents) {
var _local3 = debugevents;
var _local2 = _local3.length;
var _local1 = 0;
while (_local1 < _local2) {
_sourceNC.sendServerEvent(_local3[_local1]);
_local1++;
}
}
function onResult(resultobj) {
_sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugResult(resultobj));
_originalNR.onResult(resultobj);
}
function onStatus(statusobj) {
var _local1 = this;
var _local2 = statusobj;
_local1._sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugStatus(_local2));
if (_local1._originalNR.onStatus != undefined) {
_local1._originalNR.onStatus(_local2);
} else {
_global.System.onStatus(_local2);
}
}
function __resolve(name) {
var _local1 = name;
trace("NetDebugResponseProxy.__resolve name: " + _local1);
_sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugReceiveCall(_local1, arguments));
_originalNR[_local1].apply(arguments);
return(null);
}
}
Symbol 46 MovieClip [__Packages.mx.remoting.debug.events.NetDebugClose] Frame 0
class mx.remoting.debug.events.NetDebugClose extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType;
function NetDebugClose () {
super();
eventType = "Close";
}
}
Symbol 47 MovieClip [__Packages.mx.remoting.debug.commands.StopRTMPTrace] Frame 0
class mx.remoting.debug.commands.StopRTMPTrace extends mx.remoting.debug.commands.Local
{
var init;
function StopRTMPTrace () {
super();
}
function StopRTMPTraceCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
init("stopRealTimeTrace", _local1);
}
}
Symbol 48 MovieClip [__Packages.mx.remoting.debug.events.NetDebugAddHeader] Frame 0
class mx.remoting.debug.events.NetDebugAddHeader extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugAddHeader (args) {
var _local1 = this;
var _local2 = args;
super();
_local1.eventType = "AddHeader";
_local1.headerName = _local2[0];
_local1.mustUnderstand = _local2[1];
if (_local2[2] != null) {
_local1.headerObject = _local2[2];
}
}
}
Symbol 49 MovieClip [__Packages.mx.remoting.debug.events.NetDebugInfoError] Frame 0
class mx.remoting.debug.events.NetDebugInfoError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugInfoError (infoobj, mes) {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.info = infoobj;
if (mes != null) {
_local1.message = mes;
}
}
}
Symbol 50 MovieClip [__Packages.mx.remoting.debug.events.NetDebugRtmpLog] Frame 0
class mx.remoting.debug.events.NetDebugRtmpLog extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugRtmpLog (infoobj) {
var _local1 = this;
super();
_local1.eventType = "Trace";
_local1.source = "Flash Communication Server";
_local1.info = infoobj;
_local1.trace = infoobj.description;
}
}
Symbol 51 MovieClip [__Packages.mx.remoting.debug.commands.UpdateNetDebugConfig] Frame 0
class mx.remoting.debug.commands.UpdateNetDebugConfig extends mx.remoting.debug.commands.Local
{
var init;
function UpdateNetDebugConfig () {
super();
}
function UpdateNetDebugCommand(dataobj) {
super();
init("updateConfig", dataobj);
}
}
Symbol 71 MovieClip [ice] Frame 1
stop();
Symbol 71 MovieClip [ice] Frame 2
stop();
Symbol 71 MovieClip [ice] Frame 3
stop();
Symbol 78 MovieClip Frame 1
stop();
Symbol 118 Button
on (release) {
nextFrame();
play();
}
Symbol 119 Button
on (release) {
_root.changeSec("startcompetition");
}
Symbol 127 MovieClip Frame 41
_root.bottomlinks.gotoAndPlay(2);
stop();
Symbol 127 MovieClip Frame 77
_parent.gotoAndPlay("fade");
Symbol 129 Button
on (rollOver) {
btnd.gotoAndStop(2);
}
on (rollOut) {
btnd.gotoAndStop(3);
}
on (release) {
getURL (_global.AMGcarLink, _blank);
}
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 2
stop();
this.onEnterFrame = function () {
mc._alpha = mc._alpha + ((100 - mc._alpha) / 3);
m = int(mc._x - _xmouse);
mc._x = int(mc._x - (m / 2));
g = int(mc._y - _ymouse);
mc._y = int(mc._y - (g / 2));
};
Symbol 133 MovieClip Frame 3
stop();
this.onEnterFrame = function () {
mc._alpha = mc._alpha + ((-mc._alpha) / 3);
};
Symbol 135 MovieClip Frame 1
_global.currSec = "intro";
Symbol 135 MovieClip Frame 81
stop();
_root.bottomLinks.gotoAndPlay(2);
Symbol 135 MovieClip Frame 82
Symbol 135 MovieClip Frame 90
_global.buttonLock = false;
stop();
_parent.gotoAndStop(_global.nextSec);
Symbol 141 MovieClip Frame 10
stop();
Symbol 142 Button
on (release) {
_root.gotoAndStop("perfectdrift");
}
Symbol 145 Button
on (release) {
_parent.changeSec("startcompetition");
}
Symbol 150 MovieClip Frame 10
stop();
Symbol 151 Button
on (release) {
_root.gotoAndStop("sendtofriend");
}
Symbol 152 Button
on (release) {
_parent.changeSec("sendtofriend");
}
Symbol 157 MovieClip Frame 10
stop();
Symbol 158 Button
on (release) {
_root.gotoAndStop("highscores");
}
Symbol 159 Button
on (release) {
_parent.changeSec("highscores");
}
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 26
stop();
Symbol 167 MovieClip Frame 98
stop();
Symbol 172 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 7
stop();
Symbol 209 MovieClip Frame 40
stop();
Symbol 222 MovieClip Frame 22
stop();
Symbol 226 MovieClip Frame 12
name1 = "Stefan Kosel";
score1 = "67'34''";
stop();
Symbol 257 MovieClip Frame 6
stop();
Symbol 258 Button
on (rollOver) {
_root.playSound("over");
}
on (release) {
function validate(address) {
if (address.length >= 6) {
if (address.indexOf("@") > 0) {
if ((address.indexOf("@") + 2) < address.lastIndexOf(".")) {
if (address.lastIndexOf(".") < (address.length - 2)) {
return(true);
}
}
}
}
return(false);
}
myVars = new LoadVars();
myVars.fName = fName.text;
myVars.fEmail = fEmail.text;
myVars.tName = tName.text;
myVars.tEmail = tEmail.text;
myVars.tMsg = tMsg.text;
if (!validate(tEmail.text)) {
_root.result = "Friends' email is invalid";
} else if (!validate(fEmail.text)) {
_root.result = "Your email is invalid";
} else {
myVars.sendAndLoad(_parent.mailerURL, myVars, "GET");
myVars.onLoad = function (success) {
if (success) {
_root.result = "Email was sent!";
} else {
_root.result = "Ooops, email error...";
}
};
}
}
Symbol 259 Button
on (rollOver) {
_root.playSound("over");
}
on (release) {
_root.changeSec("game");
}
Symbol 260 MovieClip Frame 1
stop();
Symbol 260 MovieClip Frame 2
play();
Symbol 260 MovieClip Frame 106
stop();
Symbol 262 MovieClip Frame 1
_global.currSec = "startcompetition";
Symbol 262 MovieClip Frame 39
_global.buttonLock = false;
startcompetition.gotoAndPlay(2);
stop();
Symbol 262 MovieClip Frame 50
_parent.gotoAndStop(_global.nextSec);
Symbol 275 MovieClip Frame 11
name1 = "Stefan Kosel";
score1 = "67'34''";
stop();
Symbol 281 MovieClip Frame 18
stop();
Symbol 299 Button
on (rollOver) {
_root.playSound("over");
}
on (release) {
function validate(address) {
if (address.length >= 6) {
if (address.indexOf("@") > 0) {
if ((address.indexOf("@") + 2) < address.lastIndexOf(".")) {
if (address.lastIndexOf(".") < (address.length - 2)) {
return(true);
}
}
}
}
return(false);
}
myVars = new LoadVars();
myVars.fName = fName.text;
myVars.fEmail = fEmail.text;
myVars.tName = tName.text;
myVars.tEmail = tEmail.text;
myVars.tMsg = tMsg.text;
NetDebug.trace("send to friend: " + myVars.toString());
if (!validate(tEmail.text)) {
_root.result = "Friends' email is invalid";
} else if (!validate(fEmail.text)) {
_root.result = "Your email is invalid";
} else {
myVars.sendAndLoad(_parent.mailerURL, myVars, "GET");
myVars.onLoad = function (success) {
if (success) {
_root.result = "Email was sent!";
NetDebug.trace("success: " + myVars.toString());
} else {
_root.result = "Ooops, email error...";
NetDebug.trace("fail: " + myVars.toString());
}
};
}
}
Symbol 300 Button
on (release) {
function validate(address) {
if (address.length >= 6) {
if (address.indexOf("@") > 0) {
if ((address.indexOf("@") + 2) < address.lastIndexOf(".")) {
if (address.lastIndexOf(".") < (address.length - 2)) {
return(true);
}
}
}
}
return(false);
}
mx.remoting.debug.NetDebug.initialize();
myVars = new LoadVars();
myVars.senderName = escape(fName.text);
myVars.senderEmail = escape(fEmail.text);
myVars.friendName1 = escape(tName.text);
myVars.friendEmail1 = escape(tEmail.text);
myVars.messageBody = escape(tMsg.text);
myVars.subject = fName.text + " has invited you to a Winter Drift";
mx.remoting.debug.NetDebug.trace(myVars.toString());
var resultFromServer = new LoadVars();
resultFromServer.onLoad = function (success) {
if (success) {
mx.remoting.debug.NetDebug.trace("success!");
mx.remoting.debug.NetDebug.trace(resultFromServer.toString());
} else {
mx.remoting.debug.NetDebug.trace("failed");
mx.remoting.debug.NetDebug.trace(resultFromServer.toString());
}
};
if (!validate(tEmail.text)) {
result.text = "Friends' email is invalid";
} else if (!validate(fEmail.text)) {
result.text = "Your email is invalid";
} else {
myVars.sendAndLoad(_global.sendToFriendURL, resultFromServer, "POST");
thankyou.gotoAndPlay(2);
}
}
Symbol 303 MovieClip Frame 8
stop();
Symbol 305 Button
on (release) {
getURL (_global.MercedesAMGsite, _blank);
}
Symbol 313 MovieClip Frame 8
stop();
Symbol 315 Button
on (release) {
_root.changeSec("startcompetition");
}
Symbol 316 MovieClip Frame 13
stop();
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 62
_parent.gotoAndPlay(2);
Symbol 322 MovieClip Frame 1
mx.remoting.debug.NetDebug.initialize();
stop();
Symbol 322 MovieClip Frame 2
play();
Symbol 322 MovieClip Frame 46
stop();
Symbol 324 MovieClip Frame 1
_global.currSec = "sendtofriend";
Symbol 324 MovieClip Frame 39
_global.buttonLock = false;
form.gotoAndPlay(2);
stop();
Symbol 324 MovieClip Frame 50
_parent.gotoAndStop(_global.nextSec);
Symbol 375 MovieClip Frame 42
function parseXML(success) {
if (success) {
_ob.rank = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(_xml, "//rank/text()");
_ob.racename = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(_xml, "//racename/text()");
_ob.country = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(_xml, "//country/text()");
_ob.score = com.xfactorstudio.xml.xpath.XPath.selectNodesAsString(_xml, "//score/text()");
var _local9 = _ob.racename.toString();
var _local4 = _local9.split(",");
var _local7 = _ob.country.toString();
var _local6 = _local7.split(",");
var _local8 = _ob.score.toString();
var _local5 = _local8.split(",");
_global.lowScore = _local5[_local5.length - 1];
var _local3 = 0;
while (_local3 < _local4.length) {
this["name" + _local3].text = _local4[_local3];
this["country" + _local3].text = _local6[_local3];
this["score" + _local3].text = _local5[_local3];
_local3++;
}
} else {
name0.text = "High-Scores unavailable...";
trace("Can't load XML");
}
}
function init() {
_xml.onLoad = mx.utils.Delegate.create(this, parseXML);
_xml.load(_global.HighScoreXML);
}
stop();
var _xml = new XML();
var _ob = new Object();
init();
Symbol 378 MovieClip Frame 1
_global.currSec = "highscores";
Symbol 378 MovieClip Frame 39
_global.buttonLock = false;
stop();
Symbol 378 MovieClip Frame 50
_parent.gotoAndStop(_global.nextSec);
Symbol 390 MovieClip Frame 1
perimeter._visible = false;
driftBoards._visible = false;
h0._visible = false;
h1._visible = false;
h2._visible = false;
h3._visible = false;
h4._visible = false;
h5._visible = false;
h6._visible = false;
q0._visible = false;
q1._visible = false;
q2._visible = false;
q3._visible = false;
q4._visible = false;
q5._visible = false;
q6._visible = false;
q7._visible = false;
q8._visible = false;
q9._visible = false;
stop();
Symbol 403 MovieClip Frame 1
stop();
fscommand ("allowscale", "false");
Symbol 403 MovieClip Frame 2
stop();
Symbol 403 MovieClip Frame 3
stop();
Symbol 403 MovieClip Frame 4
stop();
Symbol 403 MovieClip Frame 5
stop();
Symbol 405 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 103
stop();
_parent.gotoAndPlay("go");
Symbol 422 MovieClip Frame 21
stop();
Symbol 422 MovieClip Frame 35
stop();
_parent.gotoAndStop("go");
Symbol 426 Button
on (release) {
globalSound.setVolume(0);
gotoAndStop (2);
}
Symbol 429 Button
on (release) {
globalSound.setVolume(100);
gotoAndStop (1);
}
Symbol 430 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 2
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 2
_root.gotoAndStop("game out");
Symbol 458 MovieClip Frame 28
stop();
Symbol 465 Button
on (rollOver) {
this.hsName.text = "";
this.hsName.setFocus();
this.hotspot._x = -1000;
}
Symbol 470 MovieClip Frame 7
stop();
Symbol 473 Button
on (press) {
this.onEnterFrame = function () {
if (countryCount > 0) {
hsCountry.text = country[countryCount--];
} else {
countryCount = countryLength;
hsCountry.text = country[countryCount];
}
};
}
on (release) {
delete this.onEnterFrame;
}
Symbol 474 Button
on (press) {
this.onEnterFrame = function () {
if (countryCount < countryLength) {
hsCountry.text = country[countryCount++];
} else {
countryCount = 0;
hsCountry.text = country[countryCount];
}
};
}
on (release) {
delete this.onEnterFrame;
}
Symbol 475 MovieClip Frame 1
var country = ["United States", "Germany", "Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antigua And Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia And Herzegovina", "Botswana", "Brazil", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, Democratic", "Cook Islands", "Costa Rica", "C\u00F4te D'ivoire", "Croatia", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvinas)", "Faroe Islands", "Fiji", "France", "French Guiana", "French Polynesia", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Gibraltar", "Greece", "Greenland", "Grenada", "Guadeloupe", "Guam", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hong Kong", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, Republic Of", "Kuwait", "Kyrgyzstan", "Lao,Democratic Republic", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macao", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Martinique", "Mauritania", "Mauritius", "Mayotte", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montserrat", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "Netherlands Antilles", "New Caledonia", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Niue", "Norfolk Island", "Northern Mariana Islands", "Norway", "Oman", "Pakistan", "Palau", "Palestinian Territory", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Pitcairn", "Poland", "Portugal", "Puerto Rico", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saint Helena", "Saint Kitts And Nevis", "Saint Lucia", "Samoa", "San Marino", "Sao Tome And Principe", "Saudi Arabia", "Senegal", "Serbia And Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "St. Vincent", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syrian Arab Republic", "Taiwan, Province Of China", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tokelau", "Tonga", "Trinidad And Tobago", "Tunisia", "Turk And Caicos Islands", "Turkey", "Turkmenistan", "Tuvalu", "U.S. Virgin Islands", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Venezuela", "Viet Nam", "Virgin Islands, British", "Wallis And Futuna Islands", "Western Sahara", "Yemen", "Zambia", "Zimbabwe"];
hsCountry.text = country[0];
countryLength = country.length - 1;
countryCount = 0;
Symbol 477 Button
on (release) {
myVars = new LoadVars();
myVars.racename = hsName.hsName.text;
myVars.country = hsCountry.hsCountry.text;
myVars.score = _global.gameoverTotal;
myVars.action = "i";
trace(myVars);
NetDebug.trace("sending high score: " + myVars.toString());
var resultFromServer = new LoadVars();
resultFromServer.onLoad = function (success) {
if (success) {
NetDebug.trace("success!");
NetDebug.trace(resultFromServer.toString());
} else {
NetDebug.trace("failed");
NetDebug.trace(resultFromServer.toString());
}
};
if ((hsName.hsName.text != "") && (hsName.hsName.text != nameCheck)) {
myVars.sendAndLoad(_global.sendScore, resultFromServer, "POST");
this.gotoAndPlay("out");
} else {
result.text = "Enter your name.";
}
}
Symbol 486 MovieClip Frame 1
mx.remoting.debug.NetDebug.initialize();
stop();
Symbol 486 MovieClip Frame 27
stop();
nameCheck = hsName.hsName.text;
Symbol 486 MovieClip Frame 52
_root.changeSec("highscores");
Symbol 492 Button
on (release) {
_root.game.gotoAndPlay(2);
}
Symbol 493 MovieClip Frame 40
stop();
Symbol 494 MovieClip Frame 95
mx.remoting.debug.NetDebug.initialize();
mx.remoting.debug.NetDebug.trace("Total points: " + _global.gameoverTotal);
mx.remoting.debug.NetDebug.trace("Top 10 low-score: " + _global.lowScore);
var currentGameScore = parseFloat(_global.gameoverTotal);
var currentLowScore = parseFloat(_global.lowScore);
if (currentGameScore > currentLowScore) {
submitScore.gotoAndPlay("in");
}
stop();
Symbol 496 MovieClip Frame 11
_parent.gotoAndStop(_global.nextSec);