Frame 1
function Preloader(baseClip, loadedFrame) {
this.loadedFrame = loadedFrame;
this.baseClip = baseClip;
this.clip = this.baseClip.createEmptyMovieClip("preloaderClip", this.baseClip.getNextHighestDepth());
this.clip.preloader = this;
this.frame = 0;
this.fractionLoaded = 0;
this.loadedBytes = 0;
this.totalBytes = 0;
this.percentLoaded = 0;
this.clip.onEnterFrame = this.evtEnterFrame;
}
function setupRightClickMenu(showHyperlaunchLink) {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
if (showHyperlaunchLink || (showHyperlaunchLink == undefined)) {
var _local4 = new ContextMenuItem("\u00A9 2008 Hyperlaunch New Media Ltd", function () {
return(undefined);
});
var _local3 = new ContextMenuItem("http://www.hyperlaunch.com", function () {
getURL ("http://www.hyperlaunch.com", "_blank");
});
_local3.separatorBefore = true;
_local2.customItems.push(_local4, _local3);
}
_root.menu = _local2;
}
stop();
Preloader.prototype.evtEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
this.preloader.frame++;
this.preloader.onUpdate();
if ((_local4 > 10) && (_local3 > 10)) {
this.preloader.totalBytes = _local3;
this.preloader.loadedBytes = _local4;
this.preloader.fractionLoaded = _local4 / _local3;
this.preloader.percentLoaded = Math.floor((_local4 * 100) / _local3);
if (_local4 == _local3) {
this.preloader.onLoaded();
this.onEnterFrame = undefined;
this.removeMovieClip();
}
} else {
this.preloader.percentLoaded = 0;
}
this.preloader.loadingString = ("Loading: " + this.preloader.percentLoaded) + "%";
};
Preloader.prototype.onLoaded = function () {
_root.gotoAndStop(this.loadedFrame);
};
Preloader.prototype.onUpdate = function () {
trace(this.fractionLoaded);
};
var baseURL = "http://www.speedracerchaser.com";
var objPreloader = new Preloader(_root, "splashScreen");
objPreloader.onUpdate = function () {
_root.txtLoaded.htmlText = (("<b>" + this.percentLoaded) + "%") + "</b>";
};
setupRightClickMenu();
_level0.hyperlaunchSWF_ID = "Speedeacer_WB_game";
if (_global.System) {
System.security.allowDomain("www.hyperlaunch.com");
}
loadMovieNum ("http://www.hyperlaunch.com/tracking/tracker.swf?r=" + (Math.floor(Math.random() * 10000) + 10000), 19467);
Frame 51
function Sounds(clip) {
if (clip == undefined) {
trace("Sounds: Clip not found in constructor");
}
this.clip = clip;
clip.objSounds = this;
this.sounds = [];
this.groups = [];
clip.onEnterFrame = function () {
this.objSounds.evtEnterFrame();
};
}
function initRace() {
if (_root.gameMode == "practice") {
_root.gridPos = 1;
_root.gotoAndStop("game");
} else {
_root.gridPos = Maths.randomInt(1, 9);
var _local2 = new LoadVars();
var _local3 = new LoadVars();
_local3.onLoad = loadedReplaysCallback;
_local2.gridPos = _root.gridPos;
_local2.trackID = _root.trackID;
_local2.sendAndLoad(_root.baseURL + "/getReplays.php", _local3, "POST");
}
}
function loadedReplaysCallback() {
_root.replays = this;
_root.gotoAndStop("game");
}
function addReplays(objGame) {
if (_root.gameMode == "practice") {
return(undefined);
}
var _local2 = 1;
while (_local2 <= 9) {
if (_root.replays["replay" + _local2] != undefined) {
trace("Adding " + _local2);
objGame.registerReplayString(_root.replays["replay" + _local2]);
}
_local2++;
}
}
function saveReplay() {
if (_root.goodReplay) {
var _local2 = new LoadVars();
var _local3 = new LoadVars();
_local2.gridPos = _root.replayGridPos;
_local2.trackID = _root.replayTrack;
_local2.frames = _root.finishFrame;
_local2.replay = _root.replayString;
_local2.sendAndLoad(_root.baseURL + "/saveReplay.php", _local3, "POST");
} else {
trace("Replay too slow to be saved");
}
}
function setupResults() {
if (_root.gameMode == "practice") {
_root.content.submitScore._visible = false;
} else {
_root.content.submitScore.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.content.gotoFrame = "highScores";
_root.content.play();
};
}
_root.content.playAgain.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.content.gotoFrame = "introScreen";
_root.content.play();
};
_root.score = 0;
_root.score = _root.score + ((10 - _root.finishPosition) * 5000);
_root.score = _root.score + (_root.destroyedCars * 5000);
_root.score = _root.score + (Math.max(0, _root.trackList[_root.replayTrack].parFrames - _root.finishFrame) * 5);
var _local3 = "";
switch (_root.finishPosition) {
case 1 :
case "1" :
_local3 = "st";
break;
case 2 :
case "2" :
_local3 = "nd";
break;
case 3 :
case "3" :
_local3 = "rd";
break;
default :
_local3 = "th";
}
var _local2 = "";
_local2 = _local2 + (_root.trackList[_root.replayTrack].name + "\n\n");
_local2 = _local2 + ((((_root.finishPosition + _local3) + " of ") + _root.totalCars) + "\n\n");
_local2 = _local2 + (_root.finishTime.strTime + "\n\n");
_local2 = _local2 + (_root.bestLapTime.strTime + "\n\n");
_local2 = _local2 + (((_root.destroyedCars + " / ") + (_root.totalCars - 1)) + "\n\n");
_local2 = _local2 + (_root.score + "\n\n");
_root.content.results.txtResults.htmlText = ("<i>" + _local2) + "</i>";
}
function Game(clip, objTrack) {
this.clip = clip;
clip.objGame = this;
this.objTrack = objTrack;
this.panel = this.clip.panel;
this.radar = this.panel.radar;
this.radarCars = this.panel.radar.cars;
this.radarBottom = this.panel.radar.bottomHolder;
this.radarTop = this.panel.radar.topHolder;
this.track = this.clip.trackHolder;
this.trackOverlay = this.clip.trackOverlayHolder;
this.trackBG = this.clip.trackBG;
this.lightsBG = this.clip.lightsBG;
this.lightsFG = this.clip.lightsFG;
this.carClip = this.clip.carHolder;
this.initialise();
}
function HighscoreService(gameID, count) {
this.gameID = gameID;
this.scoresLoaded = false;
this.displayDetailsSaved = false;
this.baseDomain = "www.hyperlaunch.com";
this.baseURL = ("http://" + this.baseDomain) + "/highscoreservice/";
this.scoreCount = ((count == undefined) ? 10 : (count));
var _local2 = SharedObject.getLocal("highscoreService");
this.userKey = _local2.data.userKey;
this.objXML = new XML();
this.objXML.ignoreWhite = true;
this.objXML.load((((((((this.baseURL + "getScores.php?gameID=") + this.gameID) + "&count=") + this.scoreCount) + "&userKey=") + this.userKey) + "&r=") + (Math.floor(Math.random() * 100000) + 100000));
this.objXML.owner = this;
this.objXML.onLoad = function () {
this.owner.scoresLoaded = true;
var _local3 = this.getNodeValue("highscores/userKey");
if (_local3 != undefined) {
var _local2 = SharedObject.getLocal("highscoreService");
this.owner.userKey = (_local2.data.userKey = _local3);
_local2.flush();
}
if (this.owner.displayDetailsSaved) {
this.owner._displayScores();
}
System.security.allowDomain(this.owner.baseDomain);
loadMovieNum ((this.owner.baseURL + "highscoreService.swf?r=") + (Math.floor(Math.random() * 100000) + 100000), 19356);
};
}
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseFMP);
_level0.trackPoint("Section_SplashScreen");
_root.objSounds.stopAllSounds();
var car1 = {id:"car1", idx:1, name:"Mach 5", description:"Speedracer's road car is fast and drivable. An excellent choice!", topSpeed:0.6, acceleration:0.7, traction:0.7, jump:0.8, engine:"elise", drag:0.98, accel:0.5, decel:0.4, grip:0.15, steeringAccel:1, steeringDrag:0.8, jumpForce:3};
var car2 = {id:"car2", idx:2, name:"Mach 6", description:"While faster than the Mach 5 road car, the Mach 6 is harder to drive and is for experts only.", engine:"bike", topSpeed:0.8, acceleration:0.7, traction:0.4, jump:0.3, drag:0.98, accel:0.6, decel:0.5, grip:0.08, steeringAccel:1.7, steeringDrag:0.75, jumpForce:2.5};
var car3 = {id:"car3", idx:3, name:"Racer X Race Car", description:"Fast and grippy, Racer X's race car is a force to be reckoned with.", engine:"bike", topSpeed:0.7, acceleration:0.6, traction:0.9, jump:0.3, drag:0.975, accel:0.65, decel:0.5, grip:0.17, steeringAccel:1.4, steeringDrag:0.8, jumpForce:1.7};
var car4 = {id:"car4", idx:4, name:"Racer X Road Car", description:"Racer X's road car holds the road well, but isn't the fastest available. A good choice for beginners.", engine:"elise", topSpeed:0.4, acceleration:0.7, traction:0.8, jump:0.5, drag:0.96, accel:0.8, decel:0.6, grip:0.25, steeringAccel:1.7, steeringDrag:0.75, jumpForce:3};
var car5 = {id:"car5", idx:5, name:"Mach 4", description:"The older Mach 4 technology is outragously fast, but very hard to control. Only the brave need apply!", engine:"elise", topSpeed:0.9, acceleration:0.3, traction:0.2, jump:0.3, drag:0.995, accel:0.3, decel:0.27, grip:0.05, steeringAccel:2.5, steeringDrag:0.7, jumpForce:2};
var car6 = {id:"car6", idx:6, name:"Snake Oiler", description:"Not the fastest of cars, but the strong jump ability can exploit shortcuts by jumping to other sections of track.", engine:"elise", topSpeed:0.6, acceleration:0.6, traction:0.5, jump:0.8, drag:0.975, accel:0.53, decel:0.44, grip:0.1, steeringAccel:1.2, steeringDrag:0.8, jumpForce:3};
var car7 = {id:"car7", idx:7, name:"Gray Ghost", description:"This car's slow top speed is offset by it's rapid acceleration and huge grip from it's wings.", engine:"supercharger", topSpeed:0.4, acceleration:0.9, traction:0.9, jump:0.5, drag:0.9, accel:2.3, decel:0.4, grip:0.35, steeringAccel:1.4, steeringDrag:0.8, jumpForce:2};
var car8 = {id:"supercharger", idx:8, name:"GRX Race Car", description:"This car may have impressive stats, but the weight of the engine makes it an unresponsive handful to drive.", engine:"supercharger", topSpeed:0.8, acceleration:0.8, traction:0.7, jump:0.6, drag:0.94, accel:1.7, decel:0.5, grip:0.27, steeringAccel:0.6, steeringDrag:0.9, jumpForce:2.5};
var cars = [];
cars.car1 = car1;
cars.car2 = car2;
cars.car3 = car3;
cars.car4 = car4;
cars.car5 = car5;
cars.car6 = car6;
cars.car7 = car7;
cars.car8 = car8;
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
var Maths = new Object();
Maths.randomNum = function (minNum, maxNum) {
return((Math.random() * (maxNum - minNum)) + minNum);
};
Maths.randomInt = function (minNum, maxNum) {
return(Math.round((Math.random() * (maxNum - minNum)) + minNum));
};
Maths.vectorLength = function (dx, dy) {
return(Math.sqrt((dx * dx) + (dy * dy)));
};
Maths.distance = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Maths.vectorLength(_local2, _local1));
};
Maths.vectorLengthSquared = function (dx, dy) {
return((dx * dx) + (dy * dy));
};
Maths.distanceSquared = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Maths.vectorLengthSquared(_local2, _local1));
};
Maths.angleBetween = function (x1, y1, x2, y2) {
var _local2 = (x1 * x2) + (y1 * y2);
var _local1 = Maths.vectorLength(x1, y1) * Maths.vectorLength(x2, y2);
return(Math.acos(_local2 / _local1));
};
Maths.dotProduct = function (ax, ay, bx, by) {
return((ax * bx) + (ay * by));
};
Maths.unitNormal = function (x, y) {
var _local2 = -y;
var _local1 = x;
var _local3 = Maths.vectorLength(_local2, _local1);
_local2 = _local2 / _local3;
_local1 = _local1 / _local3;
return({x:_local2, y:_local1});
};
Maths.scalarProjection = function (x1, y1, x2, y2) {
return(Maths.dotProduct(x1, y1, x2, y2) / Maths.vectorLength(x2, y2));
};
Maths.vectorProjection = function (x1, y1, x2, y2) {
var _local2 = Maths.dotProduct(x1, y1, x2, y2);
var _local1 = Maths.vectorLength(x2, y2);
var _local6 = (_local2 * x2) / (_local1 * _local1);
var _local5 = (_local2 * y2) / (_local1 * _local1);
return({x:_local6, y:_local5});
};
Maths.formatNum = function (num, leadingDigits, decimalDigits) {
var _local2 = "" + Math.floor(num);
while (_local2.length < leadingDigits) {
_local2 = "0" + _local2;
}
if (decimalDigits != undefined) {
var _local1 = Math.abs(num) - Math.floor(Math.abs(num));
_local1 = _local1 * (10 ^ decimalDigits);
_local1 = Math.floor(_local1);
_local1 = "" + _local1;
while (_local1.length < decimalDigits) {
_local1 = _local1 + "0";
}
_local2 = (_local2 + ".") + _local1;
}
return(_local2);
};
Maths.degToRad = function (degs) {
return(degs * (Math.PI/180));
};
Maths.radToDeg = function (rads) {
return(rads * 57.2957795130823);
};
MovieClip.prototype.curvedRectangle = function (p_nX1, p_nY1, p_nX2, p_nY2, p_nR) {
var _local2 = ((p_nR == undefined) ? 0 : (p_nR));
var _local7 = _local2 * 2;
var _local10 = Math.abs(p_nX2 - p_nX1) - _local7;
var _local8 = Math.abs(p_nY2 - p_nY1) - _local7;
this.moveTo(p_nX1 + _local2, p_nY1);
this.lineTo(p_nX2 - _local2, p_nY1);
this.curveTo(p_nX2, p_nY1, p_nX2, p_nY1 + _local2);
this.lineTo(p_nX2, p_nY2 - _local2);
this.curveTo(p_nX2, p_nY2, p_nX2 - _local2, p_nY2);
this.lineTo(p_nX1 + _local2, p_nY2);
this.curveTo(p_nX1, p_nY2, p_nX1, p_nY2 - _local2);
this.lineTo(p_nX1, p_nY1 + _local2);
this.curveTo(p_nX1, p_nY1, p_nX1 + _local2, p_nY1);
};
MovieClip.prototype.drawSquare = function (x, y, w, h) {
this.moveTo(x, y);
this.lineTo(x + w, y);
this.lineTo(x + w, y + h);
this.lineTo(x, y + h);
this.lineTo(x, y);
};
MovieClip.prototype.drawFilledSquare = function (x, y, w, h, colour, alpha) {
this.beginFill(colour, alpha);
this.drawSquare(x, y, w, h);
this.endFill();
};
MovieClip.prototype.drawCircle = function (x, y, r) {
var _local6 = r * 0.414213562373095;
var _local5 = (r * Math.SQRT2) / 2;
this.moveTo(x + r, y);
this.curveTo(x + r, y + _local6, x + _local5, y + _local5);
this.curveTo(x + _local6, y + r, x, y + r);
this.curveTo(x - _local6, y + r, x - _local5, y + _local5);
this.curveTo(x - r, y + _local6, x - r, y);
this.curveTo(x - r, y - _local6, x - _local5, y - _local5);
this.curveTo(x - _local6, y - r, x, y - r);
this.curveTo(x + _local6, y - r, x + _local5, y - _local5);
this.curveTo(x + r, y - _local6, x + r, y);
};
MovieClip.prototype.drawFilledCircle = function (x, y, r, colour, alpha) {
this.beginFill(colour, alpha);
this.drawCircle(x, y, r);
this.endFill();
};
MovieClip.prototype.drawCircleSegment = function (x, y, r, startAngle, endAngle, stepAngle) {
degToRad = (Math.PI/180);
while (endAngle < startAngle) {
endAngle = endAngle + 360;
}
this.moveTo(x, y);
this.lineTo(x + (r * Math.cos(startAngle * degToRad)), x + (r * Math.sin(startAngle * degToRad)));
var _local2 = startAngle + stepAngle;
while (_local2 < (endAngle - stepAngle)) {
var _local3 = _local2 * degToRad;
this.lineTo(x + (r * Math.cos(_local3)), x + (r * Math.sin(_local3)));
_local2 = _local2 + stepAngle;
}
this.lineTo(x + (r * Math.cos(endAngle * degToRad)), x + (r * Math.sin(endAngle * degToRad)));
this.lineTo(x, y);
};
MovieClip.prototype.drawFilledCircleSegment = function (x, y, r, startAngle, endAngle, stepAngle, colour, alpha) {
this.beginFill(colour, alpha);
this.drawCircleSegment(x, y, r, startAngle, endAngle, stepAngle);
this.endFill();
};
MovieClip.prototype.drawSmoothCurveThroughPoints = function (wibbleFactor, startAngle, points) {
this.moveTo(points[0].x, points[0].y);
var _local13 = points[0].x - Math.cos((Math.PI * startAngle) / 180);
var _local12 = points[0].y - Math.sin((Math.PI * startAngle) / 180);
var _local2 = 1;
while (_local2 < points.length) {
var _local5 = points[_local2 - 1].x - _local13;
var _local4 = points[_local2 - 1].y - _local12;
var _local8 = Maths.vectorLength(_local5, _local4);
var _local10 = points[_local2 - 1].x - points[_local2].x;
var _local9 = points[_local2 - 1].y - points[_local2].y;
var _local11 = Maths.vectorLength(_local10, _local9);
cScale = 0;
if (_local8 != 0) {
cScale = ((0.5 + wibbleFactor) * _local11) / _local8;
}
var _local7 = points[_local2 - 1].x + (_local5 * cScale);
var _local6 = points[_local2 - 1].y + (_local4 * cScale);
this.curveTo(_local7, _local6, points[_local2].x, points[_local2].y);
_local13 = _local7;
_local12 = _local6;
_local2++;
}
};
MovieClip.prototype.localToLocal = function (clip, x, y) {
var _local2 = {x:x, y:y};
clip.localToGlobal(_local2);
this.globalToLocal(_local2);
return(_local2);
};
MovieClip.prototype.holderToLocal = function (clip) {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
clip.globalToLocal(_local2);
return(_local2);
};
MovieClip.prototype.holderToGlobal = function () {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
return(_local2);
};
MovieClip.prototype.addHolder = function (x, y) {
var _local3 = this.getNextHighestDepth();
var _local2 = this.createEmptyMovieClip("holder_" + _local3, _local3);
_local2._x = x;
_local2._y = y;
return(_local2);
};
Sounds.prototype.registerSound = function (linkage, defaultVolume) {
if (defaultVolume == undefined) {
defaultVolume = 100;
}
var _local4 = this.clip.getNextHighestDepth();
var _local2 = this.clip.createEmptyMovieClip((linkage + "_") + _local4, _local4);
_local2.sound = new Sound(_local2);
_local2.sound.defaultVolume = defaultVolume;
_local2.sound.clip = _local2;
_local2.sound.attachSound(linkage);
_local2.sound.setVolume(defaultVolume);
this.sounds[linkage] = _local2.sound;
this.sounds[linkage].looping = false;
this.sounds[linkage].playing = false;
this.sounds[linkage].onSoundComplete = function () {
if (this.looping) {
this.start();
} else {
this.playing = false;
}
};
return(_local2.sound);
};
Sounds.prototype.registerGroup = function (groupID, arrGroupIDs) {
var _local2 = 0;
while (_local2 < arrGroupIDs.length) {
if (this.sounds[arrGroupIDs[_local2]] == undefined) {
trace(((("Sounds: Group '" + groupID) + "' contains non-registered sound ID '") + arrGroupIDs[_local2]) + "'");
}
_local2++;
}
this.groups[groupID] = arrGroupIDs;
};
Sounds.prototype.play = function (id, volume, loop, soundPosition) {
if (loop != undefined) {
this.sounds[id].looping = loop;
}
if (soundPosition == undefined) {
soundPosition = 0;
}
if (this.groups[id] != undefined) {
id = this.groups[id][Maths.randomInt(0, this.groups[id].length - 1)];
}
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to play unregistered sound '" + id) + "'");
}
if (volume != undefined) {
this.sounds[id].setVolume(volume);
}
this.sounds[id].start(soundPosition);
this.sounds[id].playing = true;
};
Sounds.prototype.stop = function (id) {
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to stop unregistered sound '" + id) + "'");
}
this.sounds[id].looping = false;
this.sounds[id].stop();
this.sounds[id].playing = false;
};
Sounds.prototype.volume = function (id, volume) {
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to set volume of unregistered sound '" + id) + "'");
}
this.sounds[id].setVolume(volume);
};
Sounds.prototype.fadeTo = function (id, volume, dVol) {
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to fade volume of unregistered sound '" + id) + "'");
}
if (dVol == undefined) {
dVol = 1;
}
this.sounds[id].dVol = Math.ceil(Math.abs(dVol));
this.sounds[id].targetVol = volume;
};
Sounds.prototype.stopAllSounds = function () {
for (id in this.sounds) {
this.stop(id);
}
};
Sounds.prototype.fadeOutAllSounds = function (dVol) {
for (id in this.sounds) {
this.fadeTo(id, 0, dVol);
}
};
Sounds.prototype.evtEnterFrame = function () {
for (id in this.sounds) {
if (this.sounds[id].targetVol != undefined) {
var _local2 = this.sounds[id].getVolume();
var _local3 = _local2 - this.sounds[id].targetVol;
if (Math.abs(_local3) < this.sounds[id].dVol) {
this.sounds[id].setVolume(this.sounds[id].targetVol);
this.sounds[id].targetVol = undefined;
} else {
this.sounds[id].setVolume(((_local3 > 0) ? (_local2 - this.sounds[id].dVol) : (_local2 + this.sounds[id].dVol)));
}
}
}
};
var Keys = new Object();
Keys.LeftMouse = 1;
Keys._mouseDown = false;
Keys.onMouseDown = function () {
this._mouseDown = true;
};
Keys.onMouseUp = function () {
this._mouseDown = false;
};
Mouse.addListener(Keys);
Keys.mouseDown = function () {
return(this._mouseDown);
};
Keys.CursorLeft = 37;
Keys.CursorRight = 39;
Keys.CursorUp = 38;
Keys.CursorDown = 40;
Keys.Backspace = 8;
Keys.Tab = 9;
Keys.Enter = 13;
Keys.Shift = 16;
Keys.Control = 17;
Keys.Alt = 18;
Keys.CapsLock = 20;
Keys.Spacebar = 32;
Keys.PageUp = 33;
Keys.PageDown = 34;
Keys.End = 35;
Keys.Home = 36;
Keys.PrintScr = 44;
Keys.ScrollLock = 145;
Keys.Pause = 19;
Keys.Insert = 45;
Keys.Delete = 46;
Keys.NumLock = 144;
Keys.Semicolon = 186;
Keys.Equals = 187;
Keys.Minus = 189;
Keys.Slash = 191;
Keys.Apostrophe = 192;
Keys.BackTick = 223;
Keys.BackSlash = 220;
Keys.Hash = 222;
Keys.Comma = 188;
Keys.Period = 190;
Keys.SquareOpen = 219;
Keys.SquareClose = 221;
Keys.F1 = 112;
Keys.F2 = 113;
Keys.F3 = 114;
Keys.F4 = 115;
Keys.F5 = 116;
Keys.F6 = 117;
Keys.F7 = 118;
Keys.F8 = 119;
Keys.F9 = 120;
Keys.F10 = undefined;
Keys.F11 = 122;
Keys.F12 = 123;
Keys.Num0 = 96;
Keys.Num1 = 97;
Keys.Num2 = 98;
Keys.Num3 = 99;
Keys.Num4 = 100;
Keys.Num5 = 101;
Keys.Num6 = 102;
Keys.Num7 = 103;
Keys.Num8 = 104;
Keys.Num9 = 105;
Keys.NumMultiply = 106;
Keys.NumAdd = 107;
Keys.NumEnter = 13;
Keys.NumMinus = 109;
Keys.NumPeriod = 110;
Keys.NumDivide = 111;
Keys.A = 65;
Keys.B = 66;
Keys.C = 67;
Keys.D = 68;
Keys.E = 69;
Keys.F = 70;
Keys.G = 71;
Keys.H = 72;
Keys.I = 73;
Keys.J = 74;
Keys.K = 75;
Keys.L = 76;
Keys.M = 77;
Keys.N = 78;
Keys.O = 79;
Keys.P = 80;
Keys.Q = 81;
Keys.R = 82;
Keys.S = 83;
Keys.T = 84;
Keys.U = 85;
Keys.V = 86;
Keys.W = 87;
Keys.X = 88;
Keys.Y = 89;
Keys.Z = 90;
Keys.Key0 = 48;
Keys.Key1 = 49;
Keys.Key2 = 50;
Keys.Key3 = 51;
Keys.Key4 = 52;
Keys.Key5 = 53;
Keys.Key6 = 54;
Keys.Key7 = 55;
Keys.Key8 = 56;
Keys.Key9 = 57;
var track_test = {id:"test", name:"Test Track", blurb:"", segments:["start", "lefttight", "checkpoint", "leftopen", "leftopen", "leftopen", "leftopen", "rightopen", "rightopen", "rightopen", "rightopen", "rightopen", "straight", "rightopen", "lefttight", "straight", "rightopen", "righttight", "rightopen", "straight", "righttight", "righttight", "righttight", "lefttight", "lefttight", "lefttight", "straight", "loopdeloop", "straightholes", "left", "straightholes", "loopdeloop", "corkscrew", "left", "left", "left", "straight", "right", "right", "loopdeloop", "right", "straight", "straight", "right", "ramp", "left", "straight", "left", "right", "straight", "ramp", "straight", "straight"], radarScale:2, radarX:50, radarY:400, initialRotationDeg:-20, laps:3, parFrames:7000};
var track_learnersloop = {id:"learnersloop", name:"Learner's Loop", blurb:"", segments:["start", "straight", "straightholes", "rightopen", "rightopen", "rightopen", "rightopen", "rightopen", "rightopen", "straight", "straightholes", "straight", "right", "right", "righttight", "straightholes", "righttight", "right", "left", "straight", "straightholes", "left", "left", "left", "checkpoint", "straight", "leftopen", "leftopen", "straightholes", "ramp", "straightholes", "rightopen", "rightopen", "rightopen", "right", "righttight", "righttight", "checkpoint", "leftopen", "leftopen", "rightopen", "lefttight", "right", "straight", "close-a"], radarScale:2, radarX:150, radarY:400, initialRotationDeg:160, laps:3, parFrames:5000};
var track_racersrun = {id:"racersrun", name:"Racer's Run", blurb:"", segments:["start", "straightholes", "rightopen", "rightopen", "rightopen", "straight", "straightholes", "straight", "straightholes", "straight", "right", "right", "righttight", "righttight", "straight", "straightholes", "straight", "straightholes", "left", "left", "left", "checkpoint", "straight", "ramp", "straight", "straightholes", "left", "left", "straight", "loopdeloop", "checkpoint", "left", "left", "shortstraight", "shortstraight", "shortstraight", "leftopen", "leftopen", "leftopen", "shortstraight", "ramp", "straight", "corkscrew", "straight", "checkpoint", "lefttight", "lefttight", "lefttight", "lefttight", "straight", "righttight", "righttight", "righttight", "righttight", "straight", "straightholes", "right", "right", "right", "straight", "leftopen", "rightopen"], radarScale:2, radarX:150, radarY:400, initialRotationDeg:160, laps:3, parFrames:7500};
var track_rollercoaster = {id:"rollercoaster", name:"Expert's Rollercoaster", blurb:"", segments:["start", "righttight", "righttight", "righttight", "righttight", "lefttight", "lefttight", "lefttight", "straight", "loopdeloop", "right", "right", "checkpoint", "corkscrew", "right", "right", "right", "right", "straight", "straight", "bigramp", "left", "checkpoint", "leftopen", "straight", "leftopen", "leftopen", "leftopen", "leftopen", "leftopen", "leftopen", "left", "leftopen", "left", "leftopen", "left", "left", "lefttight", "checkpoint", "bigramp", "straightholes", "righttight", "righttight", "righttight", "left", "left", "left", "left", "left", "straightholes", "checkpoint", "lefttight", "corkscrew", "left", "loopdeloop", "leftopen", "rightopen", "close-c"], radarScale:2, radarX:110, radarY:360, initialRotationDeg:-20, laps:3, parFrames:8500};
var trackList = [];
trackList.test = track_test;
trackList.learnersloop = track_learnersloop;
trackList.racersrun = track_racersrun;
trackList.rollercoaster = track_rollercoaster;
_root.objSounds = new Sounds(_root.soundClip);
_root.objSounds.registerSound("bike-accel");
_root.objSounds.registerSound("bike-brake");
_root.objSounds.registerSound("bike-idle");
_root.objSounds.registerSound("bike-wot");
_root.objSounds.registerSound("bleep");
_root.objSounds.registerSound("bloop");
_root.objSounds.registerSound("boom");
_root.objSounds.registerSound("car-reset");
_root.objSounds.registerSound("elise-accel");
_root.objSounds.registerSound("elise-brake");
_root.objSounds.registerSound("elise-idle");
_root.objSounds.registerSound("elise-wot");
_root.objSounds.registerSound("finish-good");
_root.objSounds.registerSound("finish-poor");
_root.objSounds.registerSound("jump");
_root.objSounds.registerSound("landing", 30);
_root.objSounds.registerSound("loop-woosh");
_root.objSounds.registerSound("pincer");
_root.objSounds.registerSound("race-intro-ambience");
_root.objSounds.registerSound("rollover-bleep", 50);
_root.objSounds.registerSound("rollover-bleepbleep", 50);
_root.objSounds.registerSound("scrape");
_root.objSounds.registerSound("servo");
_root.objSounds.registerSound("supercharger-accel", 70);
_root.objSounds.registerSound("supercharger-brake", 70);
_root.objSounds.registerSound("supercharger-idle", 70);
_root.objSounds.registerSound("supercharger-wot");
_root.objSounds.registerSound("tyre-squall");
_root.objSounds.registerSound("tyre-squeal");
_root.objSounds.registerSound("weapon-chainsaw");
Game.prototype.initialise = function () {
this.w = 715;
this.h = 458;
this.bgParalaxRate = 0.6;
this.easeFunc = "easeInOutQuad";
this.easeTimeQuick = 0.2;
this.easeTimeSlow = 1;
this.recentreRate = 20;
this.gravity = 0.15;
this.shadowDist = 5;
this.frame = 0;
this.destroyedCars = 0;
this.bestLapFrames = 999999 /* 0x0F423F */;
this.state = "prestart";
this.arrCars = [];
this.arrSegs = [];
this.arrCheckpoints = [];
this.trackBG.loopWidth = this.trackBG._width / 2;
this.trackBG.loopHeight = this.trackBG._height / 2;
this.defOffsetW = (this.w / 2) * 0.4;
this.defOffsetH = (this.h / 2) * 0.4;
this.clip.skidmarkWorker._visible = false;
this.clip.centre._visible = false;
this.clip.centre.origX = this.clip.centre._x;
this.clip.centre.origY = this.clip.centre._y;
var _local3 = this.objTrack.radarScale;
this.radar._x = this.objTrack.radarX;
this.radar._y = this.objTrack.radarY;
this.radarCars._xscale = _local3;
this.radarCars._yscale = _local3;
this.radarBottom._xscale = _local3;
this.radarBottom._yscale = _local3;
this.radarTop._xscale = _local3;
this.radarTop._yscale = _local3;
this.bmpSkidmarks = new flash.display.BitmapData(this.w, this.h, true, 16777215);
this.clip.skidmarkHolder.attachBitmap(this.bmpSkidmarks, 1);
while (this.addNextTrackSeg()) {
}
this.recording = [];
this.replays = [];
_root.objSounds.play("tyre-squeal", 0, true);
_root.objSounds.play("tyre-squall", 0, true);
this.clip.onEnterFrame = function () {
this.objGame.evtEnterFrame();
};
};
Game.prototype.addPlayerCar = function (gridPos) {
var _local4 = this.carClip.getNextHighestDepth();
this.carClip.attachMovie("car", "car" + _local4, _local4);
this.radarCars.attachMovie("radarCar", "radarCar" + _local4, _local4);
this.playerCar = this.carClip["car" + _local4];
var _local5 = this.radarCars["radarCar" + _local4];
this.arrCars.push(this.playerCar);
this.playerCar.isPlayer = true;
this.playerCar._rotation = this.objTrack.initialRotationDeg;
this.giveCarProperties(this.playerCar, _root.playerCar);
this.playerCar.marker.gotoAndPlay("flash");
var _local6 = this.arrSegs[0].bottom["g" + gridPos].holderToLocal(this.carClip);
this.playerCar._x = _local6.x;
this.playerCar._y = _local6.y;
this.gridPos = gridPos;
this.playerCar.nextCheck = 0;
this.panel.position.gotoAndStop(gridPos);
this.updateLaps();
_local5.gotoAndStop("player");
this.playerCar.radarCar = _local5;
_local5.car = this.playerCar;
this.updateRadarCar(_local5);
this.playerCar.idleSound = this.playerCar.engine + "-idle";
this.playerCar.accelSound = this.playerCar.engine + "-accel";
this.playerCar.brakeSound = this.playerCar.engine + "-brake";
this.playerCar.wotSound = this.playerCar.engine + "-wot";
_root.objSounds.play(this.playerCar.idleSound, 0, true);
_root.objSounds.play(this.playerCar.wotSound, 0, true);
this.playerCar.engineState = "idle";
var _local3 = 0;
while (_local3 < 10) {
this.recentreCar();
_local3++;
}
};
Game.prototype.giveCarProperties = function (objCar, carType) {
objCar.gotoAndStop(carType);
objCar.carType = carType;
objCar.vx = 0;
objCar.vy = 0;
objCar.vr = 0;
objCar.lap = 0;
objCar.segFrameTime = 0;
objCar.progress = 0;
objCar.airborne = false;
objCar._z = 0;
objCar.vz = 0;
objCar.hit._alpha = 0;
objCar.shadowFilter = new flash.filters.DropShadowFilter(this.shadowDist, 110, 0, 0.4, 4, 4, 1, 1, false, false, false);
objCar.filters = [objCar.shadowFilter];
switch (objCar.carType) {
case "car1" :
case "car2" :
case "car3" :
case "car4" :
case "car5" :
case "car6" :
case "car7" :
case "car8" :
break;
default :
trace("Unhandled car type " + objCar.carType);
}
objCar.drag = _root.cars[objCar.carType].drag;
objCar.accel = _root.cars[objCar.carType].accel;
objCar.decel = _root.cars[objCar.carType].decel;
objCar.grip = _root.cars[objCar.carType].grip;
objCar.steeringAccel = _root.cars[objCar.carType].steeringAccel;
objCar.steeringDrag = _root.cars[objCar.carType].steeringDrag;
objCar.jumpForce = _root.cars[objCar.carType].jumpForce;
objCar.engine = _root.cars[objCar.carType].engine;
};
Game.prototype.evtEnterFrame = function () {
switch (this.state) {
case "prestart" :
this.setState("countdown");
break;
case "countdown" :
_root.objSounds.fadeTo(this.playerCar.idleSound, 100, 1);
break;
case "racing" :
this.frame++;
this.playerCar.segFrameTime++;
this.updateReplayCars();
this.updateTimer();
var _local11 = false;
var _local12 = false;
var _local15 = false;
var _local16 = false;
if (Key.isDown(Keys.CursorLeft)) {
_local15 = true;
}
if (Key.isDown(Keys.CursorRight)) {
_local16 = true;
}
if (Key.isDown(Keys.CursorUp)) {
_local11 = true;
}
if (Key.isDown(Keys.CursorDown)) {
_local12 = true;
}
if (Key.isDown(Keys.Spacebar)) {
this.playerCar.weapon.play();
}
if (Key.isDown(Keys.T) && (_root._url.substr(0, 5) == "file:")) {
trace(this.recordingToString());
this.recording = [];
}
if (Key.isDown(Keys.Shift) && (!this.playerCar.airborne)) {
_root.objSounds.play("jump");
this.playerCar.airborne = true;
this.playerCar.vz = this.playerCar.jumpForce;
this.playerCar.curSpecial = undefined;
}
switch (this.playerCar.engineState) {
case "idle" :
_root.objSounds.fadeTo(this.playerCar.idleSound, 100, 10);
_root.objSounds.fadeTo(this.playerCar.wotSound, 0, 10);
if (_local11) {
this.playerCar.engineState = "accel";
_root.objSounds.fadeTo(this.playerCar.idleSound, 0, 10);
_root.objSounds.play(this.playerCar.accelSound);
}
break;
case "accel" :
_root.objSounds.fadeTo(this.playerCar.wotSound, 0, 10);
_root.objSounds.fadeTo(this.playerCar.idleSound, 0, 10);
if (!_root.objSounds.sounds[this.playerCar.accelSound].playing) {
this.playerCar.engineState = "wot";
_root.objSounds.fadeTo(this.playerCar.wotSound, 50, 10);
}
if (!_local11) {
var _local21 = _root.objSounds.sounds[this.playerCar.accelSound].position / _root.objSounds.sounds[this.playerCar.accelSound].duration;
var _local22 = (_root.objSounds.sounds[this.playerCar.brakeSound].duration - (_root.objSounds.sounds[this.playerCar.brakeSound].duration * _local21)) / 1000;
this.playerCar.engineState = "brake";
_root.objSounds.stop(this.playerCar.accelSound);
_root.objSounds.play(this.playerCar.brakeSound, 100, false, _local22);
}
break;
case "wot" :
_root.objSounds.fadeTo(this.playerCar.idleSound, 0, 10);
if ((!_local11) || (this.playerCar.airborne)) {
this.playerCar.engineState = "brake";
_root.objSounds.fadeTo(this.playerCar.wotSound, 0, 50);
_root.objSounds.play(this.playerCar.brakeSound);
}
break;
case "brake" :
_root.objSounds.fadeTo(this.playerCar.idleSound, 0, 10);
_root.objSounds.fadeTo(this.playerCar.wotSound, 0, 10);
if (!_root.objSounds.sounds[this.playerCar.brakeSound].playing) {
this.playerCar.engineState = "idle";
_root.objSounds.fadeTo(this.playerCar.idleSound, 100, 10);
}
if (!(_local11 && (!this.playerCar.airborne))) {
break;
}
var _local19 = _root.objSounds.sounds[this.playerCar.brakeSound].position / _root.objSounds.sounds[this.playerCar.brakeSound].duration;
var _local23 = (_root.objSounds.sounds[this.playerCar.accelSound].duration - (_root.objSounds.sounds[this.playerCar.accelSound].duration * _local19)) / 1000;
this.playerCar.engineState = "accel";
_root.objSounds.stop(this.playerCar.brakeSound);
_root.objSounds.play(this.playerCar.accelSound, 100, false, _local23);
}
this.playerCar.throttle = 0;
if (_local15) {
this.playerCar.vr = this.playerCar.vr - this.playerCar.steeringAccel;
}
if (_local16) {
this.playerCar.vr = this.playerCar.vr + this.playerCar.steeringAccel;
}
if (_local11) {
this.playerCar.throttle = this.playerCar.accel;
}
if (_local12) {
this.playerCar.throttle = -this.playerCar.decel;
}
if (!this.playerCar.airborne) {
var _local14 = 1 * Math.cos(Maths.degToRad(this.playerCar._rotation));
var _local13 = 1 * Math.sin(Maths.degToRad(this.playerCar._rotation));
this.playerCar.vx = this.playerCar.vx + (this.playerCar.throttle * _local14);
this.playerCar.vy = this.playerCar.vy + (this.playerCar.throttle * _local13);
}
var _local26 = Maths.dotProduct(_local14, _local13, this.playerCar.vx, this.playerCar.vy);
this.playerCar.vr = this.playerCar.vr * this.playerCar.steeringDrag;
this.playerCar._rotation = this.playerCar._rotation + ((_local26 >= 0) ? (this.playerCar.vr) : (-this.playerCar.vr));
if ((!this.playerCar.airborne) || (_local12)) {
this.playerCar.vx = this.playerCar.vx * this.playerCar.drag;
this.playerCar.vy = this.playerCar.vy * this.playerCar.drag;
}
if (!this.playerCar.airborne) {
var _local25 = -_local13;
var _local24 = _local14;
var _local18 = Maths.vectorProjection(this.playerCar.vx, this.playerCar.vy, _local25, _local24);
this.playerCar.vx = this.playerCar.vx - (this.playerCar.grip * _local18.x);
this.playerCar.vy = this.playerCar.vy - (this.playerCar.grip * _local18.y);
}
if (this.playerCar.airborne) {
this.playerCar._z = this.playerCar._z + this.playerCar.vz;
this.playerCar.vz = this.playerCar.vz - this.gravity;
if (this.playerCar._z <= 0) {
if (this.playerCar.onTrack) {
_root.objSounds.play("landing");
this.playerCar._z = 0;
this.playerCar.airborne = false;
} else {
this.playerCar.airborne = false;
this.setState("falling");
}
}
this.updateCarZ(this.playerCar);
}
this.playerCar._x = this.playerCar._x + this.playerCar.vx;
this.playerCar._y = this.playerCar._y + this.playerCar.vy;
this.recentreCar();
this.playerCar.onTrack = false;
var _local4 = 0;
while (_local4 < this.arrSegs.length) {
var _local5 = this.arrSegs[_local4];
var _local17 = this.playerCar.holderToGlobal();
if (_local5.hit.hitTest(_local17.x, _local17.y, true)) {
if (_local5 != this.playerCar.curSeg) {
this.playerCar.segFrameTime = 0;
this.playerCar.progress = (100 * this.playerCar.lap) + this.playerCar.curSeg.idx;
this.updatePosition();
}
this.playerCar.onTrack = true;
this.playerCar.curSeg = _local5;
}
_local4++;
}
var _local17 = this.playerCar.holderToGlobal();
var _local10 = false;
_local4 = 0;
while (_local4 < this.playerCar.curSeg.specials.length) {
var _local3 = this.playerCar.curSeg.specials[_local4];
if (_local3.hitTest(_local17.x, _local17.y, true)) {
_local10 = true;
switch (_local3.specialType) {
case "checkpoint" :
if (_local3.idx == this.playerCar.nextCheck) {
this.playerCar.nextCheck = (this.playerCar.nextCheck + 1) % this.arrCheckpoints.length;
if (this.playerCar.nextCheck == 1) {
if (this.playerCar.lap != 0) {
_root.objSounds.play("bleep");
}
this.playerCar.lap++;
this.updateLaps();
this.lapStartFrame = this.frame;
if (this.playerCar.lap > this.objTrack.laps) {
this.raceOver();
}
} else {
this.panel.checkpoint.gotoAndPlay("flash");
}
}
break;
case "jump" :
if (!this.playerCar.airborne) {
this.playerCar.curSpecial = _local3;
}
break;
case "loop" :
case "corkscrew" :
if (!this.playerCar.airborne) {
_root.objSounds.play("loop-woosh");
_root.objSounds.play("scrape");
_local17 = _local3.out.holderToLocal(this.carClip);
this.playerCar.speed = Maths.vectorLength(this.playerCar.vx, this.playerCar.vy);
this.playerCar.vr = 0;
this.playerCar.curSpecial = _local3;
var _local7 = Maths.vectorLength(this.playerCar._x - _local17.x, this.playerCar._y - _local17.y);
var _local6 = _local7 / (this.playerCar.speed * 30);
this.playerCar.slideTo(_local17.x, _local17.y, _local6, "easeInOutQuad", 0, {scope:this, func:this.autoOver});
this.setState("auto");
}
break;
default :
trace("Unhandled special: " + _local3.specialType);
}
}
_local4++;
}
if ((!_local10) && (this.playerCar.curSpecial != undefined)) {
switch (this.playerCar.curSpecial.specialType) {
case "jump" :
if (!this.playerCar.onTrack) {
_root.objSounds.play("loop-woosh");
var _local20 = Maths.vectorLength(this.playerCar.vx, this.playerCar.vy);
this.playerCar.airborne = true;
this.playerCar.vz = (_local20 / 25) * this.playerCar.curSpecial.jumpForce;
}
break;
default :
}
this.playerCar.curSpecial = undefined;
}
if ((!this.playerCar.onTrack) && (!this.playerCar.airborne)) {
this.setState("falling");
}
this.recordFrame();
break;
case "falling" :
this.frame++;
this.playerCar.segFrameTime++;
this.updateReplayCars();
this.updateTimer();
this.playerCar.vx = this.playerCar.vx * 0.85;
this.playerCar.vy = this.playerCar.vy * 0.85;
this.playerCar._x = this.playerCar._x + this.playerCar.vx;
this.playerCar._y = this.playerCar._y + this.playerCar.vy;
this.playerCar._z = this.playerCar._z + this.playerCar.vz;
this.playerCar._rotation = this.playerCar._rotation + this.playerCar.vr;
this.playerCar.vz = this.playerCar.vz - this.gravity;
this.updateCarZ(this.playerCar);
if (!_root.objSounds.sounds[this.playerCar.brakeSound].playing) {
this.playerCar.engineState = "brake";
_root.objSounds.play(this.playerCar.brakeSound);
_root.objSounds.fadeTo(this.playerCar.brakeSound, 0, 3);
}
_root.objSounds.fadeTo(this.playerCar.wotSound, 0, 10);
_root.objSounds.fadeTo(this.playerCar.idleSound, 0, 10);
if (this.playerCar._z <= -99) {
_root.objSounds.stop(this.playerCar.brakeSound);
_root.objSounds.play("car-reset");
this.playerCar.airborne = true;
this.playerCar._z = 30;
this.playerCar.vz = 0;
this.playerCar.vx = 0;
this.playerCar.vy = 0;
this.playerCar.vr = 0;
_local17 = this.playerCar.curSeg.segPrev.holderToLocal(this.carClip);
this.playerCar._x = _local17.x;
this.playerCar._y = _local17.y;
this.playerCar._rotation = this.playerCar.curSeg._rotation;
this.playerCar.curSpecial = undefined;
this.setState("racing");
}
this.recentreCar();
this.recordFrame();
break;
case "auto" :
this.frame++;
this.playerCar.segFrameTime++;
this.updateReplayCars();
this.updateTimer();
this.recentreCar();
this.recordFrame();
break;
case "raceending" :
_root.objSounds.fadeTo(this.playerCar.idleSound, 0, 5);
_root.objSounds.fadeTo(this.playerCar.wotSound, 0, 5);
_root.objSounds.fadeTo(this.playerCar.accelSound, 0, 5);
_root.objSounds.fadeTo(this.playerCar.brakeSound, 0, 5);
if ((!this.playerCar.airborne) || (_local12)) {
this.playerCar.vx = this.playerCar.vx * this.playerCar.drag;
this.playerCar.vy = this.playerCar.vy * this.playerCar.drag;
}
if (this.playerCar.airborne) {
this.playerCar._z = this.playerCar._z + this.playerCar.vz;
this.playerCar.vz = this.playerCar.vz - this.gravity;
if (this.playerCar._z <= 0) {
this.playerCar._z = 0;
this.playerCar.airborne = false;
}
this.updateCarZ(this.playerCar);
}
this.playerCar._x = this.playerCar._x + this.playerCar.vx;
this.playerCar._y = this.playerCar._y + this.playerCar.vy;
if ((Math.abs(this.playerCar.vx) <= 0.2) && (Math.abs(this.playerCar.vy) <= 0.2)) {
this.setState("raceover");
}
this.frame++;
this.playerCar.segFrameTime++;
this.updateReplayCars();
this.recentreCar();
this.recordFrame();
break;
case "raceover" :
this.frame++;
this.playerCar.segFrameTime++;
this.updateReplayCars();
_root.objSounds.stop(this.playerCar.idleSound);
_root.objSounds.stop(this.playerCar.wotSound);
_root.objSounds.stop(this.playerCar.accelSound);
_root.objSounds.stop(this.playerCar.brakeSound);
_root.objSounds.stop("tyre-squeal");
_root.objSounds.stop("tyre-squall");
break;
default :
trace(("evtEnterFrame(" + this.state) + "): Unhandled");
}
this.updateRadarCar(this.playerCar.radarCar);
this.addSkidmarks();
};
Game.prototype.addSkidmarks = function () {
var _local5 = this.clip.skidmarkWorker;
var _local9 = 0;
while (_local9 < this.arrCars.length) {
var _local3 = this.arrCars[_local9];
var _local11 = _local3.fl.holderToLocal(this.clip.skidmarkWorker);
var _local8 = _local3.fr.holderToLocal(this.clip.skidmarkWorker);
var _local6 = _local3.bl.holderToLocal(this.clip.skidmarkWorker);
var _local10 = _local3.br.holderToLocal(this.clip.skidmarkWorker);
if ((_local3._z == 0) && (_local3.prevX != undefined)) {
var _local13 = _local3._x - _local3.prevX;
var _local12 = _local3._y - _local3.prevY;
var _local14 = Maths.vectorLength(_local13, _local12);
if (_local14 > 2) {
var _local16 = Maths.degToRad(_local3._rotation);
var _local20 = Math.cos(_local16);
var _local19 = Math.sin(_local16);
var _local17 = Maths.angleBetween(_local13, _local12, _local20, _local19);
var _local4 = Maths.radToDeg(_local17);
if (_local4 > 90) {
_local4 = 180 - _local4;
}
if (_local4 > 8) {
var _local18 = ((_local4 / 90) * (_local14 / 15)) * 100;
_local5.lineStyle(2, 0, _local18);
_local5.moveTo(_local3.prev_fl.x + this.lastScrollX, _local3.prev_fl.y + this.lastScrollY);
_local5.lineTo(_local11.x, _local11.y);
_local5.moveTo(_local3.prev_fr.x + this.lastScrollX, _local3.prev_fr.y + this.lastScrollY);
_local5.lineTo(_local8.x, _local8.y);
_local5.moveTo(_local3.prev_bl.x + this.lastScrollX, _local3.prev_bl.y + this.lastScrollY);
_local5.lineTo(_local6.x, _local6.y);
_local5.moveTo(_local3.prev_br.x + this.lastScrollX, _local3.prev_br.y + this.lastScrollY);
_local5.lineTo(_local10.x, _local10.y);
if ((this.frame % 3) == 0) {
if (_local3.isPlayer) {
if (_local4 > 90) {
_local4 = 90;
}
var _local7 = 0;
var _local15 = 0;
if (_local4 < 50) {
_local7 = (_local4 - 8) / 42;
}
if (_local4 >= 50) {
_local7 = (50 - _local4) / 40;
_local15 = (_local4 - 50) / 40;
}
_root.objSounds.volume("tyre-squeal", Math.floor(_local7 * 80));
_root.objSounds.volume("tyre-squall", Math.floor(_local15 * 100));
} else {
_root.objSounds.volume("tyre-squeal", 0);
_root.objSounds.volume("tyre-squall", 0);
}
}
}
}
}
_local3.prev_fl = _local11;
_local3.prev_fr = _local8;
_local3.prev_bl = _local6;
_local3.prev_br = _local10;
_local3.prevX = _local3._x;
_local3.prevY = _local3._y;
_local9++;
}
this.bmpSkidmarks.draw(_local5, new flash.geom.Matrix(), new flash.geom.ColorTransform(), "add");
_local5.clear();
};
Game.prototype.autoOver = function () {
this.setState("racing");
this.playerCar._rotation = (this.playerCar.curSeg._rotation + this.playerCar.curSpecial._rotation) + this.playerCar.curSpecial.out._rotation;
};
Game.prototype.setState = function (newState) {
var _local4 = this.state;
this.state = newState;
switch (newState) {
case "prestart" :
case "countdown" :
case "racing" :
case "falling" :
case "auto" :
case "raceending" :
break;
case "raceover" :
if (_root.goodReplay) {
_root.replayString = this.recordingToString();
}
_root.replayGridPos = this.gridPos;
_root.replayTrack = this.objTrack.id;
_root.gotoAndStop("results");
break;
default :
trace(("setState(" + newState) + "): Unhandled");
}
};
Game.prototype.recentreCar = function () {
var _local5 = this.track._x;
var _local4 = this.track._y;
var _local3 = Maths.degToRad(this.playerCar._rotation + 180);
var _local7 = this.clip.centre.origX + (this.defOffsetW * Math.cos(_local3));
var _local6 = this.clip.centre.origY + (this.defOffsetH * Math.sin(_local3));
this.clip.centre._x = this.clip.centre._x - ((this.clip.centre._x - _local7) / this.recentreRate);
this.clip.centre._y = this.clip.centre._y - ((this.clip.centre._y - _local6) / this.recentreRate);
var _local2 = this.playerCar.holderToLocal(this.clip.centre);
this.track._x = this.track._x - _local2.x;
this.track._y = this.track._y - _local2.y;
this.track._x = Math.round(this.track._x);
this.track._y = Math.round(this.track._y);
this.trackOverlay._x = this.track._x;
this.trackOverlay._y = this.track._y;
this.carClip._x = this.track._x;
this.carClip._y = this.track._y;
this.scrollBackgroundBy(this.track._x - _local5, this.track._y - _local4);
};
Game.prototype.scrollBackgroundBy = function (x, y) {
this.lastScrollX = x;
this.lastScrollY = y;
this.trackBG._x = this.trackBG._x + (this.bgParalaxRate * x);
this.trackBG._y = this.trackBG._y + (this.bgParalaxRate * y);
if (this.trackBG._x > 0) {
this.trackBG._x = this.trackBG._x - this.trackBG.loopWidth;
}
if (this.trackBG._y > 0) {
this.trackBG._y = this.trackBG._y - this.trackBG.loopHeight;
}
if (this.trackBG._x < (-this.trackBG.loopWidth)) {
this.trackBG._x = this.trackBG._x + this.trackBG.loopWidth;
}
if (this.trackBG._y < (-this.trackBG.loopHeight)) {
this.trackBG._y = this.trackBG._y + this.trackBG.loopHeight;
}
this.lightsBG._x = this.lightsBG._x + ((this.bgParalaxRate * x) * 1.3);
this.lightsBG._y = this.lightsBG._y + ((this.bgParalaxRate * y) * 1.3);
if (this.lightsBG._x > 0) {
this.lightsBG._x = this.lightsBG._x - this.trackBG.loopWidth;
}
if (this.lightsBG._y > 0) {
this.lightsBG._y = this.lightsBG._y - this.trackBG.loopHeight;
}
if (this.lightsBG._x < (-this.trackBG.loopWidth)) {
this.lightsBG._x = this.lightsBG._x + this.trackBG.loopWidth;
}
if (this.lightsBG._y < (-this.trackBG.loopHeight)) {
this.lightsBG._y = this.lightsBG._y + this.trackBG.loopHeight;
}
this.lightsFG._x = this.lightsFG._x + ((this.bgParalaxRate * x) * 2.5);
this.lightsFG._y = this.lightsFG._y + ((this.bgParalaxRate * y) * 2.5);
if (this.lightsFG._x > 0) {
this.lightsFG._x = this.lightsFG._x - this.trackBG.loopWidth;
}
if (this.lightsFG._y > 0) {
this.lightsFG._y = this.lightsFG._y - this.trackBG.loopHeight;
}
if (this.lightsFG._x < (-this.trackBG.loopWidth)) {
this.lightsFG._x = this.lightsFG._x + this.trackBG.loopWidth;
}
if (this.lightsFG._y < (-this.trackBG.loopHeight)) {
this.lightsFG._y = this.lightsFG._y + this.trackBG.loopHeight;
}
this.bmpSkidmarks.scroll(x, y);
if (x > 0) {
this.bmpSkidmarks.fillRect(new flash.geom.Rectangle(0, 0, x, this.h), 16777215);
}
if (y > 0) {
this.bmpSkidmarks.fillRect(new flash.geom.Rectangle(0, 0, this.w, y), 16777215);
}
if (x < 0) {
this.bmpSkidmarks.fillRect(new flash.geom.Rectangle(this.w + x, 0, -x, this.h), 16777215);
}
if (y < 0) {
this.bmpSkidmarks.fillRect(new flash.geom.Rectangle(0, this.h + y, this.w, -y), 16777215);
}
};
Game.prototype.addNextTrackSeg = function () {
var _local10;
var _local13;
if (this.arrSegs.length != 0) {
var _local12 = this.arrSegs[this.arrSegs.length - 1];
_local13 = _local12.idx + 1;
} else {
_local13 = 0;
}
if (_local13 >= this.objTrack.segments.length) {
return(false);
}
var _local8 = this.track.getNextHighestDepth();
this.track.attachMovie("segment", "segment" + _local8, _local8);
this.trackOverlay.attachMovie("segment", "segment" + _local8, _local8);
this.radarTop.attachMovie("segment", "segment" + _local8, _local8);
this.radarBottom.attachMovie("segment", "segment" + _local8, _local8);
var _local3 = this.track["segment" + _local8];
var _local5 = this.trackOverlay["segment" + _local8];
var _local7 = this.radarBottom["segment" + _local8];
var _local6 = this.radarTop["segment" + _local8];
var _local11 = this.objTrack.segments[_local13];
_local3.idx = _local13;
_local3.pieceID = _local11;
_local5.otherSeg = _local3;
_local3.otherSeg = _local5;
_local3.radarSeg = _local7;
_local3.radarTopSeg = _local6;
_local5.gotoAndStop(_local11);
_local3.gotoAndStop(_local11);
_local7.gotoAndStop(_local11);
_local6.gotoAndStop(_local11);
_local5.segPrev._visible = false;
_local5.segNext._visible = false;
_local5.hit._visible = false;
_local5.bottom._visible = false;
_local5.radar._visible = false;
_local5.radarTop._visible = false;
_local3.segPrev._visible = false;
_local3.segNext._visible = false;
_local3.hit._alpha = 0;
_local3.top._visible = false;
_local3.radar._visible = false;
_local3.radarTop._visible = false;
_local7.segPrev._visible = false;
_local7.segNext._visible = false;
_local7.hit._visible = false;
_local7.top._visible = false;
_local7.bottom._visible = false;
_local7.radarTop._visible = false;
_local6.segPrev._visible = false;
_local6.segNext._visible = false;
_local6.hit._visible = false;
_local6.top._visible = false;
_local6.bottom._visible = false;
_local6.radar._visible = false;
if (_local12 != undefined) {
_local3._rotation = _local12._rotation + _local12.segNext._rotation;
_local5._rotation = _local3._rotation;
_local7._rotation = _local3._rotation;
_local6._rotation = _local3._rotation;
_local10 = _local3.segPrev.holderToLocal(this.track);
var _local9 = _local12.segNext.holderToLocal(this.track);
_local3._x = -Math.round(_local10.x - _local9.x);
_local3._y = -Math.round(_local10.y - _local9.y);
_local5._x = -Math.round(_local10.x - _local9.x);
_local5._y = -Math.round(_local10.y - _local9.y);
_local7._x = -Math.round(_local10.x - _local9.x);
_local7._y = -Math.round(_local10.y - _local9.y);
_local6._x = -Math.round(_local10.x - _local9.x);
_local6._y = -Math.round(_local10.y - _local9.y);
} else {
_local3._rotation = this.objTrack.initialRotationDeg;
_local5._rotation = this.objTrack.initialRotationDeg;
_local7._rotation = this.objTrack.initialRotationDeg;
_local6._rotation = this.objTrack.initialRotationDeg;
}
_local3.specials = [];
var _local4 = 0;
var _local2 = _local3["s" + _local4];
while (_local2 != undefined) {
_local2._alpha = false;
_local5["s" + _local4]._visible = false;
_local7["s" + _local4]._visible = false;
_local6["s" + _local4]._visible = false;
_local3.specials.push(_local2);
if (_local2.checkpoint != undefined) {
_local2.idx = this.arrCheckpoints.length;
this.arrCheckpoints.push(_local2);
}
_local4++;
_local2 = _local3["s" + _local4];
}
_local5.cacheAsBitmap = true;
_local3.cacheAsBitmap = true;
_local7.cacheAsBitmap = true;
_local6.cacheAsBitmap = true;
this.arrSegs.push(_local3);
return(true);
};
Game.prototype.recordFrame = function () {
this.playerCar.progress = (100 * this.playerCar.lap) + this.playerCar.curSeg.idx;
if (this.recording.length > this.objTrack.parFrames) {
return(undefined);
}
var _local2 = {};
_local2.x = Math.round(this.playerCar._x);
_local2.y = Math.round(this.playerCar._y);
_local2.r = Math.round(this.playerCar._rotation);
_local2.p = this.playerCar.progress;
if (this.playerCar._z != 0) {
_local2.z = Math.round(this.playerCar._z);
}
this.recording.push(_local2);
};
Game.prototype.recordingToString = function () {
var _local5 = "";
_local5 = _local5 + (("c" + this.playerCar.carType) + "|");
var _local3 = 0;
while (_local3 < this.recording.length) {
var _local2 = this.recording[_local3];
var _local4 = (((((_local2.x + ",") + _local2.y) + ",") + _local2.r) + ",") + _local2.p;
if (_local2.z != undefined) {
_local4 = _local4 + ("," + _local2.z);
}
_local5 = _local5 + (_local4 + "|");
_local3++;
}
_local5 = _local5 + "E";
return(_local5);
};
Game.prototype.registerReplayString = function (strReplay) {
var _local5 = {};
_local5.clip = undefined;
_local5.carType = "unset";
_local5.frames = [];
var _local6 = strReplay.split("|");
var _local3 = 0;
while (_local3 < _local6.length) {
var _local4 = _local6[_local3];
switch (_local4.substr(0, 1)) {
case "c" :
_local5.carType = _local4.substr(1);
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "-" :
arrCoords = _local4.split(",");
var _local2 = {};
_local2.x = parseInt(arrCoords[0]);
_local2.y = parseInt(arrCoords[1]);
_local2.r = parseInt(arrCoords[2]);
_local2.p = parseInt(arrCoords[3]);
if (arrCoords[4] != undefined) {
_local2.z = parseInt(arrCoords[4]);
}
_local5.frames.push(_local2);
break;
case "F" :
_local3 = _local6.length;
}
_local3++;
}
this.replays.push(_local5);
var _local8 = this.carClip.getNextHighestDepth();
this.carClip.attachMovie("car", "car" + _local8, _local8);
this.radarCars.attachMovie("radarCar", "radarCar" + _local8, _local8);
var _local7 = this.carClip["car" + _local8];
var _local9 = this.radarCars["radarCar" + _local8];
this.arrCars.push(_local7);
_local7.marker.gotoAndStop("idle");
_local7.objReplay = _local5;
_local7.replayOffsetFrames = 0;
_local7.isPlayer = false;
this.giveCarProperties(_local7, _local5.carType);
_local7._x = _local5.frames[_local7.replayOffsetFrames].x;
_local7._y = _local5.frames[_local7.replayOffsetFrames].y;
_local7._z = ((_local5.frames[_local7.replayOffsetFrames].z == undefined) ? 0 : (_local5.frames[_local7.replayOffsetFrames].z));
_local7._rotation = _local5.frames[_local7.replayOffsetFrames].r;
_local9.gotoAndStop("npc");
_local7.radarCar = _local9;
_local9.car = _local7;
this.updateRadarCar(_local9);
};
Game.prototype.updateCarZ = function (car) {
var _local3 = 100 + car._z;
car._xscale = _local3;
car._yscale = _local3;
car._alpha = Math.min(_local3, 100);
car.shadowFilter.distance = this.shadowDist + car._z;
if (car.shadowFilter.distance < 0) {
car.shadowFilter.distance = 0;
}
car.filters = [car.shadowFilter];
};
Game.prototype.updateRadarCar = function (radarCar) {
radarCar._x = radarCar.car._x;
radarCar._y = radarCar.car._y;
};
Game.prototype.updateReplayCars = function () {
var _local8 = this.playerCar.weapon.h0.holderToGlobal();
var _local9 = this.playerCar.weapon.h1.holderToGlobal();
var _local7 = 0;
while (_local7 < this.arrCars.length) {
var _local2 = this.arrCars[_local7];
if (_local2.isPlayer) {
} else if (_local2._visible == false) {
} else if (_local2.dead) {
_local2._x = _local2._x + _local2.vx;
_local2._y = _local2._y + _local2.vy;
_local2._z = _local2._z + _local2.vz;
_local2._rotation = _local2._rotation + _local2.vr;
if (_local2.onTrack == true) {
_local2.onTrack = false;
var _local3 = 0;
while (_local3 < this.arrSegs.length) {
var _local5 = this.arrSegs[_local3];
var _local4 = _local2.holderToGlobal();
if (_local5.hit.hitTest(_local4.x, _local4.y, true)) {
_local2.onTrack = true;
_local3 = this.arrSegs.length;
}
_local3++;
}
} else {
_local2.vx = _local2.vx * 0.85;
_local2.vy = _local2.vy * 0.85;
_local2.vz = _local2.vz - this.gravity;
if (_local2._z <= -99) {
_local2._visible = false;
_local2.vx = 0;
_local2.vy = 0;
_local2.vr = 0;
}
}
this.updateCarZ(_local2);
} else if (this.frame >= _local2.objReplay.frames.length) {
} else {
if (_local2.progress != _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].p) {
_local2.segFrameTime = 0;
_local2.progress = _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].p;
}
_local2._x = _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].x;
_local2._y = _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].y;
_local2._z = ((_local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].z == undefined) ? 0 : (_local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].z));
_local2._rotation = _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].r;
_local2.segFrameTime++;
this.updateCarZ(_local2);
this.updateRadarCar(_local2.radarCar);
if (_local8 != undefined) {
if (_local2.hit.hitTest(_local8.x, _local8.y, true) || (_local2.hit.hitTest(_local9.x, _local9.y, true))) {
_local2.flash.gotoAndPlay("flash");
_local2.dead = true;
_local2.vx = _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].x - _local2.objReplay.frames[(this.frame + _local2.replayOffsetFrames) - 1].x;
_local2.vy = _local2.objReplay.frames[this.frame + _local2.replayOffsetFrames].y - _local2.objReplay.frames[(this.frame + _local2.replayOffsetFrames) - 1].y;
_local2.vx = _local2.vx + (0.2 * this.playerCar.vx);
_local2.vy = _local2.vy + (0.2 * this.playerCar.vy);
_local2.vr = ((Maths.randomNum(1, 100) > 5) ? 1 : -1) * Maths.randomNum(5, 10);
_local2.vz = 0;
var _local6 = Maths.vectorLength(_local2.vx, _local2.vy);
if (_local6 < 8) {
_local2.vx = (8 * _local2.vx) / _local6;
_local2.vy = (8 * _local2.vy) / _local6;
}
_local2.onTrack = true;
_local2.radarCar.removeMovieClip();
this.destroyedCars++;
}
}
}
_local7++;
}
};
Game.prototype.updateTimer = function (frame) {
if (frame == undefined) {
frame = this.frame;
}
var _local3 = Math.floor(frame / 30);
var _local7 = Math.floor(_local3 / 60);
var _local6 = _local3 % 60;
var _local4 = (frame / 30) - _local3;
var _local2 = {minutes:Maths.formatNum(_local7, 2), seconds:Maths.formatNum(_local6, 2), tenths:Maths.formatNum(_local4 * 100, 2)};
_local2.strTime = (((Maths.formatNum(_local7, 2) + ":") + Maths.formatNum(_local6, 2)) + ":") + Maths.formatNum(_local4 * 100, 2);
this.panel.txtTime.htmlText = ("<i>" + _local2.strTime) + "</i>";
return(_local2);
};
Game.prototype.updatePosition = function () {
var _local4 = 1;
var _local3 = 0;
while (_local3 < this.arrCars.length) {
var _local2 = this.arrCars[_local3];
if (_local2.isPlayer) {
} else if (_local2.dead) {
} else if (_local2.progress > this.playerCar.progress) {
_local4++;
} else if (_local2.progress == this.playerCar.progress) {
if (_local2.segFrameTime < this.playerCar.segFrameTime) {
_local4++;
}
}
_local3++;
}
this.panel.position.gotoAndStop(_local4);
return(_local4);
};
Game.prototype.updateLaps = function () {
if (this.lapStartFrame != undefined) {
var _local2 = this.frame - this.lapStartFrame;
trace("Lap: " + _local2);
if (_local2 < this.bestLapFrames) {
this.bestLapFrames = _local2;
trace("New best lap: " + _local2);
}
}
this.panel.txtLap.htmlText = ((("<i>LAP " + this.playerCar.lap) + " OF ") + this.objTrack.laps) + "</i>";
};
Game.prototype.raceOver = function () {
this.setState("raceending");
_root.finishPosition = this.panel.position._currentframe;
_root.totalCars = this.arrCars.length;
_root.finishFrame = this.frame;
_root.bestLapFrames = this.bestLapFrames;
_root.bestLapTime = this.updateTimer(this.bestLapFrames);
_root.finishTime = this.updateTimer(this.frame);
_root.destroyedCars = this.destroyedCars;
_root.goodReplay = ((this.frame < this.objTrack.parFrames) ? true : false);
if ((_root.finishPosition < 3) && (_root.goodReplay)) {
_root.objSounds.play("finish-good");
}
if ((_root.finishPosition > 6) || (!_root.goodReplay)) {
_root.objSounds.play("finish-poor");
}
this.playerCar.drag = 0.85;
};
Game.prototype.evt = function () {
};
System.security.loadPolicyFile("http://www.hyperlaunch.com/highscoreservice/crossdomain.php");
HighscoreService.prototype.traceHighscores = function () {
if (!_level0._highscoreServiceLoaded) {
trace("Warning: Score submission service has not finished loading yet");
}
if (!this.scoresLoaded) {
trace("Highscore table has not loaded yet");
return(undefined);
}
var _local6 = this.objXML.getNodeSiblingCount("highscores", "score");
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "rank");
var _local5 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "score");
var _local4 = this.objXML.getNodeValue(("highscores/score[" + _local2) + "]");
trace((((_local3 + ": ") + _local4) + " => ") + _local5);
_local2++;
}
};
HighscoreService.prototype.displayHighscores = function (displayClip, depth, elementLinkage, elementSpacing, displayRowsLimit) {
this.displayClip = displayClip;
this.depth = depth;
this.elementLinkage = elementLinkage;
this.elementSpacing = elementSpacing;
this.displayRowsLimit = ((displayRowsLimit == undefined) ? (this.scoreCount) : (displayRowsLimit));
this.displayDetailsSaved = true;
this._displayScores();
};
HighscoreService.prototype.submitScore = function (name, score, extraInfo) {
if (!_level0._highscoreServiceLoaded) {
trace("Cannot submit score as score submission service has not finished loading yet");
return(undefined);
}
_level19356.submitScore(this, name, score, extraInfo);
};
HighscoreService.prototype._displayScores = function () {
if (!this.displayDetailsSaved) {
trace("Attempted to display scores with no display details in highscore object");
return(undefined);
}
var _local6 = this.displayClip.createEmptyMovieClip("_highscoreClip", this.depth);
var _local7 = this.objXML.getNodeSiblingCount("highscores", "score");
var _local2 = 0;
while (_local2 < Math.min(_local7, this.displayRowsLimit)) {
var _local3 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "rank");
var _local5 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "score");
var _local4 = this.objXML.getNodeValue(("highscores/score[" + _local2) + "]");
_local6.attachMovie(this.elementLinkage, "scoreElement" + _local2, _local2);
element = _local6["scoreElement" + _local2];
element._x = 0;
element._y = _local2 * this.elementSpacing;
element.txtRank.text = _local3;
element.txtName.text = _local4;
element.txtScore.text = this._treatScore(_local5);
_local2++;
}
};
HighscoreService.prototype._treatScore = function (intScore) {
return(intScore);
};
XML.prototype.getNodeValue = function (strPath) {
var _local2 = this.findNode(strPath);
if (_local2 == undefined) {
return(undefined);
}
if (_local2.firstChild.nodeType != 3) {
return(undefined);
}
return(_local2.firstChild.nodeValue);
};
XML.prototype.getNodeAttribute = function (strPath, strAttribute) {
var _local2 = this.findNode(strPath);
if (_local2 == undefined) {
return(undefined);
}
return(_local2.attributes[strAttribute]);
};
XML.prototype.getNodeSiblingCount = function (strPath, strSiblingName) {
var _local3 = this.findNode(strPath);
if (_local3 == undefined) {
return(undefined);
}
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local3.childNodes.length) {
if (_local3.childNodes[_local2].nodeName.toLowerCase() == strSiblingName.toLowerCase()) {
_local4++;
}
_local2++;
}
return(_local4);
};
XML.prototype.findNode = function (strPath) {
var _local4 = this;
var _local11 = strPath.toLowerCase().split("/");
var _local9 = 0;
while (_local9 < _local11.length) {
var _local8 = 0;
var _local3 = _local11[_local9];
var _local7 = _local3.indexOf("[");
if (_local7 != -1) {
var _local10 = _local3.slice(_local7 + 1, _local3.length - 1);
_local8 = Number(_local10);
_local3 = _local3.slice(0, _local7);
}
var _local5;
var _local6 = 0;
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
if (_local4.childNodes[_local2].nodeName.toLowerCase() == _local3) {
if (_local6 == _local8) {
_local5 = _local2;
_local2 = _local4.childNodes.length;
} else {
_local6++;
}
}
_local2++;
}
if (_local5 == undefined) {
return(undefined);
}
_local4 = _local4.childNodes[_local5];
_local9++;
}
return(_local4);
};
var objHS_LearnersLoop = new HighscoreService("SpeedRacer_learnersloop", 100);
var objHS_RacersRun = new HighscoreService("SpeedRacer_racersrun", 100);
var objHS_Rollercoaster = new HighscoreService("SpeedRacer_rollercoaster", 100);
highScoresButton.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.trackID = undefined;
gotoAndStop ("highScores");
};
highScoresButton.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
highScoresButton.onDragOut = (highScoresButton.onReleaseOutside = (highScoresButton.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
playGameButton.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
gotoAndStop ("introScreen");
};
playGameButton.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
playGameButton.onDragOut = (playGameButton.onReleaseOutside = (playGameButton.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
stfButton.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
gotoAndStop ("stf");
};
stfButton.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
stfButton.onDragOut = (stfButton.onReleaseOutside = (stfButton.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
contentClip.alphaTo(100, 1);
Frame 61
_level0.trackPoint("Section_IntroScreen");
_root.objSounds.stopAllSounds();
if (_root.playerCar == undefined) {
_root.playerCar = "car1";
_root.carNum = 3;
_root.gameMode = "practice";
_root.trackID = "learnersloop";
}
stop();
Frame 71
function changeDetails() {
chooseCar.carProfile.activeVehicle.gotoAndStop(cars[playerCar].idx);
chooseCar.graph.txtTitle.htmlText = ("<i>" + cars[playerCar].name) + "</i>";
chooseCar.carProfile.profileText.text = cars[playerCar].description;
chooseCar.carProfile.alphaTo(100, 0.5);
chooseCar.graph.attribute1.tween("_xscale", 100 * cars[playerCar].topSpeed, 1);
chooseCar.graph.attribute2.tween("_xscale", 100 * cars[playerCar].acceleration, 1);
chooseCar.graph.attribute3.tween("_xscale", 100 * cars[playerCar].traction, 1);
chooseCar.graph.attribute4.tween("_xscale", 100 * cars[playerCar].jump, 1);
}
_level0.trackPoint("Section_CarSelector");
_root.objSounds.stopAllSounds();
stop();
changeDetails();
Frame 81
_level0.trackPoint("Section_EventTypeSelector");
_root.objSounds.stopAllSounds();
selectEvent.alphaTo(100, 1);
stop();
Frame 91
_level0.trackPoint("Section_TrackSelector");
stop();
Frame 101
_level0.trackPoint("Section_Gameplay");
_level0.trackPoint("Game_Car_" + _root.playerCar);
_level0.trackPoint("Game_Track_" + _root.trackID);
_level0.trackPoint("Game_Event_" + _root.gameMode);
stop();
var objGame = new Game(gameClip, _root.trackList[_root.trackID]);
addReplays(objGame);
objGame.addPlayerCar(_root.gridPos);
Frame 111
_level0.trackPoint("Section_Results");
setupResults();
saveReplay();
_root.objSounds.stopAllSounds();
Frame 121
function showHighscores(trackID) {
switch (trackID) {
case "learnersloop" :
_root.content.highscores.txtTitle.htmlText = "<i>LEARNER'S LOOP</i>";
objHS_LearnersLoop.displayHighscores(_root.content.highscores.highscoreHolder, 1, "highscoreElement", 33);
break;
case "racersrun" :
_root.content.highscores.txtTitle.htmlText = "<i>RACER'S RUN</i>";
objHS_RacersRun.displayHighscores(_root.content.highscores.highscoreHolder, 1, "highscoreElement", 33);
break;
case "rollercoaster" :
_root.content.highscores.txtTitle.htmlText = "<i>ROLLERCOASTER</i>";
objHS_Rollercoaster.displayHighscores(_root.content.highscores.highscoreHolder, 1, "highscoreElement", 33);
}
objScroll.init(3300);
}
_level0.trackPoint("Section_Highscores");
_root.objSounds.stopAllSounds();
objScroll = new scrollBar(_root.content.highscores, _root.content.highscores.highscoreHolder, _root.content.highscores.mask, _root.content.highscores.slider, _root.content.highscores.draggerBar, _root.content.highscores.btnUp, _root.content.highscores.btnDown, false, 1);
objScroll.init(3300);
if (_root.trackID == undefined) {
showHighscores("learnersloop");
_root.content.submitForm._visible = false;
_root.content.submitButton._visible = false;
_root.content.track1Button.onRelease = function () {
showHighscores("learnersloop");
_root.objSounds.play("rollover-bleepbleep");
};
_root.content.track2Button.onRelease = function () {
showHighscores("racersrun");
_root.objSounds.play("rollover-bleepbleep");
};
_root.content.track3Button.onRelease = function () {
showHighscores("rollercoaster");
_root.objSounds.play("rollover-bleepbleep");
};
_root.content.track1Button.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
};
_root.content.track1Button.onDragOut = (_root.content.track1Button.onReleaseOutside = (_root.content.track1Button.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
_root.content.track2Button.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
};
_root.content.track2Button.onDragOut = (_root.content.track2Button.onReleaseOutside = (_root.content.track2Button.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
_root.content.track3Button.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
};
_root.content.track3Button.onDragOut = (_root.content.track3Button.onReleaseOutside = (_root.content.track3Button.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
} else {
showHighscores(_root.trackID);
_root.content.track1Button._visible = false;
_root.content.track2Button._visible = false;
_root.content.track3Button._visible = false;
_root.content.submitButton.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
_root.content.submitButton.onDragOut = (_root.content.submitButton.onReleaseOutside = (_root.content.submitButton.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
_root.content.submitButton.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
var _local4 = true;
_root.content.submitForm.errNickname._visible = false;
if (_root.content.submitForm.txtNickname.text == "") {
_local4 = false;
_root.content.submitForm.errNickname._visible = true;
}
if (_local4) {
_level0.trackPoint("Highscore_Submitted");
var _local3;
switch (_root.trackID) {
case "learnersloop" :
_local3 = objHS_LearnersLoop;
break;
case "racersrun" :
_local3 = objHS_RacersRun;
break;
case "rollercoaster" :
_local3 = objHS_Rollercoaster;
}
var _local5 = _root.content.submitForm.txtNickname.text;
var _local6 = _root.content.submitForm.txtName.text;
var _local7 = _root.content.submitForm.txtEmail.text;
_local3.submitScore(_local5, _root.score, {name:_local6, email:_local7});
_root.content.submitForm.alphaTo(0, 1, "linear");
_root.content.submitButton.alphaTo(0, 1, "linear", 0, function () {
_root.content.submitButton._visible = false;
});
_root.content.track1Button._visible = true;
_root.content.track2Button._visible = true;
_root.content.track3Button._visible = true;
_root.content.track1Button._alpha = 0;
_root.content.track2Button._alpha = 0;
_root.content.track3Button._alpha = 0;
_root.content.track1Button.alphaTo(100, 1);
_root.content.track2Button.alphaTo(100, 1);
_root.content.track3Button.alphaTo(100, 1);
_root.content.track1Button.onRelease = function () {
showHighscores("learnersloop");
_root.objSounds.play("rollover-bleepbleep");
};
_root.content.track2Button.onRelease = function () {
showHighscores("racersrun");
_root.objSounds.play("rollover-bleepbleep");
};
_root.content.track3Button.onRelease = function () {
showHighscores("rollercoaster");
_root.objSounds.play("rollover-bleepbleep");
};
_root.content.track1Button.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
_root.content.track1Button.onDragOut = (_root.content.track1Button.onReleaseOutside = (_root.content.track1Button.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
_root.content.track2Button.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
_root.content.track2Button.onDragOut = (_root.content.track2Button.onReleaseOutside = (_root.content.track2Button.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
_root.content.track3Button.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
_root.content.track3Button.onDragOut = (_root.content.track3Button.onReleaseOutside = (_root.content.track3Button.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
}
};
}
_root.content.btnPlayAgain.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.content.btnPlayAgain.alphaTo(0, 0.5);
_root.content.play();
};
_root.content.btnPlayAgain.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
_root.content.btnPlayAgain.onDragOut = (_root.content.btnPlayAgain.onReleaseOutside = (_root.content.btnPlayAgain.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
Frame 131
_level0.trackPoint("Section_STF");
_root.objSounds.stopAllSounds();
_root.Datacap = function (formID, thirdPartySubmit) {
this.formID = formID;
this.thirdPartySubmit = thirdPartySubmit;
this.controls = [];
this.formInstance = undefined;
this.sendingFrame = "";
this.successFrame = "";
this.failureFrame = "";
this.userID = 0;
this.customIsValid = undefined;
this.preSubmit = undefined;
this.onSuccess = undefined;
this.onFailure = undefined;
this.datacapURL = "http://www.hyperlaunch.com/datacap/datacap";
this.datacapExtension = "php";
if (_level0.debug) {
trace("Creating data form, ID=" + formID);
}
var _local4 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local4.data.userID == undefined) {
_local4.data.userID = Math.floor(Math.random() * 100000000) + 100000000;
}
this.userID = _local4.data.userID;
_local4.flush();
this.registerTextbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered textbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for textbox " + varName) + "");
}
this.controls.push({style:"textbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateTextbox, autoFill:this.autoFillTextbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateTextbox = function (control) {
if (control.errorMarker != undefined) {
if ((control.instance.text == undefined) || (control.instance.text == "")) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillTextbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerEmailbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered emailbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for emailbox " + varName) + "");
}
this.controls.push({style:"emailbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateEmailbox, autoFill:this.autoFillEmailbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateEmailbox = function (control) {
if (control.errorMarker != undefined) {
var _local3 = true;
if (control.instance.text == undefined) {
_local3 = false;
}
if (control.instance.text == "") {
_local3 = false;
}
var _local5 = control.instance.text.split("@");
if (_local5.length != 2) {
_local3 = false;
}
if (_local5[0] == "") {
_local3 = false;
}
var _local2 = _local5[1].split(".");
if (_local2.length < 2) {
_local3 = false;
}
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == "") {
_local3 = false;
}
_local1++;
}
if (_local3) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = false;
return(true);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = true;
return(false);
}
return(true);
};
this.autoFillEmailbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerNumberbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered numberbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for numberbox " + varName) + "");
}
this.controls.push({style:"numberbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateNumberbox, autoFill:this.autoFillNumberbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateNumberbox = function (control) {
if (control.errorMarker != undefined) {
if (((control.instance.text == undefined) || (control.instance.text == "")) || (isNaN(parseInt(control.instance.text)))) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillNumberbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerCheckbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered checkbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for checkbox " + varName) + "");
}
this.controls.push({style:"checkbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateCheckbox, autoFill:this.autoFillCheckbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateCheckbox = function (control) {
if (control.errorMarker != undefined) {
if (_level0.debug) {
trace((("Validating " + control.style) + " ") + control.varName);
}
if (control.instance.selected != true) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillCheckbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.selected = _local1.data[control.varName];
control.instance.gotoAndStop((_local1.data[control.varName] ? "checked" : (unchecked)));
}
};
this.registerRadioSet = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered radioset " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for radioset " + varName) + "");
}
this.controls.push({style:"radioset", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateRadioSet, autoFill:this.autoFillRadioSet});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateRadioSet = function (control) {
if (control.errorMarker != undefined) {
if (control.instance.selection == undefined) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillRadioSet = function (control) {
return(undefined);
};
this.registerDropdown = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered dropdown " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for dropdown " + varName) + "");
}
this.controls.push({style:"dropdown", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateDropdown, autoFill:this.autoFillDropdown});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateDropdown = function (control) {
if (control.errorMarker != undefined) {
if (control.instance.selectedIndex == 0) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillDropdown = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.selectedIndex = _local1.data[control.varName];
}
};
this.registerSubmit = function (varName, instance, value) {
if (_level0.debug) {
trace((("Registered submit button " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for submit button " + varName) + "");
}
this.controls.push({style:"submit", varName:varName, instance:instance, value:value});
instance.objForm = this;
instance.tabIndex = this.controls.length;
instance.onRelease = this.submitForm;
};
this.setHiddenValue = function (varName, value) {
if (_level0.debug) {
trace((("Set hidden value " + varName) + "=") + value);
}
var _local3;
var _local2 = 0;
while (_local2 < this.controls.length) {
if (this.controls[_local2].style == "hidden") {
if (this.controls[_local2].varName == varName) {
_local3 = _local2;
}
}
_local2++;
}
if (_local3 == undefined) {
this.controls.push({style:"hidden", varName:varName, value:value});
} else {
this.controls[_local3].value = value;
}
};
this.registerFrames = function (sendingFrame, successFrame, failureFrame, formInstance) {
if (_level0.debug) {
trace("Registered frames for instance " + formInstance);
}
if (formInstance == undefined) {
trace("Error: Registering frames, form instance invalid");
}
this.formInstance = formInstance;
this.sendingFrame = sendingFrame;
this.successFrame = successFrame;
this.failureFrame = failureFrame;
};
this.registerCallbacks = function (customIsValid, preSubmit, onSuccess, onFailure) {
if (_level0.debug) {
trace("Registered callbacks");
}
this.customIsValid = customIsValid;
this.preSubmit = preSubmit;
this.onSuccess = onSuccess;
this.onFailure = onFailure;
};
this.submitForm = function () {
if (_level0.debug) {
trace("Submit pressed - validating");
}
var _local6 = true;
if (this.objForm.customIsValid != undefined) {
if (!this.objForm.customIsValid()) {
_local6 = false;
}
}
var _local2 = 0;
while (_local2 < this.objForm.controls.length) {
if (this.objForm.controls[_local2].isValid != undefined) {
if (!this.objForm.controls[_local2].isValid(this.objForm.controls[_local2])) {
_local6 = false;
}
}
_local2++;
}
if (_local6) {
if (_level0.debug) {
trace("Form validated - sending");
}
if (_level0.debug) {
trace("Submitting form");
}
var _local5 = new LoadVars();
var _local7 = new LoadVars();
_local7.objForm = this.objForm;
this.objForm.preSubmit();
var _local4 = SharedObject.getLocal("hyperlaunchDatacap");
_local2 = 0;
while (_local2 < this.objForm.controls.length) {
var _local3 = "";
switch (this.objForm.controls[_local2].style) {
case "textbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "emailbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "numberbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "checkbox" :
_local3 = (this.objForm.controls[_local2].instance.selected ? true : false);
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "radioset" :
_local3 = this.objForm.controls[_local2].instance.selection.data;
break;
case "dropdown" :
_local3 = this.objForm.controls[_local2].instance.selectedItem.data;
_local4.data[this.objForm.controls[_local2].varName] = this.objForm.controls[_local2].instance.selectedIndex;
break;
case "hidden" :
_local3 = this.objForm.controls[_local2].value;
break;
case "submit" :
_local3 = this.objForm.controls[_local2].value;
this.objForm.controls[_local2].instance._visible = false;
break;
default :
trace("Unhandled component style " + this.objForm.controls[_local2].style);
}
if (_level0.debug) {
trace(((" " + this.objForm.controls[_local2].varName) + " = ") + _local3);
}
_local5[this.objForm.controls[_local2].varName] = _local3;
_local2++;
}
_local4.flush();
_local5.userID = this.objForm.userID;
_local5.formID = this.objForm.formID;
_local7.onLoad = function (success) {
trace("SUCCESS: " + success);
if (success) {
if (_level0.debug) {
trace("Success");
}
this.objForm.onSuccess();
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.successFrame);
}
} else {
if (_level0.debug) {
trace("Failed");
}
this.objForm.onFailure();
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.failureFrame);
}
}
};
var _local8 = ((this.objForm.datacapURL + ((this.objForm.thirdPartySubmit == undefined) ? "" : ("_" + this.objForm.thirdPartySubmit))) + ".") + this.objForm.datacapExtension;
_local5.sendAndLoad(_local8, _local7, "POST");
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.sendingFrame);
}
} else if (_level0.debug) {
trace("Form data not validated");
}
};
this.autoFill = function () {
var _local2 = 0;
while (_local2 < this.controls.length) {
this.controls[_local2].autoFill(this.controls[_local2]);
_local2++;
}
};
this.onKeyDown = function () {
if ((Key.isDown(16) && (Key.isDown(17))) && (Key.isDown(192))) {
this.autoFill();
}
};
Key.addListener(this);
trace("Press ctrl+shift+@ to autofill form with previously entered values");
this.initCountryDropDown = function (dropdownClip) {
dropdownClip.addItem("Select Country", "NIL");
dropdownClip.addItem("United Kingdom", "GB");
dropdownClip.addItem("Ireland", "IE");
dropdownClip.addItem("France", "FR");
dropdownClip.addItem("Spain", "ES");
dropdownClip.addItem("Netherlands", "NL");
dropdownClip.addItem("Italy", "IT");
dropdownClip.addItem("Germany", "DE");
dropdownClip.addItem("United States", "US");
dropdownClip.addItem("Canada", "CA");
dropdownClip.addItem("---------------------", "--");
dropdownClip.addItem("Afghanistan", "AF");
dropdownClip.addItem("Albania", "AL");
dropdownClip.addItem("Algeria", "DZ");
dropdownClip.addItem("American Samoa", "AS");
dropdownClip.addItem("Andorra", "AD");
dropdownClip.addItem("Angola", "AO");
dropdownClip.addItem("Anguilla", "AI");
dropdownClip.addItem("Antarctica", "AQ");
dropdownClip.addItem("Antigua And Barbuda", "AG");
dropdownClip.addItem("Argentina", "AR");
dropdownClip.addItem("Armenia", "AM");
dropdownClip.addItem("Aruba", "AW");
dropdownClip.addItem("Australia", "AU");
dropdownClip.addItem("Austria", "AT");
dropdownClip.addItem("Azerbaijan", "AZ");
dropdownClip.addItem("Bahamas", "BS");
dropdownClip.addItem("Bahrain", "BH");
dropdownClip.addItem("Bangladesh", "BD");
dropdownClip.addItem("Barbados", "BB");
dropdownClip.addItem("Belarus", "BY");
dropdownClip.addItem("Belgium", "BE");
dropdownClip.addItem("Belize", "BZ");
dropdownClip.addItem("Benin", "BJ");
dropdownClip.addItem("Bermuda", "BM");
dropdownClip.addItem("Bhutan", "BT");
dropdownClip.addItem("Bolivia", "BO");
dropdownClip.addItem("Bosnia And Herzegowina", "BA");
dropdownClip.addItem("Botswana", "BW");
dropdownClip.addItem("Bouvet Island", "BV");
dropdownClip.addItem("Brazil", "BR");
dropdownClip.addItem("British Indian Ocean Territory", "IO");
dropdownClip.addItem("Brunei Darussalam", "BN");
dropdownClip.addItem("Bulgaria", "BG");
dropdownClip.addItem("Burkina Faso", "BF");
dropdownClip.addItem("Burundi", "BI");
dropdownClip.addItem("Cambodia", "KH");
dropdownClip.addItem("Cameroon", "CM");
dropdownClip.addItem("Cape Verde", "CV");
dropdownClip.addItem("Cayman Islands", "KY");
dropdownClip.addItem("Central African Republic", "CF");
dropdownClip.addItem("Chad", "TD");
dropdownClip.addItem("Chile", "CL");
dropdownClip.addItem("China", "CN");
dropdownClip.addItem("Christmas Island", "CX");
dropdownClip.addItem("Cocos (Keeling) Islands", "CC");
dropdownClip.addItem("Colombia", "CO");
dropdownClip.addItem("Comoros", "KM");
dropdownClip.addItem("Congo", "CG");
dropdownClip.addItem("Cook Islands", "CK");
dropdownClip.addItem("Costa Rica", "CR");
dropdownClip.addItem("Cote D'Ivoire", "CI");
dropdownClip.addItem("Croatia (Local Name: Hrvatska)", "HR");
dropdownClip.addItem("Cuba", "CU");
dropdownClip.addItem("Cyprus", "CY");
dropdownClip.addItem("Czech Republic", "CZ");
dropdownClip.addItem("Denmark", "DK");
dropdownClip.addItem("Djibouti", "DJ");
dropdownClip.addItem("Dominica", "DM");
dropdownClip.addItem("Dominican Republic", "DO");
dropdownClip.addItem("East Timor", "TP");
dropdownClip.addItem("Ecuador", "EC");
dropdownClip.addItem("Egypt", "EG");
dropdownClip.addItem("El Salvador", "SV");
dropdownClip.addItem("Equatorial Guinea", "GQ");
dropdownClip.addItem("Eritrea", "ER");
dropdownClip.addItem("Estonia", "EE");
dropdownClip.addItem("Ethiopia", "ET");
dropdownClip.addItem("Falkland Islands (Malvinas)", "FK");
dropdownClip.addItem("Faroe Islands", "FO");
dropdownClip.addItem("Fiji", "FJ");
dropdownClip.addItem("Finland", "FI");
dropdownClip.addItem("French Guiana", "GF");
dropdownClip.addItem("French Polynesia", "PF");
dropdownClip.addItem("French Southern Territories", "TF");
dropdownClip.addItem("Gabon", "GA");
dropdownClip.addItem("Gambia", "GM");
dropdownClip.addItem("Georgia", "GE");
dropdownClip.addItem("Ghana", "GH");
dropdownClip.addItem("Gibraltar", "GI");
dropdownClip.addItem("Greece", "GR");
dropdownClip.addItem("Greenland", "GL");
dropdownClip.addItem("Grenada", "GD");
dropdownClip.addItem("Guadeloupe", "GP");
dropdownClip.addItem("Guam", "GU");
dropdownClip.addItem("Guatemala", "GT");
dropdownClip.addItem("Guinea", "GN");
dropdownClip.addItem("Guinea-Bissau", "GW");
dropdownClip.addItem("Guyana", "GY");
dropdownClip.addItem("Haiti", "HT");
dropdownClip.addItem("Heard And Mc Donald Islands", "HM");
dropdownClip.addItem("Holy See (Vatican City State)", "VA");
dropdownClip.addItem("Honduras", "HN");
dropdownClip.addItem("Hong Kong", "HK");
dropdownClip.addItem("Hungary", "HU");
dropdownClip.addItem("Icel And", "IS");
dropdownClip.addItem("India", "IN");
dropdownClip.addItem("Indonesia", "ID");
dropdownClip.addItem("Iran (Islamic Republic Of)", "IR");
dropdownClip.addItem("Iraq", "IQ");
dropdownClip.addItem("Israel", "IL");
dropdownClip.addItem("Jamaica", "JM");
dropdownClip.addItem("Japan", "JP");
dropdownClip.addItem("Jordan", "JO");
dropdownClip.addItem("Kazakhstan", "KZ");
dropdownClip.addItem("Kenya", "KE");
dropdownClip.addItem("Kiribati", "KI");
dropdownClip.addItem("Korea, Dem People'S Republic", "KP");
dropdownClip.addItem("Korea, Republic Of", "KR");
dropdownClip.addItem("Kuwait", "KW");
dropdownClip.addItem("Kyrgyzstan", "KG");
dropdownClip.addItem("Lao People'S Dem Republic", "LA");
dropdownClip.addItem("Latvia", "LV");
dropdownClip.addItem("Lebanon", "LB");
dropdownClip.addItem("Lesotho", "LS");
dropdownClip.addItem("Liberia", "LR");
dropdownClip.addItem("Libyan Arab Jamahiriya", "LY");
dropdownClip.addItem("Liechtenstein", "LI");
dropdownClip.addItem("Lithuania", "LT");
dropdownClip.addItem("Luxembourg", "LU");
dropdownClip.addItem("Macau", "MO");
dropdownClip.addItem("Macedonia", "MK");
dropdownClip.addItem("Madagascar", "MG");
dropdownClip.addItem("Malawi", "MW");
dropdownClip.addItem("Malaysia", "MY");
dropdownClip.addItem("Maldives", "MV");
dropdownClip.addItem("Mali", "ML");
dropdownClip.addItem("Malta", "MT");
dropdownClip.addItem("Marshall Islands", "MH");
dropdownClip.addItem("Martinique", "MQ");
dropdownClip.addItem("Mauritania", "MR");
dropdownClip.addItem("Mauritius", "MU");
dropdownClip.addItem("Mayotte", "YT");
dropdownClip.addItem("Mexico", "MX");
dropdownClip.addItem("Micronesia, Federated States", "FM");
dropdownClip.addItem("Moldova, Republic Of", "MD");
dropdownClip.addItem("Monaco", "MC");
dropdownClip.addItem("Mongolia", "MN");
dropdownClip.addItem("Montserrat", "MS");
dropdownClip.addItem("Morocco", "MA");
dropdownClip.addItem("Mozambique", "MZ");
dropdownClip.addItem("Myanmar", "MM");
dropdownClip.addItem("Namibia", "NA");
dropdownClip.addItem("Nauru", "NR");
dropdownClip.addItem("Nepal", "NP");
dropdownClip.addItem("Netherlands Ant Illes", "AN");
dropdownClip.addItem("New Caledonia", "NC");
dropdownClip.addItem("New Zealand", "NZ");
dropdownClip.addItem("Nicaragua", "NI");
dropdownClip.addItem("Niger", "NE");
dropdownClip.addItem("Nigeria", "NG");
dropdownClip.addItem("Niue", "NU");
dropdownClip.addItem("Norfolk Island", "NF");
dropdownClip.addItem("Northern Mariana Islands", "MP");
dropdownClip.addItem("Norway", "NO");
dropdownClip.addItem("Oman", "OM");
dropdownClip.addItem("Pakistan", "PK");
dropdownClip.addItem("Palau", "PW");
dropdownClip.addItem("Panama", "PA");
dropdownClip.addItem("Papua New Guinea", "PG");
dropdownClip.addItem("Paraguay", "PY");
dropdownClip.addItem("Peru", "PE");
dropdownClip.addItem("Philippines", "PH");
dropdownClip.addItem("Pitcairn", "PN");
dropdownClip.addItem("Poland", "PL");
dropdownClip.addItem("Portugal", "PT");
dropdownClip.addItem("Puerto Rico", "PR");
dropdownClip.addItem("Qatar", "QA");
dropdownClip.addItem("Reunion", "RE");
dropdownClip.addItem("Romania", "RO");
dropdownClip.addItem("Russian Federation", "RU");
dropdownClip.addItem("Rwanda", "RW");
dropdownClip.addItem("Saint K Itts And Nevis", "KN");
dropdownClip.addItem("Saint Lucia", "LC");
dropdownClip.addItem("Saint Vincent, The Grenadines", "VC");
dropdownClip.addItem("Samoa", "WS");
dropdownClip.addItem("San Marino", "SM");
dropdownClip.addItem("Sao Tome And Principe", "ST");
dropdownClip.addItem("Saudi Arabia", "SA");
dropdownClip.addItem("Senegal", "SN");
dropdownClip.addItem("Seychelles", "SC");
dropdownClip.addItem("Sierra Leone", "SL");
dropdownClip.addItem("Singapore", "SG");
dropdownClip.addItem("Slovakia (Slovak Republic)", "SK");
dropdownClip.addItem("Slovenia", "SI");
dropdownClip.addItem("Solomon Islands", "SB");
dropdownClip.addItem("Somalia", "SO");
dropdownClip.addItem("South Africa", "ZA");
dropdownClip.addItem("South Georgia , S Sandwich Is.", "GS");
dropdownClip.addItem("Sri Lanka", "LK");
dropdownClip.addItem("St. Helena", "SH");
dropdownClip.addItem("St. Pierre And Miquelon", "PM");
dropdownClip.addItem("Sudan", "SD");
dropdownClip.addItem("Suriname", "SR");
dropdownClip.addItem("Svalbard, Jan Mayen Islands", "SJ");
dropdownClip.addItem("Sw Aziland", "SZ");
dropdownClip.addItem("Sweden", "SE");
dropdownClip.addItem("Switzerland", "CH");
dropdownClip.addItem("Syrian Arab Republic", "SY");
dropdownClip.addItem("Taiwan", "TW");
dropdownClip.addItem("Tajikistan", "TJ");
dropdownClip.addItem("Tanzania, United Republic Of", "TZ");
dropdownClip.addItem("Thailand", "TH");
dropdownClip.addItem("Togo", "TG");
dropdownClip.addItem("Tokelau", "TK");
dropdownClip.addItem("Tonga", "TO");
dropdownClip.addItem("Trinidad And Tobago", "TT");
dropdownClip.addItem("Tunisia", "TN");
dropdownClip.addItem("Turkey", "TR");
dropdownClip.addItem("Turkmenistan", "TM");
dropdownClip.addItem("Turks And Caicos Islands", "TC");
dropdownClip.addItem("Tuvalu", "TV");
dropdownClip.addItem("Uganda", "UG");
dropdownClip.addItem("Ukraine", "UA");
dropdownClip.addItem("United Arab Emirates", "AE");
dropdownClip.addItem("United States Minor Is.", "UM");
dropdownClip.addItem("Uruguay", "UY");
dropdownClip.addItem("Uzbekistan", "UZ");
dropdownClip.addItem("Vanuatu", "VU");
dropdownClip.addItem("Venezuela", "VE");
dropdownClip.addItem("Viet Nam", "VN");
dropdownClip.addItem("Virgin Islands (British)", "VG");
dropdownClip.addItem("Virgin Islands (U.S.)", "VI");
dropdownClip.addItem("Wallis And Futuna Islands", "WF");
dropdownClip.addItem("Western Sahara", "EH");
dropdownClip.addItem("Yemen", "YE");
dropdownClip.addItem("Yugoslavia", "YU");
dropdownClip.addItem("Zaire", "ZR");
dropdownClip.addItem("Zambia", "ZM");
dropdownClip.addItem("Zimbabwe", "ZW");
dropdownClip.setSelectedIndex(0);
};
this.initMobilesDropdown = function (dropdownClip) {
mobiles = new Array();
dropdownClip.addItem("Select manufacturer", "NIL");
dropdownClip.addItem("NOKIA", "NOKIA");
dropdownClip.addItem("MOTOROLA", "MOTOROLA");
dropdownClip.addItem("SAMSUNG", "SAMSUNG");
dropdownClip.addItem("SONY ERICSSON", "ERICSSON");
dropdownClip.addItem("ALCATEL", "ALCATEL");
dropdownClip.addItem("LG", "LG");
dropdownClip.addItem("NEC", "NEC");
dropdownClip.addItem("PANASONIC", "PANASONIC");
dropdownClip.addItem("SAGEM", "SAGEM");
dropdownClip.addItem("SIEMENS", "SIEMENS");
dropdownClip.addItem("SHARP", "SHARP");
dropdownClip.addItem("TRIUM", "TRIUM");
dropdownClip.addItem("HANDSPRING", "HANDSPRING");
dropdownClip.addItem("POGO", "POGO");
dropdownClip.setSelectedItem(0);
};
this.initDateDropdowns = function (dropdownYear, dropdownMonth, dropdownDay) {
dropdownDay.addItem("DD");
var _local1 = 1;
while (_local1 <= 31) {
dropdownDay.addItem(_local1, _local1);
_local1++;
}
dropdownDay.setSelectedIndex(0);
dropdownMonth.addItem("MM");
_local1 = 1;
while (_local1 <= 12) {
dropdownMonth.addItem(_local1, _local1);
_local1++;
}
dropdownMonth.setSelectedIndex(0);
dropdownYear.addItem("YYYY");
_local1 = 2007;
while (_local1 >= 1900) {
dropdownYear.addItem(_local1, _local1);
_local1--;
}
dropdownYear.setSelectedIndex(0);
};
};
Symbol 597 MovieClip [__Packages.com.mosesSupposes.fuse.Shortcuts] Frame 0
class com.mosesSupposes.fuse.Shortcuts
{
function Shortcuts () {
}
static function initialize() {
if (shortcuts == null) {
initShortcuts();
}
}
static function doShortcut(obj, methodName) {
initialize();
var _local5 = shortcuts[methodName];
if (_local5 == undefined) {
if (typeof(obj) == "movieclip") {
_local5 = mcshortcuts[methodName];
}
}
if (_local5 == undefined) {
return(null);
}
obj = arguments.shift();
methodName = String(arguments.shift());
if (!(obj instanceof Array)) {
obj = [obj];
}
var _local3 = "";
for (var _local6 in obj) {
var _local2 = String(_local5.apply(obj[_local6], arguments));
if ((_local2 != null) && (_local2.length > 0)) {
if (_local3.length > 0) {
_local3 = (_local2 + "|") + _local3;
} else {
_local3 = _local2;
}
}
}
return(((_local3 == "") ? null : (_local3)));
}
static function addShortcutsTo() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, _local2.getter, _local2.setter);
_global.ASSetPropFlags(o, _local5, 3, 1);
} else {
o[_local5] = _local2;
_global.ASSetPropFlags(o, _local5, 7, 1);
}
}
};
for (var _local7 in arguments) {
var _local4 = arguments[_local7];
if ((_local4 == MovieClip.prototype) || (typeof(_local4) == "movieclip")) {
_local5(_local4, mcshortcuts);
}
_local5(_local4, shortcuts);
}
}
static function removeShortcutsFrom() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
_global.ASSetPropFlags(o, _local5, 0, 2);
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, null, null);
}
delete o[_local5];
}
};
for (var _local7 in arguments) {
var _local3 = arguments[_local7];
if ((_local3 == MovieClip.prototype) || (typeof(_local3) == "movieclip")) {
_local5(_local3, mcshortcuts);
}
_local5(_local3, shortcuts);
}
}
static function parseStringTypeCallback(callbackStr) {
var evaluate = function (val) {
var first = val.charAt(0);
if ((first == val.slice(-1)) && ((first == "\"") || (first == "'"))) {
return(val.slice(1, -1));
}
if (val == "true") {
return(Object(true));
}
if (val == "false") {
return(Object(false));
}
if (val == "null") {
return(Object(null));
}
if (_global.isNaN(Number(val)) == false) {
return(Object(Number(val)));
}
return(Object(eval (val)));
};
var trimWhite = function (str) {
while (str.charAt(0) == " ") {
str = str.slice(1);
}
while (str.slice(-1) == " ") {
str = str.slice(0, -1);
}
return(str);
};
var evaluateList = function (list) {
var _local11 = [];
var _local4 = 0;
while (_local4 < list.length) {
var _local3 = list[_local4];
_local3 = trimWhite(_local3);
var _local5 = (_local3.charAt(0) == "{") && ((_local3.indexOf("}") > -1) || (_local3.indexOf(":") > -1));
var _local10 = _local3.charAt(0) == "[";
if ((_local5 || (_local10)) == true) {
var _local6 = ((_local5 == true) ? ({}) : ([]));
var _local2 = _local4;
while (_local2 < list.length) {
if (_local2 == _local4) {
_local3 = _local3.slice(1);
}
var _local1;
var _local8 = (_local1.slice(-1) == ((_local5 == true) ? "}" : "]")) || (_local2 == (list.length - 1));
if (_local8 == true) {
_local1 = _local1.slice(0, -1);
}
if ((_local5 == true) && (_local1.indexOf(":") > -1)) {
var _local7 = _local1.split(":");
_local6[trimWhite(_local7[0])] = evaluate(trimWhite(_local7[1]));
} else if (_local10 == true) {
_local6.push(evaluate(trimWhite(_local1)));
}
if (_local8 == true) {
_local11.push(_local6);
_local4 = _local2;
break;
}
_local2++;
}
} else {
_local11.push(evaluate(trimWhite(_local3)));
}
_local4++;
}
return(_local11);
};
var parts = callbackStr.split("(");
var p0 = parts[0];
var p1 = parts[1];
return({func:p0.slice(p0.lastIndexOf(".") + 1), scope:eval (p0.slice(0, p0.lastIndexOf("."))), args:evaluateList(p1.slice(0, p1.lastIndexOf(")")).split(","))});
}
static function initShortcuts() {
shortcuts = new Object();
var methods = {alphaTo:"_alpha", scaleTo:"_scale", sizeTo:"_size", rotateTo:"_rotation", brightnessTo:"_brightness", brightOffsetTo:"_brightOffset", contrastTo:"_contrast", colorTo:"_tint", tintPercentTo:"_tintPercent", colorResetTo:"_colorReset", invertColorTo:"_invertColor"};
var _local4 = _global.com.mosesSupposes.fuse.FuseFMP.getAllShortcuts();
var _local7 = {blur:1, blurX:1, blurY:1, strength:1, shadowAlpha:1, highlightAlpha:1, angle:1, distance:1, alpha:1, color:1};
for (var _local9 in _local4) {
if (_local7[_local4[_local9].split("_")[1]] === 1) {
methods[_local4[_local9] + "To"] = _local4[_local9];
}
}
var _local8 = {__resolve:function (name) {
var propName = methods[name];
return(function () {
var _local4 = _global.com.mosesSupposes.fuse.ZigoEngine.doTween.apply(com.mosesSupposes.fuse.ZigoEngine, new Array(this, propName).concat(arguments));
return(_local4);
});
}};
var _local5 = {__resolve:function (name) {
var _local3 = {setter:function (v) {
_global.com.mosesSupposes.fuse.ZigoEngine.doTween(this, ((name == "_tintString") ? "_tint" : (name)), v, 0);
}};
switch (name) {
case "_colorReset" :
_local3.getter = function () {
return(100 - _global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this).tintPercent);
};
break;
case "_colorTransform" :
_local3.getter = function () {
return(Color(new Color(this)).getTransform());
};
break;
case "_fade" :
_local3.getter = function () {
return(this._alpha);
};
break;
case "_size" :
_local3.getter = function () {
return(((this._width == this._height) ? (this._width) : null));
};
break;
case "_scale" :
_local3.getter = function () {
return(((this._xscale == this._yscale) ? (this._xscale) : null));
};
break;
default :
_local3.getter = function () {
return(_global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this)[name.slice(1)]);
};
}
return(_local3);
}};
for (var _local9 in methods) {
shortcuts[_local9] = _local8[_local9];
if ((_local9 != "alphaTo") && (_local9 != "rotateTo")) {
shortcuts[methods[_local9]] = _local5[methods[_local9]];
}
}
shortcuts._tintString = _local5._tintString;
shortcuts._colorTransform = _local5._colorTransform;
shortcuts._fade = _local5._fade;
shortcuts.tween = function (props, endVals, seconds, ease, delay, callback) {
if ((arguments.length == 1) && (typeof(props) == "object")) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween({target:this, action:props}));
}
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, props, endVals, seconds, ease, delay, callback));
};
shortcuts.removeTween = (shortcuts.stopTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.removeTween(this, props);
});
shortcuts.removeAllTweens = (shortcuts.stopAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.removeTween("ALL");
});
shortcuts.isTweening = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweening(this, prop));
};
shortcuts.getTweens = function () {
return(com.mosesSupposes.fuse.ZigoEngine.getTweens(this));
};
shortcuts.lockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, true);
};
shortcuts.unlockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, false);
};
shortcuts.isTweenLocked = function () {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenLocked(this));
};
shortcuts.isTweenPaused = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenPaused(this, prop));
};
shortcuts.pauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.pauseTween(this, props);
};
shortcuts.resumeTween = (shortcuts.unpauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween(this, props);
});
shortcuts.pauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.pauseTween("ALL");
};
shortcuts.resumeAllTweens = (shortcuts.unpauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween("ALL");
});
shortcuts.ffTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.ffTween(this, props);
};
shortcuts.rewTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, false, suppressStartEvents);
};
shortcuts.rewAndPauseTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, true, suppressStartEvents);
};
shortcuts.skipTweenTo = function (seconds, props) {
com.mosesSupposes.fuse.ZigoEngine.skipTweenTo(seconds, this, props);
};
shortcuts.bezierTo = function (destX, destY, controlX, controlY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_bezier_", {x:destX, y:destY, controlX:controlX, controlY:controlY}, seconds, ease, delay, callback));
};
shortcuts.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_colorTransform", {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab}, seconds, ease, delay, callback));
};
shortcuts.tintTo = function (rgb, percent, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_tint", {tint:rgb, percent:percent}, seconds, ease, delay, callback));
};
shortcuts.slideTo = function (destX, destY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_x,_y", [destX, destY], seconds, ease, delay, callback));
};
shortcuts.fadeIn = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 100, seconds, ease, delay, callback));
};
shortcuts.fadeOut = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 0, seconds, ease, delay, callback));
};
mcshortcuts = new Object();
mcshortcuts._frame = {getter:function () {
return(this._currentframe);
}, setter:function (v) {
this.gotoAndStop(Math.round(v));
}};
mcshortcuts.frameTo = function (endframe, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_frame", ((endframe != undefined) ? (endframe) : (this._totalframes)), seconds, ease, delay, callback));
};
}
static var registryKey = "shortcuts";
static var shortcuts = null;
static var mcshortcuts = null;
}
Symbol 598 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.4 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 599 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage.call(com.mosesSupposes.fuse.ZigoEngine, "onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local6 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local8 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local3 = {tintPercent:Number(((_local6 == true) ? (100 - _local1.ra) : 0))};
if (_local3.tintPercent != 0) {
var _local5 = 100 / _local3.tintPercent;
_local3.tint = (((_local1.rb * _local5) << 16) | ((_local1.gb * _local5) << 8)) | (_local1.bb * _local5);
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local6 == true) && (_local8 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 600 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
} else {
_local3.fmp.setFilterProp(_local5, _local30, _local7[0]);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 601 MovieClip [__Packages.com.mosesSupposes.fuse.FuseFMP] Frame 0
class com.mosesSupposes.fuse.FuseFMP
{
static var _classes, _shortcuts, _getter, _setter;
function FuseFMP () {
}
static function simpleSetup() {
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
_global.FuseFMP = com.mosesSupposes.fuse.FuseFMP;
for (var _local2 in _classes) {
_global[_local2] = _classes[_local2];
}
}
static function initialize(target) {
if (_classes == undefined) {
_shortcuts = {getFilterName:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterName(f));
}, getFilterIndex:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterIndex(this, f));
}, getFilter:function (f, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, f, createNew));
}, writeFilter:function (f, pObj) {
return(com.mosesSupposes.fuse.FuseFMP.writeFilter(this, f, pObj));
}, removeFilter:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.removeFilter(this, f));
}, getFilterProp:function (prop, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterProp(this, prop, createNew));
}, setFilterProp:function (prop, v) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, prop, v);
}, setFilterProps:function (fOrPObj, pObj) {
com.mosesSupposes.fuse.FuseFMP.setFilterProps(this, fOrPObj, pObj);
}, traceAllFilters:function () {
com.mosesSupposes.fuse.FuseFMP.traceAllFilters();
}};
_classes = {BevelFilter:flash.filters.BevelFilter, BlurFilter:flash.filters.BlurFilter, ColorMatrixFilter:flash.filters.ColorMatrixFilter, ConvolutionFilter:flash.filters.ConvolutionFilter, DisplacementMapFilter:flash.filters.DisplacementMapFilter, DropShadowFilter:flash.filters.DropShadowFilter, GlowFilter:flash.filters.GlowFilter, GradientBevelFilter:flash.filters.GradientBevelFilter, GradientGlowFilter:flash.filters.GradientGlowFilter};
_getter = {__resolve:function (name) {
var _local4 = function () {
var _local3 = this;
if (_local3.filters != undefined) {
var _local2 = name.split("_");
if (_local2[1] == "blur") {
_local2[1] = "blurX";
}
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, _local2[0] + "Filter", false)[_local2[1]]);
}
};
return(_local4);
}};
_setter = {__resolve:function (name) {
var _local3 = function (val) {
var _local2 = this;
if (_local2.filters != undefined) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, name, val);
}
};
return(_local3);
}};
}
if (arguments[0] == null) {
return(undefined);
}
var _local6 = [MovieClip, Button, TextField];
for (var _local13 in arguments) {
var _local7 = false;
for (var _local10 in _local6) {
if ((arguments[_local13] instanceof _local6[_local10]) || (arguments[_local13] == Function(_local6[_local10]).prototype)) {
_local7 = true;
break;
}
}
if (!_local7) {
com.mosesSupposes.fuse.FuseKitCommon.error("201", _local13);
continue;
}
for (var _local11 in _classes) {
var _local5 = new _classes[_local11]();
for (var _local8 in _local5) {
if (typeof(_local5[_local8]) == "function") {
continue;
}
var _local4 = (_local11.substr(0, -6) + "_") + _local8;
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
if (_local8 == "blurX") {
_local4 = _local4.slice(0, -1);
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
}
}
}
for (var _local9 in _shortcuts) {
arguments[_local13][_local9] = _shortcuts[_local9];
_global.ASSetPropFlags(arguments[_local13], _local9, 7, 1);
}
}
}
static function deinitialize() {
if (_classes == undefined) {
return(undefined);
}
if (arguments.length == 0) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
for (var _local8 in arguments) {
for (var _local7 in _classes) {
var _local4 = new _classes[_local7]();
for (var _local5 in _local4) {
if (typeof(_local4[_local5]) == "function") {
continue;
}
var _local3 = (_local7.substr(0, -6) + "_") + _local5;
_global.ASSetPropFlags(arguments[_local8], _local3, 0, 2);
arguments[_local8].addProperty(_local3, null, null);
delete arguments[_local8][_local3];
}
}
for (var _local6 in _shortcuts) {
_global.ASSetPropFlags(arguments[_local8], _local6, 0, 2);
delete arguments[_local8][_local6];
}
}
}
static function getFilterName(instance) {
if (_classes == undefined) {
initialize(null);
}
for (var _local1 in _classes) {
if (instance.__proto__ == Function(_classes[_local1]).prototype) {
return(_local1);
}
}
return(null);
}
static function getFilterIndex(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local2 = target.filters;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].__proto__ == filter.__proto__) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getFilter(target, filter, createNew) {
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
if (createNew != true) {
return(null);
}
_local1 = writeFilter(target, filter);
if (_local1 == -1) {
return(null);
}
}
return(target.filters[_local1]);
}
static function writeFilter(target, filter, propsObj) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local4 = target.filters;
var _local2 = getFilterIndex(target, filter);
if (_local2 == -1) {
_local4.push(filter);
} else {
_local4[_local2] = filter;
}
target.filters = _local4;
if (typeof(propsObj) == "object") {
setFilterProps(target, filter, propsObj);
}
_local2 = getFilterIndex(target, filter);
return(_local2);
}
static function removeFilter(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
var _local2 = target.filters;
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
return(false);
}
_local2.splice(_local1, 1);
target.filters = _local2;
return(true);
}
static function getFilterProp(target, propname, createNew) {
var _local1 = propname.split("_");
if (_local1[1] == "blur") {
_local1[1] = "blurX";
}
return(getFilter(target, _local1[0] + "Filter", createNew)[_local1[1]]);
}
static function setFilterProp(target, propname, value) {
if (_classes == undefined) {
initialize(null);
}
var _local8 = propname.split("_");
var _local5 = _local8[0] + "Filter";
if (_classes[_local5] == undefined) {
return(undefined);
}
var _local2 = new _classes[_local5]();
if ((BLUR_ZERO == true) && (_local5 == "BlurFilter")) {
_local2.blurX = (_local2.blurY = 0);
}
var _local6 = _local8[1];
var _local1 = target.filters.length || 0;
while (_local1-- , _local1 > -1) {
if (target.filters[_local1].__proto__ == _local2.__proto__) {
_local2 = target.filters[_local1];
break;
}
}
if (_local2 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local5, target);
}
if (_local6 == "blur") {
_local2.blurX = value;
_local2.blurY = value;
} else {
if ((typeof(value) == "string") && (_local6.toLowerCase().indexOf("color") > -1)) {
if (value.charAt(0) == "#") {
value = value.slice(1);
}
value = ((value.charAt(1).toLowerCase() != "x") ? (Number("0x" + value)) : (Number(value)));
}
_local2[_local6] = value;
}
var _local7 = target.filters;
if (_local1 == -1) {
_local7.push(_local2);
} else {
_local7[_local1] = _local2;
}
target.filters = _local7;
}
static function setFilterProps(target, filterOrPropsObj, propsObj) {
if (arguments.length < 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("203", arguments.length);
return(undefined);
}
if (_classes == undefined) {
initialize(null);
}
var _local10 = new Object();
var _local11 = arguments.length == 2;
if (_local11 == false) {
var _local14 = getFilterName(getInstance(filterOrPropsObj));
if (_classes[_local14] == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("204", filterOrPropsObj);
return(undefined);
}
_local10[_local14] = 1;
} else {
propsObj = filterOrPropsObj;
for (var _local12 in propsObj) {
var _local14 = _local12.split("_")[0] + "Filter";
if ((_classes[_local14] != undefined) && (_local10[_local14] == undefined)) {
_local10[_local14] = 1;
}
}
}
if (!(target instanceof Array)) {
target = [target];
}
for (var _local15 in target) {
var _local5 = target[_local15];
for (var _local14 in _local10) {
var _local3 = new _classes[_local14]();
if ((BLUR_ZERO == true) && (_local14 == "BlurFilter")) {
_local3.blurX = (_local3.blurY = 0);
}
var _local4 = _local5.filters.length || 0;
while (_local4-- , _local4 > -1) {
if (_local5.filters[_local4].__proto__ == _local3.__proto__) {
_local3 = _local5.filters[_local4];
break;
}
}
if (_local3 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local14, _local5);
continue;
}
var _local7 = String(_local14).slice(0, -6) + "_";
for (var _local12 in propsObj) {
var _local6 = _local12.indexOf(_local7) == 0;
if ((_local11 == true) && (_local6 == false)) {
continue;
}
var _local2 = propsObj[_local12];
if (_local6 == true) {
var _local12 = _local12.slice(_local7.length);
}
if (_local12 == "blur") {
_local3.blurX = _local2;
_local3.blurY = _local2;
} else {
if ((typeof(_local2) == "string") && (_local12.toLowerCase().indexOf("color") > -1)) {
if (_local2.charAt(0) == "#") {
_local2 = _local2.slice(1);
}
_local2 = ((_local2.charAt(1).toLowerCase() != "x") ? (Number("0x" + _local2)) : (Number(_local2)));
}
_local3[_local12] = _local2;
}
}
var _local8 = _local5.filters;
if (_local4 == -1) {
_local8.push(_local3);
} else {
_local8[_local4] = _local3;
}
_local5.filters = _local8;
}
}
}
static function getAllShortcuts() {
if (_classes == undefined) {
initialize(null);
}
var _local2 = [];
for (var _local4 in _classes) {
var _local1 = new _classes[_local4]();
for (var _local3 in _local1) {
if (typeof(_local1[_local3]) == "function") {
continue;
}
_local2.push((_local4.substr(0, -6) + "_") + _local3);
if (_local3 == "blurX") {
_local2.push(_local4.substr(0, -6) + "_blur");
}
}
}
return(_local2);
}
static function traceAllFilters() {
if (_classes == undefined) {
initialize(null);
}
var _local1 = "------ FuseFMP filter properties ------\n";
for (var _local4 in _classes) {
_local1 = _local1 + _local4;
var _local2 = new _classes[_local4]();
for (var _local3 in _local2) {
if (typeof(_local2[_local3]) == "function") {
continue;
}
_local1 = _local1 + ((("\t- " + _local4.substr(0, -6)) + "_") + _local3);
if (_local3 == "blurX") {
_local1 = _local1 + (("\t- " + _local4.substr(0, -6)) + "_blur");
}
}
_local1 = _local1 + newline;
}
com.mosesSupposes.fuse.FuseKitCommon.output(_local1);
}
static function getInstance(filter) {
if (filter instanceof flash.filters.BitmapFilter) {
return(flash.filters.BitmapFilter(filter));
}
if (typeof(filter) == "function") {
for (var _local4 in _classes) {
if (filter == _classes[_local4]) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
if (typeof(filter) == "string") {
var _local3 = String(filter);
if (_local3.substr(-6) != "Filter") {
_local3 = _local3 + "Filter";
}
for (var _local4 in _classes) {
if (_local4 == _local3) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
return(null);
}
static var registryKey = "fuseFMP";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var BLUR_ZERO = true;
}
Symbol 602 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 603 MovieClip [__Packages.scrollBar] Frame 0
class scrollBar
{
var myspeed, fiction, btn_scroll_fiction, runIn, mc, mask, drager_mc, barBg_mc, up_btn, down_btn, scrolll_speed, content_height, mc_pos, axis_track, drager_pos, axis_bar, start_drage, target, d_out, u_out, mouse_target;
function scrollBar (runIn, mc, mask, drager_mc, barBg_mc, up_btn, down_btn, scrollbar_fiction, scrollspeed) {
clea_up(this);
myspeed = scrollspeed;
if (scrollbar_fiction) {
fiction = 10;
btn_scroll_fiction = 0.9;
} else {
fiction = 1;
btn_scroll_fiction = 0;
}
this.runIn = runIn;
this.mc = mc;
this.mask = mask;
this.drager_mc = drager_mc;
this.barBg_mc = barBg_mc;
this.up_btn = up_btn;
this.down_btn = down_btn;
this.drager_mc.ctr = this;
this.barBg_mc.ctr = this;
this.up_btn.ctr = this;
this.down_btn.ctr = this;
init();
}
function init(c_content_height) {
mc._y = (mask._y = 0);
drager_mc._y = barBg_mc._y;
drager_mc._x = barBg_mc._x;
scrolll_speed = myspeed;
if (!c_content_height) {
content_height = mc._height;
} else {
content_height = c_content_height;
}
if (content_height < mask._height) {
hide_scroll_bar();
} else {
show_scroll_bar();
}
mc.setMask(mask);
mc_pos = {strat:mask._y, current:0};
axis_track = {height:(mask._y - content_height) + mask._height};
drager_pos = {strat:barBg_mc._y, current:0};
axis_bar = {height:Math.round(barBg_mc._height - drager_mc._height), local_y:Math.round((barBg_mc._y + barBg_mc._height) - drager_mc._height)};
setBtns();
}
function setBtns() {
drager_mc.onPress = function () {
removeMovieClip(this.ctr.runIn.timer_1);
this.ctr.start_drage = true;
this.ctr.runIn.createEmptyMovieClip("timer", 0);
this.ctr.different = this.ctr.runIn._ymouse - this._y;
this.ctr.runIn.timer.ctr = this.ctr;
this.ctr.runIn.timer.onEnterFrame = function () {
this.ctr.drage_drager();
if (this.ctr.start_drage) {
if ((this.ctr.drager_mc._y >= this.ctr.drager_pos.strat) and (this.ctr.drager_mc._y <= this.ctr.axis_bar.local_y)) {
this.ctr.drager_mc._y = this.ctr.runIn._ymouse - this.ctr.different;
}
if (this.ctr.drager_mc._y < this.ctr.drager_pos.strat) {
this.ctr.drager_mc._y = this.ctr.drager_pos.strat;
}
if (this.ctr.drager_mc._y > this.ctr.axis_bar.local_y) {
this.ctr.drager_mc._y = this.ctr.axis_bar.local_y;
}
}
};
};
drager_mc.onRelease = (drager_mc.onReleaseOutside = function () {
this.ctr.start_drage = false;
});
up_btn.onPress = function () {
this.ctr.d_out = false;
this.ctr.scrolll_speed = this.ctr.myspeed;
this.ctr.runIn.createEmptyMovieClip("timer_1", 1);
this.ctr.runIn.timer_1.ctr = this.ctr;
this.ctr.runIn.timer_1.onEnterFrame = function () {
this.ctr.drager_down();
this.ctr.drage_drager();
};
};
down_btn.onPress = function () {
this.ctr.u_out = false;
this.ctr.scrolll_speed = this.ctr.myspeed;
this.ctr.runIn.createEmptyMovieClip("timer_1", 1);
this.ctr.runIn.timer_1.ctr = this.ctr;
this.ctr.runIn.timer_1.onEnterFrame = function () {
this.ctr.drager_up();
this.ctr.drage_drager();
};
};
up_btn.onRelease = (up_btn.onReleaseOutside = function () {
this.ctr.d_out = true;
});
down_btn.onRelease = (down_btn.onReleaseOutside = function () {
this.ctr.u_out = true;
});
barBg_mc.onPress = function () {
this.ctr.mouse_target = this.ctr.runIn._ymouse;
this.ctr.runIn.createEmptyMovieClip("timer_1", 1);
this.ctr.runIn.timer_1.ctr = this.ctr;
this.ctr.runIn.timer_1.onEnterFrame = function () {
this.ctr.barBg_mc_hit();
this.ctr.drage_drager();
};
};
}
function drager_release() {
start_drage = false;
}
function drage_drager() {
drager_pos.current = drager_mc._y - drager_pos.strat;
target = (drager_pos.current / axis_bar.height) * axis_track.height;
mc._y = mc._y - ((mc._y - target) / fiction);
}
function drager_down() {
if (d_out) {
scrolll_speed = scrolll_speed * btn_scroll_fiction;
}
if (drager_mc._y > drager_pos.strat) {
if (scrolll_speed > 0.001) {
drager_mc._y = drager_mc._y - scrolll_speed;
}
}
}
function drager_up() {
if (u_out) {
scrolll_speed = scrolll_speed * btn_scroll_fiction;
}
if (drager_mc._y < axis_bar.local_y) {
if (scrolll_speed > 0.001) {
drager_mc._y = drager_mc._y + scrolll_speed;
}
}
}
function barBg_mc_hit() {
if ((drager_mc._y >= drager_pos.strat) and (drager_mc._y <= axis_bar.local_y)) {
drager_mc._y = drager_mc._y - ((drager_mc._y - mouse_target) / fiction);
}
if (drager_mc._y > axis_bar.local_y) {
drager_mc._y = axis_bar.local_y;
}
if (drager_mc._y < drager_pos.strat) {
drager_mc._y = drager_pos.strat;
}
}
function hide_scroll_bar() {
up_btn._alpha = (drager_mc._alpha = (down_btn._alpha = (barBg_mc._alpha = 0)));
up_btn.enabled = (drager_mc.enabled = (down_btn.enabled = (barBg_mc.enabled = false)));
}
function show_scroll_bar() {
up_btn._alpha = (drager_mc._alpha = (down_btn._alpha = (barBg_mc._alpha = 100)));
up_btn.enabled = (drager_mc.enabled = (down_btn.enabled = (barBg_mc.enabled = true)));
}
function clea_up(_this) {
removeMovieClip(_this.timer_1);
removeMovieClip(drager_mc.timer);
}
}
Symbol 24 MovieClip Frame 41
stop();
Symbol 31 MovieClip Frame 1
gotoAndPlay ("idle");
Symbol 31 MovieClip Frame 15
stop();
Symbol 31 MovieClip Frame 16
_root.objSounds.play("servo");
Symbol 31 MovieClip Frame 21
_root.objSounds.play("weapon-chainsaw");
Symbol 31 MovieClip Frame 54
gotoAndPlay ("idle");
Symbol 41 MovieClip Frame 1
gotoAndStop ("idle");
Symbol 41 MovieClip Frame 21
_root.objSounds.play("boom");
Symbol 41 MovieClip Frame 37
stop();
Symbol 61 MovieClip Frame 1
gotoAndPlay ("idle");
Symbol 61 MovieClip Frame 15
stop();
Symbol 61 MovieClip Frame 21
_root.objSounds.play("pincer");
Symbol 61 MovieClip Frame 42
gotoAndPlay ("idle");
Symbol 76 MovieClip [car] Frame 1
stop();
Symbol 92 MovieClip Frame 2
stop();
Instance of Symbol 93 MovieClip "s0" in Symbol 214 MovieClip [segment] Frame 1
onClipEvent (load) {
this.specialType = "corkscrew";
}
Instance of Symbol 95 MovieClip "s1" in Symbol 214 MovieClip [segment] Frame 1
onClipEvent (load) {
this.specialType = "corkscrew";
}
Instance of Symbol 115 MovieClip "s0" in Symbol 214 MovieClip [segment] Frame 11
onClipEvent (load) {
this.specialType = "corkscrew";
}
Instance of Symbol 115 MovieClip "s1" in Symbol 214 MovieClip [segment] Frame 11
onClipEvent (load) {
this.specialType = "corkscrew";
this.jumpForce = 4;
}
Instance of Symbol 117 MovieClip "s2" in Symbol 214 MovieClip [segment] Frame 11
onClipEvent (load) {
this.specialType = "jump";
this.jumpForce = 4;
}
Instance of Symbol 117 MovieClip "s3" in Symbol 214 MovieClip [segment] Frame 11
onClipEvent (load) {
this.specialType = "jump";
this.jumpForce = 4;
}
Instance of Symbol 127 MovieClip "s0" in Symbol 214 MovieClip [segment] Frame 21
onClipEvent (load) {
this.specialType = "jump";
this.jumpForce = 3;
}
Instance of Symbol 127 MovieClip "s1" in Symbol 214 MovieClip [segment] Frame 21
onClipEvent (load) {
this.specialType = "jump";
this.jumpForce = 3;
}
Instance of Symbol 127 MovieClip "s0" in Symbol 214 MovieClip [segment] Frame 31
onClipEvent (load) {
this.specialType = "jump";
this.jumpForce = 5;
}
Instance of Symbol 127 MovieClip "s1" in Symbol 214 MovieClip [segment] Frame 31
onClipEvent (load) {
this.specialType = "jump";
this.jumpForce = 5;
}
Instance of Symbol 159 MovieClip "s0" in Symbol 214 MovieClip [segment] Frame 61
onClipEvent (load) {
this.specialType = "checkpoint";
}
Instance of Symbol 170 MovieClip "s0" in Symbol 214 MovieClip [segment] Frame 81
onClipEvent (load) {
this.specialType = "checkpoint";
}
Symbol 235 MovieClip Frame 1
gotoAndStop(_parent.frame + 1);
stop();
Symbol 241 MovieClip Frame 1
holder.attachBitmap(_parent.bitmap2, 0, "never", true);
stop();
Symbol 256 MovieClip Frame 1
gotoAndStop(_parent.frame + 1);
stop();
Symbol 259 MovieClip [audio_book] Frame 1
stop();
Symbol 276 MovieClip Frame 1
gotoAndStop(_parent.frame + 1);
stop();
Symbol 277 MovieClip [book] Frame 1
stop();
Symbol 317 MovieClip Frame 10
won.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
this.clicked = true;
play();
_parent.play();
_parent.controls.alphaTo(0, 0.5);
_parent.titleClip.alphaTo(0, 0.5);
this.scaleTo(0, 0.5);
_parent.contentClip.alphaTo(0, 1);
};
won.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
won.onRollOut = function () {
if (this.clicked != true) {
this.scaleTo(100, 0.5, "easeOutElastic");
}
};
stop();
Symbol 317 MovieClip Frame 21
_parent._parent.darkBackg.slideTo(undefined, 272, 1);
contentClip.alphaTo(100, 1);
_parent._parent.gotoAndStop("introScreen");
Symbol 328 MovieClip Frame 1
function playMovie() {
if (!isStarted) {
ns.play(file);
playText.txt.text = "loading ..";
isStarted = true;
} else {
ns.pause();
}
pauseBut._visible = true;
playBut._visible = false;
videoDisplay._visible = true;
}
function pauseMovie() {
ns.pause();
playBut._visible = true;
pauseBut._visible = false;
}
function volumeChange() {
this._parent.onMouseMove = (this._parent.onMouseDown = function () {
var _local2 = (this._xmouse / this._width) * 100;
if (_local2 > 100) {
_local2 = 100;
}
if (_local2 < 0) {
_local2 = 0;
}
this.volume_bar_mc._xscale = _local2;
this._parent.volume_level = _local2;
audio.setVolume(_local2);
});
}
((!_root.file) ? ((file = "SPEEDRACER13F20.flv")) : ((file = _root.file)));
((!_root.autoStart) ? ((autoStart = true)) : ((autoStart = _root.autoStart)));
w = Stage.width;
h = Stage.height;
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.setBufferTime(5);
this.createEmptyMovieClip("snd", 0);
snd.attachAudio(ns);
audio = new Sound(snd);
unmuteBut._visible = false;
videoDisplay.attachVideo(ns);
ns.onMetaData = function (obj) {
this.totalTime = obj.duration;
};
ns.onStatus = function (object) {
if (object.code == "NetStream.Play.Start") {
} else if (object.code == "NetStream.Buffer.Full") {
} else if (object.code == "NetStream.Play.Stop") {
ns.seek(0);
ns.pause();
playBut._visible = true;
pauseBut._visible = false;
videoDisplay._visible = false;
playText.txt.text = "click to start";
}
};
videoBg.onPress = function () {
if (pauseBut._visible == false) {
playMovie();
} else {
pauseMovie();
}
};
pauseBut.onPress = function () {
pauseMovie();
};
playBut.onPress = function () {
playMovie();
};
percentBar.onEnterFrame = function () {
loaded = this._parent.ns.bytesLoaded;
total = this._parent.ns.bytesTotal;
if ((loaded == total) && (loaded > 1000)) {
percentBar._width = bw;
delete this.onEnterFrame;
} else {
percentBar._width = int((bw * loaded) / total);
}
};
progressBar.onEnterFrame = function () {
this._width = (bw * ns.time) / ns.totalTime;
};
centerBg.onPress = function () {
this.onEnterFrame = function () {
scl = ((this._xmouse * this._xscale) / bw) / 100;
ns.seek(scl * ns.totalTime);
};
};
centerBg.onRelease = (centerBg.onReleaseOutside = function () {
delete this.onEnterFrame;
((pauseBut._visible == false) ? (videoDisplay.pause()) : null);
});
volume_mc.volume_btn.onPress = volumeChange;
volume_mc.volume_btn.onRelease = (volume_mc.volume_btn.onReleaseOutside = function () {
this._parent.onMouseMove = (this._parent.onMouseDown = null);
});
rewindBut.onPress = function () {
ns.seek(0);
ns.pause();
playBut._visible = true;
pauseBut._visible = false;
videoDisplay._visible = false;
playText.txt.text = "click to start";
};
playText._x = w / 2;
playText._y = (h / 2) - 10;
if (autoStart == true) {
playMovie();
} else {
pauseBut._visible = false;
imageStr = (substring(file, 0, file.length - 3)) + "jpg";
imageClip.loadMovie(imageStr);
}
Symbol 345 MovieClip Frame 1
myScrollBar = new scrollBar(this, mc, mask, drager_mc, barBg_mc, up_btn, down_btn, false, 10);
Symbol 346 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 1
play();
Symbol 347 MovieClip Frame 10
stop();
Symbol 347 MovieClip Frame 21
stop();
Symbol 351 MovieClip Frame 10
won.onRelease = function () {
this.clicked = true;
play();
_parent.controls.alphaTo(0, 0.5);
_parent.titleClip.alphaTo(0, 0.5);
this.scaleTo(0, 0.5);
_root.objSounds.play("rollover-bleepbleep");
};
won.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
won.onRollOut = function () {
if (this.clicked != true) {
this.scaleTo(100, 0.5, "easeOutElastic");
}
};
stop();
Symbol 351 MovieClip Frame 21
_parent._parent.darkBackg.slideTo(undefined, 272, 1);
_parent._parent.gotoAndStop("carselector");
Symbol 375 MovieClip Frame 1
titleText.alphaTo(100, 1);
controls.alphaTo(100, 1);
titleClip.alphaTo(100, 1);
Symbol 399 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 1
hotWheelsLink.onRelease = function () {
getURL ("http://www.hotwheels.com/showcase/category_brand_product.aspx?category_id=7598", "_blank");
};
Symbol 418 MovieClip Frame 1
function setEnabled(p_bState) {
button.button.enabled = p_bState;
track.enabled = p_bState;
}
function refresh() {
gotoAndStop ("refresh");
}
function reset() {
button._x = minX;
positionContent();
}
function positionScrollbar(p_nPosition) {
var _local1 = (((maxX - minX) / 100) * p_nPosition) + minX;
button.removeListener(button.myListener);
button.myListener = undefined;
button.tween("_x", _local1, 0.2, "easeOutQuad");
}
function positionContent(p_nX, p_bDragging) {
p_bDragging = ((p_bDragging == undefined) ? false : (p_bDragging));
var _local4 = ((p_nX == undefined) ? (button._x) : (p_nX));
var _local3 = (100 / (maxX - minX)) * _local4;
_parent.setPositon(_local3, p_bDragging);
}
function checkX(nX) {
if (nX > maxX) {
return(maxX);
}
if (nX < minX) {
return(minX);
}
return(nX);
}
function beginDrag() {
_parent.m_nBrowseMode = _parent.SCROLL;
xOffset = button._x - _xmouse;
ZigoEngine.removeTween(button);
onMouseMove = function () {
button._x = checkX(_xmouse + xOffset);
positionContent(null, true);
updateAfterEvent();
};
}
function endDrag() {
onMouseMove = undefined;
}
var minX = 0;
var maxX = ((track._width - button._width) + 4);
var xOffset;
button._x = (track._width / 2) + 3;
button.button.onRollOver = function () {
this._parent.graphic.gotoAndPlay("over");
};
button.button.onRollOut = function () {
this._parent.graphic.gotoAndPlay("out");
};
button.button.onPress = function () {
ZigoEngine.removeTween(this);
beginDrag();
};
button.button.onRelease = endDrag;
button.button.onReleaseOutside = function () {
this._parent.onRollOut();
endDrag();
};
track.onRelease = function () {
button.onTweenComplete = function () {
};
_parent.m_nBrowseMode = _parent.SCROLL;
var _local2 = checkX(_xmouse);
ZigoEngine.removeTween(button);
button.tween("_x", _local2, 0.2, "easeInOutQuad", 0);
button.myListener = {onTweenUpdate:function (o) {
positionContent(null, true);
}};
button.addListener(button.myListener);
};
Symbol 418 MovieClip Frame 2
gotoAndStop (1);
Symbol 419 MovieClip Frame 1
function activeCarCallback(ID) {
var _local3 = "car1";
switch (ID) {
case 0 :
_local3 = "car8";
break;
case 1 :
_local3 = "car3";
break;
case 2 :
_local3 = "car4";
break;
case 3 :
_local3 = "car1";
break;
case 4 :
_local3 = "car2";
break;
case 5 :
_local3 = "car5";
break;
case 6 :
_local3 = "car6";
break;
case 7 :
_local3 = "car7";
}
_root.carNum = ID;
_root.playerCar = _local3;
if (firstRunComplete == true) {
_parent.carProfile.alphaTo(0, 0.5, "linear", 0, "_parent._parent.changeDetails()");
}
firstRunComplete = true;
}
function disable() {
m_bActive = false;
contentClip.tween("_y", contentClip.hiddenY, 0.3, "easeInQuad", 0);
}
function enable() {
m_bActive = true;
loadLibrary();
}
function displayLibrary() {
m_nSelectedBook = undefined;
aLibrary = m_aLibrary[m_nCurrentLibrary];
m_nNumBooks = aLibrary.length;
m_nFormat = 0;
var _local6 = _root.carNum;
var _local5 = 0;
while (_local5 < m_nNumBooks) {
var _local3 = contentClip.attachMovie(((m_nFormat == 0) ? "book" : "audio_book"), "book" + _local5, _local5);
_local3._x = 0;
_local3.gotoAndStop(nFrameFront);
_local3.frame = _local5;
_local3.id = _local5;
_local3.ean = aLibrary[_local5][2];
_local3.title = aLibrary[_local5][0].toUpperCase();
var _local4 = 0;
while (_local4 < aDefaultEANs.length) {
if (_local3.ean == Number(aDefaultEANs[_local4])) {
_local6 = _local3.id;
}
_local4++;
}
_local3.onRelease = function () {
selectBook(this);
};
_local5++;
}
moveToBook(_local6);
contentClip.tween("_y", contentClip.displayY, 0.3, "easeOutQuad", 0, "setBlur(true)");
setEnabled(true);
}
function setEnabled(p_bState) {
scrollbar.setEnabled(p_bState);
leftHand.button.enabled = p_bState;
rightHand.button.enabled = p_bState;
}
function setBlur(p_bState) {
contentClip.showBlur = p_bState;
}
function moveToBook(p_nID) {
m_nBrowseMode = CLICK;
setPositon(null, false, p_nID);
var _local1 = (100 / (m_nNumBooks - 1)) * p_nID;
scrollbar.positionScrollbar(_local1);
}
function selectBook(p_oBook) {
if (m_nSelectedBook == p_oBook.id) {
} else {
moveToBook(p_oBook.id);
}
}
function setPositon(p_nPosition, p_bDragging, p_nBookID) {
if (m_nBrowseMode == undefined) {
return(undefined);
}
if (m_nBrowseMode == CLICK) {
m_nBrowseMode = undefined;
}
if (p_nBookID == undefined) {
var _local5 = Math.round(((m_nNumBooks - 1) / 100) * p_nPosition);
} else {
var _local5 = p_nBookID;
}
if (m_nSelectedBook == _local5) {
return(undefined);
}
m_nSelectedBook = _local5;
var _local8 = 0.25;
var _local4 = _local5 - 1;
var _local6 = 0;
var _local3 = 2;
while (_local4 >= 0) {
var _local2 = contentClip["book" + _local4];
_local2.xPos = (-startX) - (_local6 / (_local3 / 3));
_local2.newScale = 200 / _local3;
_local2.newFrame = nFrameLeft;
_local2.position = "left";
_local2.newDepth = _local4;
_local2.checkDepth = function () {
if (this._currentframe < nFrameFront) {
this.swapDepths(this.newDepth);
this.checkDepth = undefined;
}
};
_local6 = _local6 + spacerX;
_local3 = _local3 + _local8;
_local4--;
}
_local4 = _local5 + 1;
_local6 = 0;
_local3 = 2;
while (_local4 < m_nNumBooks) {
var _local2 = contentClip["book" + _local4];
_local2.xPos = startX + (_local6 / (_local3 / 3));
_local2.newScale = 200 / _local3;
_local2.newFrame = nFrameRight;
_local2.position = "right";
_local2.newDepth = (m_nNumBooks + _local5) - _local4;
_local2.checkDepth = function () {
if (this._currentframe > nFrameFront) {
this.swapDepths(this.newDepth);
this.checkDepth = undefined;
}
};
_local6 = _local6 + spacerX;
_local3 = _local3 + _local8;
_local4++;
}
var _local2 = contentClip["book" + _local5];
_local2.xPos = 0;
_local2.newScale = 100;
_local2.newFrame = nFrameFront;
_local2.newDepth = m_nNumBooks;
activeCarCallback(_local5);
_local2.checkDepth = function () {
var _local2 = 90;
if ((this._currentframe < nFrameFront) && (this._currentframe > (nFrameFront - _local2))) {
this.swapDepths(this.newDepth);
this.checkDepth = undefined;
}
if ((this._currentframe > nFrameFront) && (this._currentframe < (nFrameFront + _local2))) {
this.swapDepths(this.newDepth);
this.checkDepth = undefined;
} else {
this.swapDepths(this.newDepth);
this.checkDepth = undefined;
}
};
_local4 = 0;
while (_local4 < m_nNumBooks) {
_local2 = contentClip["book" + _local4];
_local2.animSpeed = 2.5;
if (!_local2.onEnterFrame) {
_local2.onEnterFrame = function () {
if (this.checkDepth) {
this.checkDepth();
}
this._x = this._x + ((this.xPos - this._x) / this.animSpeed);
this._xscale = this._xscale + ((this.newScale - this._xscale) / this.animSpeed);
this._yscale = this._xscale;
this.gotoAndStop(this._currentframe + Math.round((this.newFrame - this._currentframe) / this.animSpeed));
this._visible = (this._x > -370) && (this._x < 370);
var _local2 = Math.abs(this._x - this.oldX);
this.oldX = this._x;
if (_local2 == 0) {
delete this.onEnterFrame;
}
};
}
_local4++;
}
}
contentClip.setMask(myMask);
var firstRunComplete = false;
var CLICK = 0;
var SCROLL = 1;
var m_nBrowseMode;
var startX = 110;
var spacerX = 70;
var m_aLibrary = [[["Carpe Jugulum", 361, 9780552146159], ["Carpe Jugulum", 352, 9780552146159], ["Carpe Jugulum", 358, 9780552146159], ["Death\u2019s Domain", 370, 9780552146722], ["Feet of Clay", 400, 9780552142373], ["Feet of Clay", 403, 9780552153256], ["Going Postal", 412, 9780552149433], ["Going Postal", 265, 9780552149433]]];
var m_bActive = false;
var m_nNumBooks;
var m_nCurrentLibrary = 0;
var m_nSelectedBook;
var nFrameLeft = 1;
var nFrameFront = 100;
var nFrameRight = 200;
var m_nWidth = ((nWidth == undefined) ? 200 : (nWidth));
var m_nHeight = ((nHeight == undefined) ? 200 : (nHeight));
contentClip.hiddenY = 250;
contentClip.displayY = -12;
contentClip.cacheAsBitmap = true;
contentClip.blur = new BlurFilter(0, 0, 2);
contentClip.filters = [contentClip.blur];
contentClip.main.oScroller = this;
scrollbar.oContent = contentClip;
scrollbar.m_nWidth = m_nWidth;
contentClip._y = contentClip.hiddenY;
displayLibrary();
contentClip.showBlur = false;
contentClip.onEnterFrame = function () {
if (m_bActive == true) {
this.oldBlurX = this.newBlurX;
this.oldBlurY = this.newBlurY;
this.newX = this.book0._x;
this.oldX = ((this.oldX == undefined) ? (this.book0._x) : (this.oldX));
this.newY = this._y;
this.oldY = ((this.oldY == undefined) ? (this.book0._y) : (this.oldY));
this.distX = this.newX - this.oldX;
this.distY = this.newY - this.oldY;
this.oldX = this.newX;
this.oldY = this.newY;
this.newBlurX = Math.floor(this.distX);
this.newBlurY = Math.floor(this.distY);
if (this.newBlurX < 0) {
this.newBlurX = -this.newBlurX;
}
if (this.newBlurX > 50) {
this.newBlurX = 50;
}
if (this.newBlurY < 0) {
this.newBlurY = -this.newBlurY;
}
if (this.newBlurY > 20) {
this.newBlurY = 20;
}
if ((this.oldBlurX == this.newBlurX) && (this.oldBlurY == this.newBlurY)) {
return(undefined);
}
this.blur.blurX = this.newBlurX;
this.blur.blurY = 0;
this.filters = [this.blur];
}
};
enable();
Symbol 424 MovieClip Frame 10
won.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
this.clicked = true;
_parent.carProfile.alphaTo(0, 1);
_parent.graph.alphaTo(0, 1);
_parent.scrollText.alphaTo(0, 1);
_parent.titleClip.alphaTo(0, 1);
this.scaleTo(0, 0.5);
play();
};
won.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
won.onRollOut = function () {
if (this.clicked != true) {
this.scaleTo(100, 0.5, "easeOutElastic");
}
};
won.onRelease;
stop();
Symbol 424 MovieClip Frame 22
_parent._parent.gotoAndStop("typeSelector");
Symbol 425 MovieClip Frame 1
titleClip.alphaTo(100, 1, "linear", 1);
scrollText.alphaTo(100, 1, "linear", 0.5);
carProfile.alphaTo(100, 1, "linear", 1.5);
graph.alphaTo(100, 1, "linear", 1.5);
Instance of Symbol 419 MovieClip "scrollText" in Symbol 425 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
sTextClip = "";
nWidth = 675;
nHeight = 110;
sText = "";
sColour = 0;
bFade = true;
nFadeDelay = 0;
}
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 10
won.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_parent.carProfile.alphaTo(0, 1);
_parent.graph.alphaTo(0, 1);
_parent.scrollText.alphaTo(0, 1);
_parent.selectVehicle.alphaTo(0, 0.5);
_parent.practiceButton.alphaTo(0, 0.5);
_parent.raceButton.alphaTo(0, 0.5);
_parent.text1.alphaTo(0, 0.5);
_parent.text2.alphaTo(0, 0.5);
this.clicked = true;
this.scaleTo(0, 0.5);
play();
};
won.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
won.onRollOut = function () {
if (this.clicked != true) {
this.scaleTo(100, 0.5, "easeOutElastic");
}
};
stop();
Symbol 428 MovieClip Frame 22
_parent._parent.gotoAndStop("trackSelector");
Symbol 448 MovieClip Frame 1
eventTitle.alphaTo(100, 1);
_parent.darkBackg.slideTo(undefined, 318, 1);
_parent.darkBackg.alphaTo(30, 1);
practiceButton.onRelease = function () {
if (continueButton._currentframe == 1) {
continueButton.play();
}
_root.objSounds.play("rollover-bleepbleep");
_parent.darkBackg.arrow.slideTo(220, undefined, 1);
_parent.darkBackg.arrow.alphaTo(100, 1);
_parent.darkBackg.slideTo(undefined, 318, 1);
_parent.darkBackg.alphaTo(100, 1);
text1.alphaTo(0, 0.5, "");
text2.alphaTo(100, 0.5, "", 0.5);
_root.gameMode = "practice";
};
practiceButton.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
practiceButton.onDragOut = (practiceButton.onReleaseOutside = (practiceButton.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
raceButton.onRelease = function () {
if (continueButton._currentframe == 1) {
continueButton.play();
}
_root.objSounds.play("rollover-bleepbleep");
_parent.darkBackg.arrow.slideTo(500, undefined, 1);
_parent.darkBackg.arrow.alphaTo(100, 1);
_parent.darkBackg.slideTo(undefined, 318, 1);
_parent.darkBackg.alphaTo(100, 1);
text1.alphaTo(100, 0.5, "", 0.5);
text2.alphaTo(0, 0.5, "");
_root.gameMode = "race";
};
raceButton.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
raceButton.onDragOut = (raceButton.onReleaseOutside = (raceButton.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
selectVehicle.alphaTo(100, 0.5);
practiceButton.alphaTo(100, 0.5);
raceButton.alphaTo(100, 0.5);
Symbol 455 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 10
won.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
this.clicked = true;
_parent.carProfile.alphaTo(0, 1);
_parent.graph.alphaTo(0, 1);
_parent.scrollText.alphaTo(0, 1);
_parent.track1.alphaTo(0, 1);
_parent.track2.alphaTo(0, 1);
_parent.track3.alphaTo(0, 1);
_parent.caption1.alphaTo(0, 1);
_parent.caption2.alphaTo(0, 1);
_parent.caption3.alphaTo(0, 1);
_parent.titleclip.alphaTo(0, 1);
nextSection = "submitScore";
this.scaleTo(0, 1);
play();
};
won.onRollOver = function () {
this.scaleTo(110, 0.5);
_root.objSounds.play("rollover-bleep");
};
won.onRollOut = function () {
if (this.clicked != true) {
this.scaleTo(100, 0.5);
}
};
stop();
Symbol 455 MovieClip Frame 37
_root.initRace();
stop();
Symbol 482 MovieClip Frame 1
_parent.darkBackg.arrow.alphaTo(0, 0.5);
track1.alphaTo(100, 1, "", 0);
track2.alphaTo(100, 1, "", 0.5);
track3.alphaTo(100, 1, "", 1);
track1.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.trackID = "learnersloop";
if (continueButton._currentframe == 1) {
continueButton.play();
}
caption1.alphaTo(100, 0.5, "linear", 0.5);
caption2.alphaTo(0, 0.5);
caption3.alphaTo(0, 0.5);
};
track2.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.trackID = "racersrun";
if (continueButton._currentframe == 1) {
continueButton.play();
}
caption1.alphaTo(0, 0.5);
caption2.alphaTo(100, 0.5, "linear", 0.5);
caption3.alphaTo(0, 0.5);
};
track3.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
_root.trackID = "rollercoaster";
if (continueButton._currentframe == 1) {
continueButton.play();
}
caption1.alphaTo(0, 0.5);
caption2.alphaTo(0, 0.5);
caption3.alphaTo(100, 0.5, "linear", 0.5);
};
track1.onRollOver = (track2.onRollOver = (track3.onRollOver = function () {
_root.objSounds.play("rollover-bleep");
}));
titleclip.alphaTo(100, 0.5);
stop();
Symbol 498 MovieClip Frame 2
stop();
Symbol 517 MovieClip Frame 1
if (_root.gameMode == "race") {
_root.objSounds.play("race-intro-ambience");
}
Symbol 517 MovieClip Frame 45
_root.objSounds.play("bloop");
Symbol 517 MovieClip Frame 61
_root.objSounds.play("bloop");
Symbol 517 MovieClip Frame 76
_root.objSounds.play("bloop");
Symbol 517 MovieClip Frame 91
_parent._parent.objGame.setState("racing");
_root.objSounds.play("bleep");
Symbol 517 MovieClip Frame 106
stop();
Symbol 519 MovieClip Frame 1
gotoAndStop ("wait");
Symbol 519 MovieClip Frame 11
_root.objSounds.play("bloop");
Symbol 519 MovieClip Frame 35
stop();
Instance of Symbol 520 MovieClip "panel" in Symbol 521 MovieClip Frame 1
/* no clip actions */
Symbol 534 MovieClip Frame 1
submitScore.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
submitScore.onDragOut = (submitScore.onReleaseOutside = (submitScore.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
playAgain.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
playAgain.onDragOut = (playAgain.onReleaseOutside = (playAgain.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
Symbol 534 MovieClip Frame 13
stop();
Symbol 534 MovieClip Frame 26
_root.gotoAndStop(this.gotoFrame);
Symbol 546 MovieClip Frame 1
txtNickname.text = "";
txtName.text = "";
txtEmail.text = "";
errNickname._visible = false;
Symbol 570 MovieClip Frame 10
stop();
Symbol 570 MovieClip Frame 21
_root.gotoAndStop("introScreen");
Symbol 593 MovieClip Frame 1
function customIsValid() {
_root.objSounds.play("rollover-bleepbleep");
return(true);
}
_level0.trackPoint("STF_Presented");
stop();
_root.Datacap = function (formID, thirdPartySubmit) {
this.formID = formID;
this.thirdPartySubmit = thirdPartySubmit;
this.controls = [];
this.formInstance = undefined;
this.sendingFrame = "";
this.successFrame = "";
this.failureFrame = "";
this.userID = 0;
this.customIsValid = undefined;
this.preSubmit = undefined;
this.onSuccess = undefined;
this.onFailure = undefined;
this.datacapURL = "http://www.hyperlaunch.com/datacap/datacap";
this.datacapExtension = "php";
if (_level0.debug) {
trace("Creating data form, ID=" + formID);
}
var _local4 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local4.data.userID == undefined) {
_local4.data.userID = Math.floor(Math.random() * 100000000) + 100000000;
}
this.userID = _local4.data.userID;
_local4.flush();
this.registerTextbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered textbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for textbox " + varName) + "");
}
this.controls.push({style:"textbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateTextbox, autoFill:this.autoFillTextbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateTextbox = function (control) {
if (control.errorMarker != undefined) {
if ((control.instance.text == undefined) || (control.instance.text == "")) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillTextbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerEmailbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered emailbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for emailbox " + varName) + "");
}
this.controls.push({style:"emailbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateEmailbox, autoFill:this.autoFillEmailbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateEmailbox = function (control) {
if (control.errorMarker != undefined) {
var _local3 = true;
if (control.instance.text == undefined) {
_local3 = false;
}
if (control.instance.text == "") {
_local3 = false;
}
var _local5 = control.instance.text.split("@");
if (_local5.length != 2) {
_local3 = false;
}
if (_local5[0] == "") {
_local3 = false;
}
var _local2 = _local5[1].split(".");
if (_local2.length < 2) {
_local3 = false;
}
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == "") {
_local3 = false;
}
_local1++;
}
if (_local3) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = false;
return(true);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = true;
return(false);
}
return(true);
};
this.autoFillEmailbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerNumberbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered numberbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for numberbox " + varName) + "");
}
this.controls.push({style:"numberbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateNumberbox, autoFill:this.autoFillNumberbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateNumberbox = function (control) {
if (control.errorMarker != undefined) {
if (((control.instance.text == undefined) || (control.instance.text == "")) || (isNaN(parseInt(control.instance.text)))) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillNumberbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerCheckbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered checkbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for checkbox " + varName) + "");
}
this.controls.push({style:"checkbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateCheckbox, autoFill:this.autoFillCheckbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateCheckbox = function (control) {
if (control.errorMarker != undefined) {
if (_level0.debug) {
trace((("Validating " + control.style) + " ") + control.varName);
}
if (control.instance.selected != true) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillCheckbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.selected = _local1.data[control.varName];
control.instance.gotoAndStop((_local1.data[control.varName] ? "checked" : (unchecked)));
}
};
this.registerRadioSet = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered radioset " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for radioset " + varName) + "");
}
this.controls.push({style:"radioset", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateRadioSet, autoFill:this.autoFillRadioSet});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateRadioSet = function (control) {
if (control.errorMarker != undefined) {
if (control.instance.selection == undefined) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillRadioSet = function (control) {
return(undefined);
};
this.registerDropdown = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered dropdown " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for dropdown " + varName) + "");
}
this.controls.push({style:"dropdown", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateDropdown, autoFill:this.autoFillDropdown});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateDropdown = function (control) {
if (control.errorMarker != undefined) {
if (control.instance.selectedIndex == 0) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillDropdown = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.selectedIndex = _local1.data[control.varName];
}
};
this.registerSubmit = function (varName, instance, value) {
if (_level0.debug) {
trace((("Registered submit button " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for submit button " + varName) + "");
}
this.controls.push({style:"submit", varName:varName, instance:instance, value:value});
instance.objForm = this;
instance.tabIndex = this.controls.length;
instance.onRelease = this.submitForm;
};
this.setHiddenValue = function (varName, value) {
if (_level0.debug) {
trace((("Set hidden value " + varName) + "=") + value);
}
var _local3;
var _local2 = 0;
while (_local2 < this.controls.length) {
if (this.controls[_local2].style == "hidden") {
if (this.controls[_local2].varName == varName) {
_local3 = _local2;
}
}
_local2++;
}
if (_local3 == undefined) {
this.controls.push({style:"hidden", varName:varName, value:value});
} else {
this.controls[_local3].value = value;
}
};
this.registerFrames = function (sendingFrame, successFrame, failureFrame, formInstance) {
if (_level0.debug) {
trace("Registered frames for instance " + formInstance);
}
if (formInstance == undefined) {
trace("Error: Registering frames, form instance invalid");
}
this.formInstance = formInstance;
this.sendingFrame = sendingFrame;
this.successFrame = successFrame;
this.failureFrame = failureFrame;
};
this.registerCallbacks = function (customIsValid, preSubmit, onSuccess, onFailure) {
if (_level0.debug) {
trace("Registered callbacks");
}
this.customIsValid = customIsValid;
this.preSubmit = preSubmit;
this.onSuccess = onSuccess;
this.onFailure = onFailure;
};
this.submitForm = function () {
if (_level0.debug) {
trace("Submit pressed - validating");
}
var _local6 = true;
if (this.objForm.customIsValid != undefined) {
if (!this.objForm.customIsValid()) {
_local6 = false;
}
}
var _local2 = 0;
while (_local2 < this.objForm.controls.length) {
if (this.objForm.controls[_local2].isValid != undefined) {
if (!this.objForm.controls[_local2].isValid(this.objForm.controls[_local2])) {
_local6 = false;
}
}
_local2++;
}
if (_local6) {
if (_level0.debug) {
trace("Form validated - sending");
}
if (_level0.debug) {
trace("Submitting form");
}
var _local5 = new LoadVars();
var _local7 = new LoadVars();
_local7.objForm = this.objForm;
this.objForm.preSubmit();
var _local4 = SharedObject.getLocal("hyperlaunchDatacap");
_local2 = 0;
while (_local2 < this.objForm.controls.length) {
var _local3 = "";
switch (this.objForm.controls[_local2].style) {
case "textbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "emailbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "numberbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "checkbox" :
_local3 = (this.objForm.controls[_local2].instance.selected ? true : false);
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "radioset" :
_local3 = this.objForm.controls[_local2].instance.selection.data;
break;
case "dropdown" :
_local3 = this.objForm.controls[_local2].instance.selectedItem.data;
_local4.data[this.objForm.controls[_local2].varName] = this.objForm.controls[_local2].instance.selectedIndex;
break;
case "hidden" :
_local3 = this.objForm.controls[_local2].value;
break;
case "submit" :
_local3 = this.objForm.controls[_local2].value;
this.objForm.controls[_local2].instance._visible = false;
break;
default :
trace("Unhandled component style " + this.objForm.controls[_local2].style);
}
if (_level0.debug) {
trace(((" " + this.objForm.controls[_local2].varName) + " = ") + _local3);
}
_local5[this.objForm.controls[_local2].varName] = _local3;
_local2++;
}
_local4.flush();
_local5.userID = this.objForm.userID;
_local5.formID = this.objForm.formID;
_local7.onLoad = function (success) {
trace("SUCCESS: " + success);
if (success) {
if (_level0.debug) {
trace("Success");
}
this.objForm.onSuccess();
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.successFrame);
}
} else {
if (_level0.debug) {
trace("Failed");
}
this.objForm.onFailure();
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.failureFrame);
}
}
};
var _local8 = ((this.objForm.datacapURL + ((this.objForm.thirdPartySubmit == undefined) ? "" : ("_" + this.objForm.thirdPartySubmit))) + ".") + this.objForm.datacapExtension;
_local5.sendAndLoad(_local8, _local7, "POST");
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.sendingFrame);
}
} else if (_level0.debug) {
trace("Form data not validated");
}
};
this.autoFill = function () {
var _local2 = 0;
while (_local2 < this.controls.length) {
this.controls[_local2].autoFill(this.controls[_local2]);
_local2++;
}
};
this.onKeyDown = function () {
if ((Key.isDown(16) && (Key.isDown(17))) && (Key.isDown(192))) {
this.autoFill();
}
};
Key.addListener(this);
trace("Press ctrl+shift+@ to autofill form with previously entered values");
this.initCountryDropDown = function (dropdownClip) {
dropdownClip.addItem("Select Country", "NIL");
dropdownClip.addItem("United Kingdom", "GB");
dropdownClip.addItem("Ireland", "IE");
dropdownClip.addItem("France", "FR");
dropdownClip.addItem("Spain", "ES");
dropdownClip.addItem("Netherlands", "NL");
dropdownClip.addItem("Italy", "IT");
dropdownClip.addItem("Germany", "DE");
dropdownClip.addItem("United States", "US");
dropdownClip.addItem("Canada", "CA");
dropdownClip.addItem("---------------------", "--");
dropdownClip.addItem("Afghanistan", "AF");
dropdownClip.addItem("Albania", "AL");
dropdownClip.addItem("Algeria", "DZ");
dropdownClip.addItem("American Samoa", "AS");
dropdownClip.addItem("Andorra", "AD");
dropdownClip.addItem("Angola", "AO");
dropdownClip.addItem("Anguilla", "AI");
dropdownClip.addItem("Antarctica", "AQ");
dropdownClip.addItem("Antigua And Barbuda", "AG");
dropdownClip.addItem("Argentina", "AR");
dropdownClip.addItem("Armenia", "AM");
dropdownClip.addItem("Aruba", "AW");
dropdownClip.addItem("Australia", "AU");
dropdownClip.addItem("Austria", "AT");
dropdownClip.addItem("Azerbaijan", "AZ");
dropdownClip.addItem("Bahamas", "BS");
dropdownClip.addItem("Bahrain", "BH");
dropdownClip.addItem("Bangladesh", "BD");
dropdownClip.addItem("Barbados", "BB");
dropdownClip.addItem("Belarus", "BY");
dropdownClip.addItem("Belgium", "BE");
dropdownClip.addItem("Belize", "BZ");
dropdownClip.addItem("Benin", "BJ");
dropdownClip.addItem("Bermuda", "BM");
dropdownClip.addItem("Bhutan", "BT");
dropdownClip.addItem("Bolivia", "BO");
dropdownClip.addItem("Bosnia And Herzegowina", "BA");
dropdownClip.addItem("Botswana", "BW");
dropdownClip.addItem("Bouvet Island", "BV");
dropdownClip.addItem("Brazil", "BR");
dropdownClip.addItem("British Indian Ocean Territory", "IO");
dropdownClip.addItem("Brunei Darussalam", "BN");
dropdownClip.addItem("Bulgaria", "BG");
dropdownClip.addItem("Burkina Faso", "BF");
dropdownClip.addItem("Burundi", "BI");
dropdownClip.addItem("Cambodia", "KH");
dropdownClip.addItem("Cameroon", "CM");
dropdownClip.addItem("Cape Verde", "CV");
dropdownClip.addItem("Cayman Islands", "KY");
dropdownClip.addItem("Central African Republic", "CF");
dropdownClip.addItem("Chad", "TD");
dropdownClip.addItem("Chile", "CL");
dropdownClip.addItem("China", "CN");
dropdownClip.addItem("Christmas Island", "CX");
dropdownClip.addItem("Cocos (Keeling) Islands", "CC");
dropdownClip.addItem("Colombia", "CO");
dropdownClip.addItem("Comoros", "KM");
dropdownClip.addItem("Congo", "CG");
dropdownClip.addItem("Cook Islands", "CK");
dropdownClip.addItem("Costa Rica", "CR");
dropdownClip.addItem("Cote D'Ivoire", "CI");
dropdownClip.addItem("Croatia (Local Name: Hrvatska)", "HR");
dropdownClip.addItem("Cuba", "CU");
dropdownClip.addItem("Cyprus", "CY");
dropdownClip.addItem("Czech Republic", "CZ");
dropdownClip.addItem("Denmark", "DK");
dropdownClip.addItem("Djibouti", "DJ");
dropdownClip.addItem("Dominica", "DM");
dropdownClip.addItem("Dominican Republic", "DO");
dropdownClip.addItem("East Timor", "TP");
dropdownClip.addItem("Ecuador", "EC");
dropdownClip.addItem("Egypt", "EG");
dropdownClip.addItem("El Salvador", "SV");
dropdownClip.addItem("Equatorial Guinea", "GQ");
dropdownClip.addItem("Eritrea", "ER");
dropdownClip.addItem("Estonia", "EE");
dropdownClip.addItem("Ethiopia", "ET");
dropdownClip.addItem("Falkland Islands (Malvinas)", "FK");
dropdownClip.addItem("Faroe Islands", "FO");
dropdownClip.addItem("Fiji", "FJ");
dropdownClip.addItem("Finland", "FI");
dropdownClip.addItem("French Guiana", "GF");
dropdownClip.addItem("French Polynesia", "PF");
dropdownClip.addItem("French Southern Territories", "TF");
dropdownClip.addItem("Gabon", "GA");
dropdownClip.addItem("Gambia", "GM");
dropdownClip.addItem("Georgia", "GE");
dropdownClip.addItem("Ghana", "GH");
dropdownClip.addItem("Gibraltar", "GI");
dropdownClip.addItem("Greece", "GR");
dropdownClip.addItem("Greenland", "GL");
dropdownClip.addItem("Grenada", "GD");
dropdownClip.addItem("Guadeloupe", "GP");
dropdownClip.addItem("Guam", "GU");
dropdownClip.addItem("Guatemala", "GT");
dropdownClip.addItem("Guinea", "GN");
dropdownClip.addItem("Guinea-Bissau", "GW");
dropdownClip.addItem("Guyana", "GY");
dropdownClip.addItem("Haiti", "HT");
dropdownClip.addItem("Heard And Mc Donald Islands", "HM");
dropdownClip.addItem("Holy See (Vatican City State)", "VA");
dropdownClip.addItem("Honduras", "HN");
dropdownClip.addItem("Hong Kong", "HK");
dropdownClip.addItem("Hungary", "HU");
dropdownClip.addItem("Icel And", "IS");
dropdownClip.addItem("India", "IN");
dropdownClip.addItem("Indonesia", "ID");
dropdownClip.addItem("Iran (Islamic Republic Of)", "IR");
dropdownClip.addItem("Iraq", "IQ");
dropdownClip.addItem("Israel", "IL");
dropdownClip.addItem("Jamaica", "JM");
dropdownClip.addItem("Japan", "JP");
dropdownClip.addItem("Jordan", "JO");
dropdownClip.addItem("Kazakhstan", "KZ");
dropdownClip.addItem("Kenya", "KE");
dropdownClip.addItem("Kiribati", "KI");
dropdownClip.addItem("Korea, Dem People'S Republic", "KP");
dropdownClip.addItem("Korea, Republic Of", "KR");
dropdownClip.addItem("Kuwait", "KW");
dropdownClip.addItem("Kyrgyzstan", "KG");
dropdownClip.addItem("Lao People'S Dem Republic", "LA");
dropdownClip.addItem("Latvia", "LV");
dropdownClip.addItem("Lebanon", "LB");
dropdownClip.addItem("Lesotho", "LS");
dropdownClip.addItem("Liberia", "LR");
dropdownClip.addItem("Libyan Arab Jamahiriya", "LY");
dropdownClip.addItem("Liechtenstein", "LI");
dropdownClip.addItem("Lithuania", "LT");
dropdownClip.addItem("Luxembourg", "LU");
dropdownClip.addItem("Macau", "MO");
dropdownClip.addItem("Macedonia", "MK");
dropdownClip.addItem("Madagascar", "MG");
dropdownClip.addItem("Malawi", "MW");
dropdownClip.addItem("Malaysia", "MY");
dropdownClip.addItem("Maldives", "MV");
dropdownClip.addItem("Mali", "ML");
dropdownClip.addItem("Malta", "MT");
dropdownClip.addItem("Marshall Islands", "MH");
dropdownClip.addItem("Martinique", "MQ");
dropdownClip.addItem("Mauritania", "MR");
dropdownClip.addItem("Mauritius", "MU");
dropdownClip.addItem("Mayotte", "YT");
dropdownClip.addItem("Mexico", "MX");
dropdownClip.addItem("Micronesia, Federated States", "FM");
dropdownClip.addItem("Moldova, Republic Of", "MD");
dropdownClip.addItem("Monaco", "MC");
dropdownClip.addItem("Mongolia", "MN");
dropdownClip.addItem("Montserrat", "MS");
dropdownClip.addItem("Morocco", "MA");
dropdownClip.addItem("Mozambique", "MZ");
dropdownClip.addItem("Myanmar", "MM");
dropdownClip.addItem("Namibia", "NA");
dropdownClip.addItem("Nauru", "NR");
dropdownClip.addItem("Nepal", "NP");
dropdownClip.addItem("Netherlands Ant Illes", "AN");
dropdownClip.addItem("New Caledonia", "NC");
dropdownClip.addItem("New Zealand", "NZ");
dropdownClip.addItem("Nicaragua", "NI");
dropdownClip.addItem("Niger", "NE");
dropdownClip.addItem("Nigeria", "NG");
dropdownClip.addItem("Niue", "NU");
dropdownClip.addItem("Norfolk Island", "NF");
dropdownClip.addItem("Northern Mariana Islands", "MP");
dropdownClip.addItem("Norway", "NO");
dropdownClip.addItem("Oman", "OM");
dropdownClip.addItem("Pakistan", "PK");
dropdownClip.addItem("Palau", "PW");
dropdownClip.addItem("Panama", "PA");
dropdownClip.addItem("Papua New Guinea", "PG");
dropdownClip.addItem("Paraguay", "PY");
dropdownClip.addItem("Peru", "PE");
dropdownClip.addItem("Philippines", "PH");
dropdownClip.addItem("Pitcairn", "PN");
dropdownClip.addItem("Poland", "PL");
dropdownClip.addItem("Portugal", "PT");
dropdownClip.addItem("Puerto Rico", "PR");
dropdownClip.addItem("Qatar", "QA");
dropdownClip.addItem("Reunion", "RE");
dropdownClip.addItem("Romania", "RO");
dropdownClip.addItem("Russian Federation", "RU");
dropdownClip.addItem("Rwanda", "RW");
dropdownClip.addItem("Saint K Itts And Nevis", "KN");
dropdownClip.addItem("Saint Lucia", "LC");
dropdownClip.addItem("Saint Vincent, The Grenadines", "VC");
dropdownClip.addItem("Samoa", "WS");
dropdownClip.addItem("San Marino", "SM");
dropdownClip.addItem("Sao Tome And Principe", "ST");
dropdownClip.addItem("Saudi Arabia", "SA");
dropdownClip.addItem("Senegal", "SN");
dropdownClip.addItem("Seychelles", "SC");
dropdownClip.addItem("Sierra Leone", "SL");
dropdownClip.addItem("Singapore", "SG");
dropdownClip.addItem("Slovakia (Slovak Republic)", "SK");
dropdownClip.addItem("Slovenia", "SI");
dropdownClip.addItem("Solomon Islands", "SB");
dropdownClip.addItem("Somalia", "SO");
dropdownClip.addItem("South Africa", "ZA");
dropdownClip.addItem("South Georgia , S Sandwich Is.", "GS");
dropdownClip.addItem("Sri Lanka", "LK");
dropdownClip.addItem("St. Helena", "SH");
dropdownClip.addItem("St. Pierre And Miquelon", "PM");
dropdownClip.addItem("Sudan", "SD");
dropdownClip.addItem("Suriname", "SR");
dropdownClip.addItem("Svalbard, Jan Mayen Islands", "SJ");
dropdownClip.addItem("Sw Aziland", "SZ");
dropdownClip.addItem("Sweden", "SE");
dropdownClip.addItem("Switzerland", "CH");
dropdownClip.addItem("Syrian Arab Republic", "SY");
dropdownClip.addItem("Taiwan", "TW");
dropdownClip.addItem("Tajikistan", "TJ");
dropdownClip.addItem("Tanzania, United Republic Of", "TZ");
dropdownClip.addItem("Thailand", "TH");
dropdownClip.addItem("Togo", "TG");
dropdownClip.addItem("Tokelau", "TK");
dropdownClip.addItem("Tonga", "TO");
dropdownClip.addItem("Trinidad And Tobago", "TT");
dropdownClip.addItem("Tunisia", "TN");
dropdownClip.addItem("Turkey", "TR");
dropdownClip.addItem("Turkmenistan", "TM");
dropdownClip.addItem("Turks And Caicos Islands", "TC");
dropdownClip.addItem("Tuvalu", "TV");
dropdownClip.addItem("Uganda", "UG");
dropdownClip.addItem("Ukraine", "UA");
dropdownClip.addItem("United Arab Emirates", "AE");
dropdownClip.addItem("United States Minor Is.", "UM");
dropdownClip.addItem("Uruguay", "UY");
dropdownClip.addItem("Uzbekistan", "UZ");
dropdownClip.addItem("Vanuatu", "VU");
dropdownClip.addItem("Venezuela", "VE");
dropdownClip.addItem("Viet Nam", "VN");
dropdownClip.addItem("Virgin Islands (British)", "VG");
dropdownClip.addItem("Virgin Islands (U.S.)", "VI");
dropdownClip.addItem("Wallis And Futuna Islands", "WF");
dropdownClip.addItem("Western Sahara", "EH");
dropdownClip.addItem("Yemen", "YE");
dropdownClip.addItem("Yugoslavia", "YU");
dropdownClip.addItem("Zaire", "ZR");
dropdownClip.addItem("Zambia", "ZM");
dropdownClip.addItem("Zimbabwe", "ZW");
dropdownClip.setSelectedIndex(0);
};
this.initMobilesDropdown = function (dropdownClip) {
mobiles = new Array();
dropdownClip.addItem("Select manufacturer", "NIL");
dropdownClip.addItem("NOKIA", "NOKIA");
dropdownClip.addItem("MOTOROLA", "MOTOROLA");
dropdownClip.addItem("SAMSUNG", "SAMSUNG");
dropdownClip.addItem("SONY ERICSSON", "ERICSSON");
dropdownClip.addItem("ALCATEL", "ALCATEL");
dropdownClip.addItem("LG", "LG");
dropdownClip.addItem("NEC", "NEC");
dropdownClip.addItem("PANASONIC", "PANASONIC");
dropdownClip.addItem("SAGEM", "SAGEM");
dropdownClip.addItem("SIEMENS", "SIEMENS");
dropdownClip.addItem("SHARP", "SHARP");
dropdownClip.addItem("TRIUM", "TRIUM");
dropdownClip.addItem("HANDSPRING", "HANDSPRING");
dropdownClip.addItem("POGO", "POGO");
dropdownClip.setSelectedItem(0);
};
this.initDateDropdowns = function (dropdownYear, dropdownMonth, dropdownDay) {
dropdownDay.addItem("DD");
var _local1 = 1;
while (_local1 <= 31) {
dropdownDay.addItem(_local1, _local1);
_local1++;
}
dropdownDay.setSelectedIndex(0);
dropdownMonth.addItem("MM");
_local1 = 1;
while (_local1 <= 12) {
dropdownMonth.addItem(_local1, _local1);
_local1++;
}
dropdownMonth.setSelectedIndex(0);
dropdownYear.addItem("YYYY");
_local1 = 2007;
while (_local1 >= 1900) {
dropdownYear.addItem(_local1, _local1);
_local1--;
}
dropdownYear.setSelectedIndex(0);
};
};
txtName.text = "";
txtEmail.text = "";
txtFname.text = "";
txtFemail.text = "";
txtMessage.text = "";
var objDatacap = (new _root.Datacap("speedracer_wb_stf", "stf"));
objDatacap.registerTextbox("name", this.txtName, this.errName);
objDatacap.registerTextbox("email", this.txtEmail, this.errEmail);
objDatacap.registerTextbox("fname", this.txtFname, this.errFname);
objDatacap.registerTextbox("femail", this.txtFemail, this.errFemail);
objDatacap.registerTextbox("message", this.txtMessage);
objDatacap.registerSubmit("submit", this.btnSubmit, "submit");
objDatacap.registerCallbacks(customIsValid, preSubmit, onSuccess, onFailure);
objDatacap.registerFrames("sending", "success", "failure", this);
btnSubmit.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
btnSubmit.onDragOut = (btnSubmit.onReleaseOutside = (btnSubmit.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
Symbol 593 MovieClip Frame 21
_level0.trackPoint("STF_Sent");
btnAnother.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
gotoAndStop ("form");
};
btnAnother.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
btnAnother.onDragOut = (btnAnother.onReleaseOutside = (btnAnother.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
Symbol 593 MovieClip Frame 31
_level0.trackPoint("STF_Failed");
btnAnother.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
gotoAndStop ("form");
};
btnAnother.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
btnAnother.onDragOut = (btnAnother.onReleaseOutside = (btnAnother.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
Symbol 596 MovieClip Frame 10
playGame.onRollOver = function () {
this.scaleTo(110, 0.5, "easeOutElastic");
_root.objSounds.play("rollover-bleep");
};
playGame.onDragOut = (playGame.onReleaseOutside = (playGame.onRollOut = function () {
this.scaleTo(100, 0.5, "easeOutElastic");
}));
playGame.onRelease = function () {
_root.objSounds.play("rollover-bleepbleep");
nextSection = "introScreen";
play();
};
stop();
Symbol 596 MovieClip Frame 20
if (nextSection != "") {
_root.gotoAndStop(nextSection);
}