Frame 1
this.attachMovie("FGamePreloader", "preload1", 57);
preload1.setLocation(240, 150);
preload1.setSoundFile("carpuzzle_sounds.swf", sound_holder);
preload1.setMusicFile("trackmod_music.swf", song_holder);
preload1.setParentTL(this);
preload1.setJumpLabel("start");
preload1.startPreLoad();
var appSection = "Games";
var appTitle = "TrackMod";
var appPath = "/games/trackmod";
var play_ft = (new mattel.data.FlashTrack());
play_ft.ti = ((appSection + "-") + appTitle) + "-Play";
play_ft.dcsuri = appPath + "play.ftrk";
var playAgain_ft = (new mattel.data.FlashTrack());
playAgain_ft.ti = ((appSection + "-") + appTitle) + "-PlayAgain";
playAgain_ft.dcsuri = appPath + "playagain.ftrk";
var send_ft = (new mattel.data.FlashTrack());
send_ft.ti = ((appSection + "-") + appTitle) + "-SendToFriend";
send_ft.dcsuri = appPath + "sendtofriend.ftrk";
stop();
Frame 3
gameboard = new Board(this);
gameboard.setStartX(80);
gameboard.setStartY(-25);
gameboard.setDepthBase(10000);
gameboard.setDepthMax(20000);
gameboard.setSoundClip(sound_holder);
gameboard.setSongClip(song_holder);
gameboard.setGameMode(Board.MODE_SHOW_TITLE_SCREEN);
this.onEnterFrame = function () {
gameboard.Run();
};
var emailform_mc = attachMovie("EmailSymbol", "email", 55500);
emailform_mc._x = -500;
emailform_mc._y = 0;
var myEmail = (new hotwheels.Email());
stop();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 5
play();
Symbol 30 MovieClip Frame 14
stop();
Symbol 30 MovieClip Frame 15
play();
Symbol 30 MovieClip Frame 23
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 5
play();
Symbol 34 MovieClip Frame 14
stop();
Symbol 34 MovieClip Frame 15
play();
Symbol 34 MovieClip Frame 23
stop();
Symbol 40 MovieClip [EmailSymbol] Frame 10
send_btn.onRelease = function () {
_parent.myEmail.setFromName_txt(firstname_txt.text);
_parent.myEmail.setToName_txt(friendname_txt.text);
_parent.myEmail.setToEmail_txt(email_txt.text);
if (_parent.myEmail.validate()) {
varSender = new LoadVars();
varReceiver = new LoadVars();
varSender.toName = friendname_txt.text;
varSender.toEmail = email_txt.text;
varSender.fromName = firstname_txt.text;
varSender.sendAndLoad("/games/trackmod/email.aspx", varReceiver, "Get");
gotoAndStop ("thankyou");
}
};
cancel_btn.onRelease = function () {
gotoAndStop ("empty");
};
firstname_txt.tabIndex = 0;
friendname_txt.tabIndex = 1;
email_txt.tabIndex = 2;
send_btn.tabIndex = 3;
cancel_btn.tabIndex = 4;
stop();
Symbol 40 MovieClip [EmailSymbol] Frame 11
function waitTime() {
this.gotoAndStop("empty");
_parent._parent.gotoAndStop("gameover");
clearInterval(waitInt);
}
waitInt = setInterval(this, "waitTime", 5000);
_parent.send_ft.track();
Symbol 53 MovieClip [FGamePreloader] Frame 1
#initclip 29
Object.registerClass("FGamePreloader", GamePreloader);
#endinitclip
Symbol 53 MovieClip [FGamePreloader] Frame 5
stop();
Symbol 53 MovieClip [FGamePreloader] Frame 7
this.removeMovieClip();
stop();
Symbol 792 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 793 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sortOn, reverse, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local4 = mixinProps;
var _local6 = _local4.length;
obj = obj.prototype;
var _local3 = 0;
while (_local3 < _local6) {
obj[_local4[_local3]] = mixins[_local4[_local3]];
_global.ASSetPropFlags(obj, _local4[_local3], 1);
_local3++;
}
mx.events.EventDispatcher.initialize(obj);
_global.ASSetPropFlags(obj, "addEventListener", 1);
_global.ASSetPropFlags(obj, "removeEventListener", 1);
_global.ASSetPropFlags(obj, "dispatchEvent", 1);
_global.ASSetPropFlags(obj, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
if (this.__ID__ == undefined) {
this.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(this, "__ID__", 1);
}
return(this.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
if (index < length) {
splice(index, 0, value);
} else if (index > length) {
trace("Cannot add an item past the end of the DataProvider");
return(undefined);
}
this[index] = value;
updateViews("addItems", index, index);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
index = Math.min(length, index);
newItems.unshift(index, 0);
splice.apply(this, newItems);
newItems.splice(0, 2);
updateViews("addItems", index, (index + newItems.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function removeItemAt(index) {
var _local2 = this[index];
removeItemsAt(index, 1);
return(_local2);
}
function removeAll(Void) {
splice(0);
updateViews("removeItems", 0, length - 1);
}
function replaceItemAt(index, itemObj) {
if ((index < 0) || (index >= length)) {
return(undefined);
}
var _local3 = getItemID(index);
this[index] = itemObj;
this[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local2 = this[index];
if ((typeof(_local2) != "object") && (_local2 != undefined)) {
return(index);
}
return(_local2.getID());
}
function sortItemsBy(fieldName, order) {
if (typeof(order) == "string") {
sortOn(fieldName);
if (order.toUpperCase() == "DESC") {
reverse();
}
} else {
sortOn(fieldName, order);
}
updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
this[index][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:index, lastItem:index, fieldName:fieldName});
}
function getEditingData(index, fieldName) {
return(this[index][fieldName]);
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static var mixinProps = ["addView", "addItem", "addItemAt", "removeAll", "removeItemAt", "replaceItemAt", "getItemAt", "getItemID", "sortItemsBy", "sortItems", "updateViews", "addItemsAt", "removeItemsAt", "getEditingData", "editField"];
static var evtDipatcher = mx.events.EventDispatcher;
static var mixins = new mx.controls.listclasses.DataProvider();
}
Symbol 794 MovieClip [__Packages.mattel.data.Serializable] Frame 0
interface mattel.data.Serializable
{
}
Symbol 795 MovieClip [__Packages.mattel.data.FlashTrack] Frame 0
class mattel.data.FlashTrack implements mattel.data.Serializable
{
var trackLog, ti, dcsuri, redirectLink, popupProps;
function FlashTrack (t, autoTrack) {
trackLog = new mattel.utils.Logger(mattel.utils.Logger.DEBUG, "FlashTrack");
if (t != null) {
ti = t;
dcsuri = ti + ".ftrk";
}
if (autoTrack) {
track();
}
}
static function initialize(optFlag) {
if (optFlag == null) {
enabled = true;
} else {
enabled = optFlag;
}
}
function track() {
return(_track("FlashTrack"));
}
function trackRedir(rl) {
if (rl != null) {
redirectLink = rl;
}
return(_track("FlashTrackRedir"));
}
function trackRedirPopup(rLink, pProps) {
if (rLink != null) {
redirectLink = rLink;
}
if (pProps != null) {
popupProps = pProps;
}
return(_track("FlashTrackRedirPopup"));
}
function serialize() {
var _local2 = "";
if (dcsuri != null) {
_local2 = _local2 + (("'DCS.dcsuri','" + dcsuri) + "'");
}
if (ti != null) {
_local2 = _local2 + ((",'WT.ti','" + ti) + "'");
}
if (redirectLink != null) {
_local2 = _local2 + ((",'WT.lo','" + redirectLink) + "'");
}
if (popupProps != null) {
_local2 = _local2 + ((",'WT.pr','" + popupProps) + "'");
}
return(_local2);
}
function _track(action) {
if (enabled) {
if (dcsuri == null) {
dcsuri = ti + ".ftrk";
}
getURL (((("JavaScript:" + action) + "( ") + serialize()) + " );");
trace(((("JavaScript:" + action) + "( ") + serialize()) + " );");
}
return(true);
}
static var enabled = true;
}
Symbol 796 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
if (level <= this.level) {
if (level == DEBUG) {
onLog((((getDateString() + " [DEBUG] ") + name) + ": ") + msg);
} else {
onLog((((getDateString() + " [INFO] ") + name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
trace(message);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 797 MovieClip [__Packages.mattel.utils.Logger] Frame 0
class mattel.utils.Logger extends mx.services.Log
{
function Logger (logLevel, name) {
super(logLevel, name);
}
function logInfo(msg, level) {
var _local3;
if (msg instanceof Error) {
_local3 = (("[" + msg.name) + "] ") + msg.message;
} else {
_local3 = msg;
}
super.logInfo(_local3, level);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 798 MovieClip [__Packages.ComponentBase] Frame 0
class ComponentBase extends MovieClip
{
var removeMovieClip, _x, _y;
function ComponentBase () {
super();
mx.events.EventDispatcher.initialize(this);
}
function Destroy() {
removeMovieClip();
}
function SetLocation(x, y) {
_x = x;
_y = y;
}
function addEventListener() {
}
function removeEventListener() {
}
function dispatchEvent() {
}
}
Symbol 799 MovieClip [__Packages.GamePreloader] Frame 0
class GamePreloader extends ComponentBase
{
var jumpLabel, soundFile, musicFile, preloadStarted, sFC, mFC, mC, _x, _y, play, loader_mc, _currentframe, removeMovieClip;
function GamePreloader () {
super();
trace("preloader constructor");
jumpLabel = "";
soundFile = "";
musicFile = "";
preloadStarted = false;
sFC = null;
mFC = null;
mC = null;
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setParentTL(tl) {
mC = tl;
}
function setSoundFile(sFile, clip) {
soundFile = sFile;
sFC = clip;
}
function setMusicFile(mFile, clip) {
musicFile = mFile;
mFC = clip;
}
function setJumpLabel(labeltext) {
jumpLabel = labeltext;
}
function startPreLoad() {
preloadStarted = true;
if (soundFile != "") {
sFC.loadMovie(soundFile);
}
if (musicFile != "") {
mFC.loadMovie(musicFile);
}
}
function onEnterFrame() {
if (preloadStarted) {
var _local8 = sFC.getBytesLoaded();
var _local6 = sFC.getBytesTotal();
var _local2 = mFC.getBytesLoaded();
var _local9 = mFC.getBytesTotal();
var _local7 = mC.getBytesLoaded();
var _local5 = mC.getBytesTotal();
var _local4 = (_local8 + _local2) + _local7;
var _local3 = (_local6 + _local2) + _local5;
if (_local4 >= _local3) {
mC.gotoAndStop(jumpLabel);
(play());// not popped
} else {
loader_mc.needle_mc._rotation = (_local4 / _local3) * 90;
}
}
if (_currentframe >= 7) {
removeMovieClip();
}
}
}
Symbol 800 MovieClip [__Packages.LevelPopUp] Frame 0
class LevelPopUp extends ComponentBase
{
var animation, _visible, level_text, parent, _parent, _x, _y, removeMovieClip;
function LevelPopUp () {
super();
animation.startbutton.onRelease = clickHandler;
moving = false;
terminateAfterMove = false;
final_x = 0;
_visible = false;
}
function setLevel(lvl) {
level = lvl;
var _local2 = 1;
if (level > MAXPOPUPLEVELS) {
_local2 = MAXPOPUPLEVELS;
} else {
_local2 = level;
}
animation.mods.gotoAndStop(_local2 + 1);
level_text = "Realm " + (level + 1);
}
function setParent(p) {
parent = p;
}
function clickHandler() {
_parent._parent.clickStart();
}
function clickStart() {
animation.play();
parent.EventLevelStartButtonPressed();
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setExtremeLeft(el) {
extremeLeft = el;
}
function setExtremeRight(er) {
extremeRight = er;
}
function setAppear() {
moving = true;
_x = extremeRight;
final_x = 0;
_visible = true;
}
function setDisappear() {
trace("Set Disappear");
moving = true;
final_x = extremeLeft;
terminateAfterMove = true;
}
function Terminate() {
parent.removeEventListener("Run", this);
removeMovieClip();
}
function Run() {
if (moving) {
_x = _x - 60;
if (_x <= final_x) {
_x = final_x;
moving = false;
if (terminateAfterMove) {
Terminate();
}
}
}
}
var moving = false;
var extremeRight = 0;
var extremeLeft = 0;
var terminateAfterMove = false;
var final_x = 0;
var level = 1;
static var MAXPOPUPLEVELS = 12;
}
Symbol 801 MovieClip [__Packages.Message] Frame 0
class Message extends ComponentBase
{
var parent, _x, _y, removeMovieClip;
function Message () {
super();
scaleIncrement = 2;
fadeIncrement = 5;
messageValue = "";
moving = false;
movedFrames = 0;
}
function setParent(clp) {
parent = clp;
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setMessage(msg) {
messageValue = msg;
}
function getScore() {
return(messageValue);
}
function setFade(fd) {
fadeIncrement = fd;
}
function getFade() {
return(fadeIncrement);
}
function setScale(scl) {
scaleIncrement = scl;
}
function getScale() {
return(scaleIncrement);
}
function getX() {
return(_x);
}
function getY() {
return(_y);
}
function startMoving() {
moving = true;
}
function Run() {
if (moving) {
movedFrames++;
if (movedFrames >= MOVEFRAMES) {
parent.removeEventListener("Run", this);
removeMovieClip();
} else {
_y = _y - 0.5;
}
}
}
var messageValue = "";
var scaleIncrement = 2;
var fadeIncrement = 5;
var moving = false;
static var MOVEFRAMES = 30;
var movedFrames = 0;
}
Symbol 802 MovieClip [__Packages.ParticleExplosion] Frame 0
class ParticleExplosion extends ComponentBase
{
var MAXPARTICLES, xc, yc, velocity, gravity, angle, life, fade, particleDepth, time_increment, disbursement, image, scale, rotation, color1, color2, TParticle, timeline, clip, active, removeMovieClip;
function ParticleExplosion () {
super();
MAXPARTICLES = 0;
xc = 0;
yc = 0;
velocity = 0;
gravity = 0;
angle = 0;
life = 0;
fade = false;
particleDepth = 1;
time_increment = 10;
disbursement = 0;
image = "";
scale = 0;
rotation = 0;
color1 = null;
color2 = null;
TParticle = new Array();
}
function setParent(tl) {
timeline = tl;
}
function setLocation(x, y) {
xc = x;
yc = y;
}
function setMaxParticles(max) {
MAXPARTICLES = max;
}
function setVelocity(v) {
velocity = v;
}
function setGravity(g) {
gravity = g;
}
function setAngle(a) {
angle = a;
}
function setDisbursment(d) {
disbursement = d;
}
function setLife(l) {
life = l;
}
function setTimeIncrement(t) {
time_increment = t;
}
function setFade(f) {
fade = f;
}
function setImage(i) {
image = i;
}
function setScale(s) {
scale = s;
}
function setRotation(r) {
rotation = r;
}
function setStartColor(c) {
color1 = c;
}
function setEndColor(c) {
color2 = c;
}
function Run() {
if (started) {
move();
}
}
function start() {
started = true;
clip = this;
clip._x = xc;
clip._y = yc;
var _local4;
_local4 = 0;
while (_local4 < MAXPARTICLES) {
var _local11 = (Math.random() * (velocity / 2)) + velocity;
var _local2;
var _local5;
var _local6;
var _local10;
var _local8;
var _local7;
var _local3;
var _local12;
if (angle < 999) {
if ((Math.random() * 1) == 0) {
_local3 = -1;
} else {
_local3 = 1;
}
_local2 = (-angle) + ((_local3 * Math.random()) * disbursement);
} else {
_local2 = Math.random() * 360;
}
_local12 = ((Math.random() * 100) + 80) / 100;
_local5 = Math.round(life * _local12);
_local6 = 0;
_local7 = true;
_local10 = 0;
_local8 = 0;
var _local9 = new Particle(_local10, _local8, _local11, _local2, _local5, gravity, _local6, _local7, clip, particleDepth, fade, image, scale, rotation, color1, color2);
TParticle.push(_local9);
particleDepth++;
_local4++;
}
started = true;
active = true;
}
function move() {
var _local2;
var _local3;
if (MAXPARTICLES > 0) {
_local2 = 0;
while (_local2 < TParticle.length) {
_local3 = TParticle[_local2].move(time_increment);
if (!_local3) {
delete TParticle[_local2];
TParticle.splice(_local2, 1);
MAXPARTICLES--;
}
_local2++;
}
} else {
removeMovieClip();
active = false;
ended = true;
}
}
var ended = false;
var started = false;
}
Symbol 803 MovieClip [__Packages.Particle] Frame 0
class Particle
{
var x, y, vi, angle, life, fade, MAXLIFE, gravity, depth, time, timeline, active, image, scale, color1, color2, rotation, clip, colorO1;
function Particle (t_x, t_y, t_vi, t_angle, t_life, t_gravity, t_time, t_active, tl, t_depth, t_fade, t_image, t_scale, t_rotation, t_color1, t_color2) {
x = t_x;
y = t_x;
vi = t_vi;
angle = t_angle;
life = t_life;
fade = t_fade;
MAXLIFE = life;
gravity = t_gravity;
depth = t_depth;
time = t_time;
timeline = tl;
active = t_active;
image = t_image;
scale = t_scale;
color1 = t_color1;
color2 = t_color2;
rotation = Math.random() * t_rotation;
clip = timeline.attachMovie(image, "particle" + depth, depth);
clip.xdepth = depth;
clip._xscale = 100 + Math.floor(Math.random() * scale);
clip._yscale = clip._xscale;
if (color1 != null) {
colorO1 = new Color(clip);
colorO1.setRGB(color1);
}
}
function move(dtime) {
if (active) {
var _local2;
var _local4;
time = time + dtime;
_local2 = time / 1000;
x = (vi * Math.cos((angle * Math.PI) / 180)) * _local2;
y = ((vi * Math.sin((angle * Math.PI) / 180)) * _local2) + (((gravity * _local2) * _local2) / 2);
if (fade) {
clip._alpha = clip._alpha - (100 / (MAXLIFE / dtime));
}
if (time >= life) {
clip.removeMovieClip();
active = false;
} else {
active = true;
}
clip._x = x;
clip._y = y;
if (rotation > 0) {
clip._rotation = clip._rotation + rotation;
}
} else {
active = true;
}
return(active);
}
}
Symbol 804 MovieClip [__Packages.Score] Frame 0
class Score extends ComponentBase
{
var _alpha, parent, _x, _y, removeMovieClip, _yscale, _xscale;
function Score () {
super();
scaleIncrement = 4;
fadeIncrement = 5;
scoreValue = 0;
moving = false;
_alpha = 80;
}
function setParent(clp) {
parent = clp;
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setScore(scr) {
scoreValue = scr;
}
function setScoreColor(cn) {
var _local2 = new Color(this);
_local2.setRGB(cn);
}
function getScore() {
return(scoreValue);
}
function setFade(fd) {
fadeIncrement = fd;
}
function getFade() {
return(fadeIncrement);
}
function setScale(scl) {
scaleIncrement = scl;
}
function getScale() {
return(scaleIncrement);
}
function getX() {
return(_x);
}
function getY() {
return(_y);
}
function startMoving() {
moving = true;
}
function Run() {
if (moving) {
movedFrames++;
if (movedFrames >= MOVEFRAMES) {
parent.removeEventListener("Run", this);
removeMovieClip();
} else {
_yscale = _yscale + scaleIncrement;
_xscale = _xscale + scaleIncrement;
}
}
}
var scoreValue = 0;
var scaleIncrement = 4;
var fadeIncrement = 5;
var moving = false;
static var MOVEFRAMES = 20;
var movedFrames = 0;
}
Symbol 805 MovieClip [__Packages.ScoreBoard] Frame 0
class ScoreBoard extends ComponentBase
{
var trackModsButton, helpButton, animation, pauseSecondsLeft, _parent, trackMods, parent, gotoAndStop, levelText, timeBaseSeconds, timeLeft, timeString1, timeText, timeBlink, clockPlaying, trackModsText, soundClip, _x, _y, score_mc, trackmod_mc;
function ScoreBoard () {
super();
Reset();
trackModsButton.onRelease = trackModsReleaseHandler;
trackModsButton.onRollOver = trackModsRollOverHandler;
helpButton.onRelease = helpReleaseHandler;
helpButton.onRollOver = helpRollOverHandler;
animation.play_button.onRelease = closeHelpHandler;
pauseSecondsLeft = 0;
effectiveLevel = -1;
}
function getEffectiveLevel() {
return(effectiveLevel);
}
function incEffectiveLevel() {
effectiveLevel++;
trace("effectiveLevel:" + effectiveLevel);
if (effectiveLevel > EFFECTIVEMAX) {
effectiveLevel = 1;
}
}
function trackModsReleaseHandler() {
trackModsButton.gotoAndPlay("_up");
_parent.clickTrackMods();
}
function trackModsRollOverHandler() {
trackModsButton.gotoAndPlay("_over");
}
function helpReleaseHandler() {
helpButton.gotoAndPlay("_up");
_parent.clickHelp();
}
function helpRollOverHandler() {
helpButton.gotoAndPlay("_over");
}
function closeHelpHandler() {
trace("closeHelpHandler");
_parent._parent.clickCloseHelp();
}
function clickTrackMods() {
if (trackMods > 0) {
parent.EventTrackModsButtonPressed();
}
}
function clickHelp() {
parent.EventHelpButtonPressed();
(gotoAndStop("helpOn"));// not popped
animation.gotoAndPlay("instructions");
}
function clickCloseHelp() {
trace("clickCloseHelp");
parent.EventCloseHelpButtonPressed();
(gotoAndStop("helpOff"));// not popped
}
function Reset() {
score = 0;
level = 0;
levelText = "00";
racesComplete = 0;
longest = 0;
tracksUsed = 0;
carsToFinish = 0;
timeStarted = false;
timeStartTime = 0;
timeUp = true;
timeBaseSeconds = 0;
timeLeft = 0;
timeString1 = "0:00";
timeText.gotoAndStop("green");
timeBlink = false;
clockPlaying = false;
trackMods = 0;
trackModsText = "00";
parent = null;
AccelBonusLevel = 1;
}
function setParent(par) {
parent = par;
}
function setSoundClip(snd) {
soundClip = snd;
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setScore(scr) {
score = scr;
}
function getScore() {
return(score);
}
function addScore(scr) {
score = score + scr;
}
function addBonus(scr) {
score = score + scr;
score_mc.gotoAndPlay("light");
}
function setLevel(lvl) {
level = lvl;
if (level < 10) {
levelText = "0" + level.toString();
} else {
levelText = level.toString();
}
carsToFinish = 0;
AccelBonusLevel = 1;
incEffectiveLevel();
}
function incAccelBonusLevel() {
AccelBonusLevel++;
}
function getAccelBonusLevel() {
return(AccelBonusLevel);
}
function getLevel() {
return(level);
}
function getLevelTime() {
var _local2 = getLevel();
if (_local2 > (levelTime.length - 1)) {
_local2 = levelTime.length - 1;
}
trace("lvl:" + _local2);
trace("levelTime[lvl]:" + levelTime[_local2]);
return(levelTime[_local2]);
}
function setRacesComplete(num) {
racesComplete = num;
}
function getRacesComplete() {
return(racesComplete);
}
function incRacesComplete() {
racesComplete++;
}
function setTracksUsed(num) {
tracksUsed = num;
}
function getTracksUsed() {
return(tracksUsed);
}
function setCarsToFinish(ctf) {
carsToFinish = ctf;
}
function addTracksUsed(num) {
tracksUsed = tracksUsed + num;
}
function setLongest(num) {
longest = num;
}
function getLongest() {
return(longest);
}
function setTrackMods(val) {
trackMods = val;
if (trackMods < 10) {
trackModsText = "0" + trackMods.toString();
} else {
trackModsText = trackMods.toString();
}
}
function subTrackMods(val) {
trackMods = trackMods - val;
if (trackMods < 10) {
trackModsText = "0" + trackMods.toString();
} else {
trackModsText = trackMods.toString();
}
}
function addTrackMods(val) {
trackMods = trackMods + val;
trackmod_mc.gotoAndPlay("light");
if (trackMods < 10) {
trackModsText = "0" + trackMods.toString();
} else {
trackModsText = trackMods.toString();
}
}
function getTrackMods() {
return(trackMods);
}
function getTimeUp() {
return(timeUp);
}
function getTimeStarted() {
return(timeStarted);
}
function setTimeStarted(ts) {
timeStarted = ts;
}
function pauseTime() {
pauseSecondsLeft = timeBaseSeconds - Math.ceil((getTimer() - timeStartTime) / 1000);
}
function unPauseTime() {
timeBaseSeconds = pauseSecondsLeft;
timeStartTime = getTimer();
}
function TimeCalculate() {
var _local4 = 0;
var _local2 = 0;
var _local5 = 0;
var _local3 = 0;
_local4 = Math.ceil((getTimer() - timeStartTime) / 1000);
_local2 = timeBaseSeconds - _local4;
_local5 = Math.floor(_local2 / 60);
_local3 = Math.floor(_local2 % 60);
if (_local3 < 10) {
timeString1 = (_local5 + ":0") + _local3;
} else {
var _local6 = (_local5.toString() + ":") + _local3.toString();
timeString1 = _local6;
}
if (_local4 >= timeBaseSeconds) {
TimeStop();
timeString1 = "0:00";
timeText.gotoAndStop("red");
soundClip.stopClockTick();
soundClip.playBuzzer();
clockPlaying = false;
} else if (_local2 < 15) {
if (!clockPlaying) {
soundClip.playClockTick();
clockPlaying = true;
}
if (!timeBlink) {
timeBlink = true;
timeText.gotoAndPlay("blink");
}
} else {
soundClip.stopClockTick();
clockPlaying = false;
if (timeBlink) {
timeBlink = false;
timeText.gotoAndStop("green");
}
}
}
function TimeReset() {
soundClip.stopClockTick();
timeBlink = false;
timeText.gotoAndStop("green");
timeUp = false;
timeBaseSeconds = getLevelTime();
trace("timebaseseconds:" + timeBaseSeconds);
}
function TimeStart() {
soundClip.stopClockTick();
timeBlink = false;
timeText.gotoAndStop("green");
timeStartTime = getTimer();
timeStarted = true;
}
function TimeStop() {
timeUp = true;
timeStarted = false;
soundClip.stopClockTick();
}
function TimeAddSeconds(sec) {
var _local2 = 0;
_local2 = Math.floor((getTimer() - timeStartTime) / 1000);
timeBaseSeconds = (timeBaseSeconds - _local2) + sec;
timeStartTime = getTimer();
}
function TimeSubSeconds(sec) {
var _local2 = 0;
_local2 = Math.floor((getTimer() - timeStartTime) / 1000);
timeBaseSeconds = (timeBaseSeconds - _local2) - sec;
timeStartTime = getTimer();
}
var score = 0;
var level = 0;
var effectiveLevel = -1;
static var EFFECTIVEMAX = 6;
var racesComplete = 0;
var longest = 0;
var tracksUsed = 0;
var timeStarted = false;
var timeStartTime = 0;
var timeUp = true;
var levelTime = new Array(0, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150);
var carsToFinish = 0;
var AccelBonusLevel = 1;
}
Symbol 806 MovieClip [__Packages.Track] Frame 0
class Track extends ComponentBase
{
var fallEndY, fallMoveUnits, TrackColorArray, TrackColorIndex, _y, colorObj, greyTransform, origTransform, onRelease, trackRotation, _rotation, trackType, gotoAndStop, icons_mc, track_mc, soundClip, parent, _x, _xscale, _yscale, removeMovieClip, attachMovie;
function Track () {
super();
oright = false;
oleft = false;
oup = false;
odown = false;
connected = false;
falling = false;
terminate = false;
fallEndY = 0;
fallMoveUnits = 0;
appear = false;
disappear = false;
explodeAtBottom = false;
acount = 0;
dcount = 0;
dscale = [100, 110, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0];
ascale = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 110, 100];
specialProb = [0, 6, 10, 10, 10, 12, 12, 12, 14, 14, 14, 14, 14];
t_accell1 = [0, 75, 15, 15, 10, 10, 10, 5, 5, 5, 5, 5, 2];
t_accell2 = [0, 99, 30, 30, 20, 20, 20, 10, 10, 10, 10, 10, 6];
t_speedboost = [0, 0, 65, 55, 50, 40, 30, 20, 20, 20, 20, 15, 10];
t_plasma = [0, 0, 99, 70, 55, 45, 35, 25, 25, 25, 25, 20, 15];
t_tracklock = [0, 0, 0, 90, 70, 60, 45, 35, 35, 35, 30, 25, 25];
t_addtime10 = [0, 0, 0, 99, 80, 65, 65, 40, 40, 40, 40, 30, 35];
t_subtime5 = [0, 0, 0, 0, 99, 70, 75, 50, 50, 45, 45, 35, 40];
t_ice = [0, 0, 0, 0, 0, 99, 80, 55, 55, 50, 50, 40, 50];
t_lava = [0, 0, 0, 0, 0, 0, 95, 65, 65, 55, 55, 45, 55];
t_shield = [0, 0, 0, 0, 0, 0, 99, 70, 70, 60, 60, 50, 60];
t_pit = [0, 0, 0, 0, 0, 0, 0, 99, 80, 65, 65, 55, 99];
t_tornado = [0, 0, 0, 0, 0, 0, 0, 0, 99, 75, 70, 60, 70];
t_oil = [0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 75, 65, 75];
t_crusher = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 75, 85];
t_warp = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 99];
TrackColorArray = [16777215, 11184810, 11382017, 7354645, 8523012, 12082176, 13158];
TrackColorIndex = 0;
special = false;
specialvalue = 0;
specialType = 0;
falling = false;
terminate = false;
fallEndY = _y;
fallMoveUnits = 0;
timedOpen = false;
toFrameCount = 0;
toStatus = 0;
remove = false;
fadeIcon = false;
animating = false;
colorObj = new Color(this);
greyTransform = new Object();
greyTransform.ra = 100;
greyTransform.rb = -65;
greyTransform.ga = 100;
greyTransform.gb = -65;
greyTransform.ba = 100;
greyTransform.bb = -65;
origTransform = colorObj.getTransform();
onRelease = clickTrack;
}
function greyOut() {
colorObj.setTransform(greyTransform);
}
function colorOut() {
colorObj.setTransform(origTransform);
}
function createTrack(elevel, level) {
trace("level:" + level);
var _local5 = level;
if (level > 12) {
level = 12;
}
TrackColorIndex = elevel;
trackLevel = elevel;
var _local3 = Math.floor(Math.random() * 100);
var _local4 = specialProb[level];
if (_local5 > 12) {
_local4 = _local4 + (_local5 - 12);
if (_local4 > 25) {
_local4 = 25;
}
}
if (_local3 <= _local4) {
_local3 = Math.floor(Math.random() * 100);
special = true;
if (_local3 <= t_accell1[level]) {
setBonusLevel(level);
} else if (_local3 <= t_accell2[level]) {
setAddTrackMod();
} else if (_local3 <= t_speedboost[level]) {
setSpeedBoost();
} else if (_local3 <= t_plasma[level]) {
setPlasma();
} else if (_local3 <= t_tracklock[level]) {
setTrackLock();
} else if (_local3 <= t_addtime10[level]) {
setClockAdd();
} else if (_local3 <= t_subtime5[level]) {
setClockMinus();
} else if (_local3 <= t_ice[level]) {
setIce();
} else if (_local3 <= t_lava[level]) {
setLava(level);
} else if (_local3 <= t_shield[level]) {
trace("special: shield");
setShield();
} else if (_local3 <= t_pit[level]) {
trace("special: pit");
setPit();
} else if (_local3 <= t_tornado[level]) {
setTornado(level);
} else if (_local3 <= t_crusher[level]) {
setCrusher(level);
} else if (_local3 <= t_oil[level]) {
setOil();
} else if (_local3 <= t_warp[level]) {
setWarp(level);
} else {
setNormal(level);
}
} else {
setNormal(level);
}
findOpenings();
displayConnected();
}
function randomRotation() {
trackRotation = Math.floor(Math.random() * 4);
_rotation = 90 * trackRotation;
}
function setNormal(lvlcurvemod) {
var _local3 = Math.floor(Math.random() * 100) + 1;
if (lvlcurvemod > 15) {
lvlcurvemod = 15;
}
if (_local3 <= (50 + lvlcurvemod)) {
trackType = CURVE;
gotoAndStop(ICURVE);
icons_mc.gotoAndStop(ICURVENONE);
} else {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
icons_mc.gotoAndStop(ISTRAIGHTNONE);
}
track_mc.gotoAndStop(trackLevel);
randomRotation();
}
function setAddTrackMod() {
specialType = ISPECIAL_ACCEL_MOD;
specialvalue = 1;
var _local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ICURVEACCELL2);
} else {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTACCELL2);
}
randomRotation();
}
function setBonusLevel(lvl) {
specialType = ISPECIAL_ACCEL;
var _local2 = Math.floor(Math.random() * lvl) + 1;
specialvalue = 200 + (25 * lvl);
_local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ICURVEACCELL1);
} else {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTACCELL1);
}
randomRotation();
}
function setSpeedBoost() {
specialType = ISPECIAL_SPEEDBOOST;
specialvalue = LIMIT4;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTSPEEDBOOST);
TrackColorIndex = TRACKCOLORSPEEDBOOST;
randomRotation();
}
function setPlasma() {
specialType = ISPECIAL_PLASMA;
specialvalue = LIMIT2;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTPLASMA);
randomRotation();
}
function setTrackLock() {
trace("SET TRACK LOCK: Tracklevel:" + trackLevel);
specialType = ISPECIAL_TRACKLOCK;
var _local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTTRACKLOCK);
} else {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ICURVESTATIC);
}
TrackColorIndex = TRACKCOLORTRACKLOCK;
randomRotation();
}
function setClockAdd() {
specialType = ISPECIAL_TIMEADD;
specialvalue = 10;
var _local2 = Math.floor(Math.random() * 2) + 1;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTTIMEADD);
randomRotation();
}
function setClockMinus() {
specialType = ISPECIAL_TIMESUB;
specialvalue = 10;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTTIMESUB);
randomRotation();
}
function setOil() {
specialType = ISPECIAL_OIL;
specialvalue = LIMIT2;
var _local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTOIL);
} else {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTOIL);
}
randomRotation();
}
function setLava(lvl) {
specialType = ISPECIAL_LAVA;
timedOpen = true;
animating = true;
var _local2 = Math.floor(Math.random() * 60) + 1;
toFramesClosed = toFramesClosed + _local2;
toStatus = TOCLOSED;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTLAVA);
icons_mc._xscale = 0;
icons_mc._yscale = 0;
icons_mc._visible = false;
TrackColorIndex = TRACKCOLORLAVA;
randomRotation();
}
function setPit() {
trace("SET PIT: Tracklevel:" + trackLevel);
specialType = ISPECIAL_PIT;
timedOpen = true;
animating = true;
var _local2 = Math.floor(Math.random() * 60) + 1;
toFramesClosed = toFramesClosed + _local2;
toStatus = TOCLOSED;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
track_mc._visible = false;
icons_mc.gotoAndStop(ISTRAIGHTPIT_OFFSET + trackLevel);
randomRotation();
}
function setTornado(lvl) {
specialType = ISPECIAL_TORNADO;
timedOpen = true;
animating = true;
var _local2 = Math.floor(Math.random() * 60) + 1;
toFramesClosed = toFramesClosed + _local2;
toStatus = TOCLOSED;
specialvalue = LIMIT1;
_local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTTORNADO);
} else {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ICURVETORNADO);
}
icons_mc._xscale = 0;
icons_mc._yscale = 0;
icons_mc._visible = false;
randomRotation();
}
function setIce() {
specialType = ISPECIAL_ICE;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTICE);
TrackColorIndex = TRACKCOLORICE;
randomRotation();
}
function setCrusher(lvl) {
specialType = ISPECIAL_CRUSHER;
timedOpen = true;
toStatus = TOCLOSED;
animating = true;
var _local2 = Math.floor(Math.random() * 60) + 1;
toFramesClosed = toFramesClosed + _local2;
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTCRUSHER);
TrackColorIndex = TRACKCOLORCRUSHER;
randomRotation();
}
function setWarp(lvl) {
specialType = ISPECIAL_WARP;
timedOpen = true;
toStatus = TOCLOSED;
animating = true;
var _local2 = Math.floor(Math.random() * 60) + 1;
toFramesClosed = toFramesClosed + _local2;
_local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTWARP);
} else {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ICURVEWARP);
}
icons_mc._xscale = 0;
icons_mc._yscale = 0;
icons_mc._visible = false;
randomRotation();
}
function setShield() {
specialType = ISPECIAL_SHIELD;
var _local2 = Math.floor(Math.random() * 2) + 1;
if (_local2 == 1) {
trackType = STRAIGHT;
gotoAndStop(ISTRAIGHT);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ISTRAIGHTSHIELD);
} else {
trackType = CURVE;
gotoAndStop(ICURVE);
track_mc.gotoAndStop(trackLevel);
icons_mc.gotoAndStop(ICURVESHIELD);
}
TrackColorIndex = TRACKCOLORTRACKLOCK;
randomRotation();
}
function animateIcon() {
switch (specialType) {
case ISPECIAL_ACCEL :
fadeIcon = true;
break;
case ISPECIAL_ACCEL_MOD :
icons_mc._visible = false;
break;
case ISPECIAL_OIL :
fadeIcon = true;
break;
case ISPECIAL_LAVA :
break;
case ISPECIAL_TIMEADD :
fadeIcon = true;
break;
case ISPECIAL_TIMESUB :
fadeIcon = true;
break;
case ISPECIAL_CRUSHER :
break;
case ISPECIAL_SPEEDBOOST :
icons_mc.icon.gotoAndStop("animated");
break;
case ISPECIAL_WARP :
break;
case ISPECIAL_TORNADO :
break;
case ISPECIAL_TRACKLOCK :
break;
case ISPECIAL_PIT :
break;
case ISPECIAL_ICE :
break;
case ISPECIAL_PLASMA :
fadeIcon = true;
break;
case ISPECIAL_SHIELD :
fadeIcon = true;
}
}
function setSoundClip(clp) {
soundClip = clp;
}
function getTrackColor() {
return(TrackColorArray[TrackColorIndex]);
}
function clickTrack() {
if (((!getParent().getPauseGame()) && (getParent().getGameMode() == Board.MODE_USER_PLAY)) && (specialType != ISPECIAL_TRACKLOCK)) {
_rotation = _rotation + 90;
if (_rotation >= 360) {
_rotation = 0;
}
findOpenings();
displayConnected();
getParent().trackClicked();
}
}
function findOpenings() {
if (trackType == STRAIGHT) {
if ((_rotation == 0) || (_rotation == 180)) {
oright = true;
oleft = true;
oup = false;
odown = false;
} else {
oright = false;
oleft = false;
oup = true;
odown = true;
}
} else if (trackType == CURVE) {
if (_rotation == 0) {
oright = false;
oleft = true;
oup = false;
odown = true;
} else if (_rotation == 90) {
oright = false;
oleft = true;
oup = true;
odown = false;
} else if (_rotation == 180) {
oright = true;
oleft = false;
oup = true;
odown = false;
} else {
oright = true;
oleft = false;
oup = false;
odown = true;
}
} else if (trackType == BLOCK) {
oright = false;
oleft = false;
oup = false;
odown = false;
}
}
function displayConnected() {
if (!connected) {
greyOut();
} else {
colorOut();
}
}
function setConnected(con) {
connected = con;
displayConnected();
}
function getTrackType() {
return(trackType);
}
function getRotation() {
return(_rotation);
}
function getConnected() {
return(connected);
}
function setParent(p) {
parent = p;
}
function getParent() {
return(parent);
}
function getX() {
return(_x);
}
function getY() {
return(_y);
}
function setForTermination(endY, mu) {
falling = true;
terminate = true;
fallEndY = _y + endY;
fallMoveUnits = mu;
}
function SetForTerminationFallAndExplode(endY, mu) {
falling = true;
explodeAtBottom = true;
fallEndY = _y + endY;
fallMoveUnits = mu;
}
function startFalling(endY, mu, r, c) {
falling = true;
fallEndY = _y + endY;
fallMoveUnits = mu;
animating = true;
}
function setDisappear() {
disappear = true;
animating = true;
}
function setAppear() {
appear = true;
animating = true;
}
function Run() {
if (fadeIcon) {
icons_mc._alpha = icons_mc._alpha - 5;
if (icons_mc._alpha <= 0) {
fadeIcon = false;
}
}
if (timedOpen) {
toFrameCount++;
if (specialType == ISPECIAL_PIT) {
switch (toStatus) {
case TOCLOSED :
if (toFrameCount > toFramesClosed) {
toStatus = TOOPENING;
toFrameCount = 0;
}
break;
case TOOPENING :
icons_mc.icon.play();
toStatus = TOOPEN;
break;
case TOOPEN :
if (toFrameCount > toFramesOpen) {
toStatus = TOCLOSING;
toFrameCount = 0;
}
break;
case TOCLOSING :
icons_mc.icon.play();
toStatus = TOCLOSED;
}
} else if (specialType == ISPECIAL_CRUSHER) {
switch (toStatus) {
case TOCLOSED :
if (toFrameCount > toFramesClosed) {
toStatus = TOOPENING;
toFrameCount = 0;
}
break;
case TOOPENING :
trace("opening crusher");
icons_mc.icon.crusher.gotoAndPlay("playing");
toStatus = TOOPEN;
break;
case TOOPEN :
if (toFrameCount > toFramesOpen) {
toStatus = TOCLOSING;
toFrameCount = 0;
}
break;
case TOCLOSING :
icons_mc.icon.crusher.gotoAndStop("stopped");
toStatus = TOCLOSED;
}
} else {
switch (toStatus) {
case TOCLOSED :
if (toFrameCount > toFramesClosed) {
toStatus = TOOPENING;
toFrameCount = 0;
icons_mc._xscale = 0;
icons_mc._yscale = 0;
icons_mc._visible = true;
} else {
icons_mc._xscale = 0;
icons_mc._yscale = 0;
icons_mc._visible = false;
}
break;
case TOOPENING :
icons_mc._xscale = icons_mc._xscale + (100 / toFramesAnimate);
icons_mc._yscale = icons_mc._yscale + (100 / toFramesAnimate);
if (toFrameCount >= toFramesAnimate) {
toStatus = TOOPEN;
toFrameCount = 0;
}
break;
case TOOPEN :
if (toFrameCount > toFramesOpen) {
toStatus = TOCLOSING;
toFrameCount = 0;
}
break;
case TOCLOSING :
icons_mc._xscale = 100 - ((100 / toFramesAnimate) * toFrameCount);
icons_mc._yscale = 100 - ((100 / toFramesAnimate) * toFrameCount);
if (toFrameCount <= toFramesAnimate) {
break;
}
toStatus = TOCLOSED;
icons_mc._xscale = 0;
icons_mc._yscale = 0;
icons_mc._visible = false;
toFrameCount = 0;
}
}
}
if (falling) {
if (_y >= fallEndY) {
if (terminate) {
Terminate();
} else if (explodeAtBottom) {
falling = false;
ExplodeAtBottom();
} else {
_y = fallEndY;
falling = false;
if (!timedOpen) {
animating = false;
}
}
} else {
_y = _y + fallMoveUnits;
}
}
if (disappear) {
if (dcount < dscale.length) {
_xscale = dscale[dcount];
_yscale = dscale[dcount];
_rotation = _rotation + 30;
dcount++;
} else {
disappear = false;
if (!timedOpen) {
animating = false;
}
Terminate();
}
}
if (appear) {
if (acount < ascale.length) {
_xscale = ascale[acount];
_yscale = ascale[acount];
_rotation = _rotation + 30;
acount++;
} else {
appear = false;
if (!timedOpen) {
animating = false;
}
_rotation = 0;
}
}
if (exploding) {
part.Run();
if (!part.active) {
if (!timedOpen) {
animating = false;
}
Terminate();
}
}
}
function Terminate() {
parent.removeEventListener("Run", this);
removeMovieClip();
}
function setRemove() {
remove = true;
}
function getRemove() {
return(remove);
}
function ExplodeAfterComplete() {
part = attachMovie("FParticleExplosion", "part" + EXPLODE_DEPTH, EXPLODE_DEPTH);
part.setParent(this);
part.setLocation(0, 0);
part.setMaxParticles(8);
part.setVelocity(500);
part.setGravity(400);
part.setAngle(180);
part.setLife(100);
part.setDisbursment(360);
part.setFade(false);
part.setImage("particle");
part.setScale(250);
part.setRotation(15);
part.setStartColor(TrackColorArray[TrackColorIndex]);
part.setEndColor(TrackColorArray[TrackColorIndex]);
part.start();
soundClip.playExplode();
exploding = true;
animating = true;
track_mc._visible = false;
icons_mc._visible = false;
}
function ExplodeAtBottom() {
part = attachMovie("FParticleExplosion", "part" + EXPLODE_DEPTH, EXPLODE_DEPTH);
part.setParent(this);
part.setLocation(0, 0);
part.setMaxParticles(10);
part.setVelocity(500);
part.setGravity(800);
part.setAngle(180);
part.setLife(200);
part.setDisbursment(180);
part.setFade(true);
part.setImage("particle");
part.setScale(250);
part.setRotation(0);
part.setStartColor(TrackColorArray[TrackColorIndex]);
part.setEndColor(TrackColorArray[TrackColorIndex]);
part.start();
exploding = true;
animating = true;
track_mc._visible = false;
icons_mc._visible = false;
}
static var STRAIGHT = 1;
static var CURVE = 2;
static var BLOCK = 3;
static var ISTRAIGHT = 1;
static var ICURVE = 2;
static var ISTRAIGHTNONE = 1;
static var ISTRAIGHTACCELL1 = 2;
static var ISTRAIGHTACCELL2 = 3;
static var ISTRAIGHTOIL = 4;
static var ISTRAIGHTLAVA = 5;
static var ISTRAIGHTTIMEADD = 6;
static var ISTRAIGHTTIMESUB = 7;
static var ISTRAIGHTCRUSHER = 8;
static var ISTRAIGHTSPEEDBOOST = 9;
static var ISTRAIGHTWARP = 10;
static var ISTRAIGHTTORNADO = 11;
static var ISTRAIGHTTRACKLOCK = 12;
static var ISTRAIGHTPIT_OFFSET = 12;
static var ISTRAIGHTPIT_1 = 13;
static var ISTRAIGHTPIT_2 = 14;
static var ISTRAIGHTPIT_3 = 15;
static var ISTRAIGHTPIT_4 = 16;
static var ISTRAIGHTPIT_5 = 17;
static var ISTRAIGHTPIT_6 = 18;
static var ISTRAIGHTICE = 19;
static var ISTRAIGHTPLASMA = 20;
static var ISTRAIGHTSHIELD = 21;
static var ICURVENONE = 1;
static var ICURVEACCELL1 = 2;
static var ICURVEACCELL2 = 3;
static var ICURVEOIL = 4;
static var ICURVESTATIC = 5;
static var ICURVEWARP = 6;
static var ICURVETORNADO = 7;
static var ICURVESHIELD = 8;
static var ISPECIAL_ACCEL = 1010;
static var ISPECIAL_ACCEL_MOD = 1015;
static var ISPECIAL_OIL = 1020;
static var ISPECIAL_LAVA = 1030;
static var ISPECIAL_TIMEADD = 1040;
static var ISPECIAL_TIMESUB = 1050;
static var ISPECIAL_CRUSHER = 1060;
static var ISPECIAL_SPEEDBOOST = 1070;
static var ISPECIAL_WARP = 1080;
static var ISPECIAL_TORNADO = 1090;
static var ISPECIAL_TRACKLOCK = 1100;
static var ISPECIAL_PIT = 1110;
static var ISPECIAL_ICE = 1120;
static var ISPECIAL_PLASMA = 1130;
static var ISPECIAL_SHIELD = 1140;
static var LIMIT1 = 5;
static var LIMIT2 = 25;
static var LIMIT3 = 65;
static var LIMIT4 = 95;
var specialvalue = 0;
var specialType = 0;
var oright = false;
var oleft = false;
var oup = false;
var odown = false;
var connected = false;
var falling = false;
var terminate = false;
var timedOpen = false;
var dscale = new Array();
var ascale = new Array();
var acount = 0;
var dcount = 0;
var appear = false;
var disappear = false;
var exploding = false;
var explodeAtBottom = false;
var part = null;
static var EXPLODE_DEPTH = 1000;
var specialProb = new Array();
var special = false;
var remove = false;
var fadeIcon = false;
var t_accell1 = new Array();
var t_accell2 = new Array();
var t_speedboost = new Array();
var t_plasma = new Array();
var t_addtime10 = new Array();
var t_tracklock = new Array();
var t_subtime5 = new Array();
var t_ice = new Array();
var t_lava = new Array();
var t_pit = new Array();
var t_tornado = new Array();
var t_crusher = new Array();
var t_oil = new Array();
var t_warp = new Array();
var t_shield = new Array();
var toFramesClosed = 45;
var toFramesOpen = 200;
var toFramesAnimate = 5;
var toFrameCount = 0;
var toStatus = 0;
static var TOOPEN = 1;
static var TOCLOSED = 2;
static var TOOPENING = 3;
static var TOCLOSING = 4;
var trackLevel = 0;
static var MAXTRACKCOLORS = 6;
var animating = false;
static var TRACKCOLORGENERIC = 0;
static var TRACKCOLORLEVEL1 = 1;
static var TRACKCOLORLEVEL2 = 2;
static var TRACKCOLORLEVEL3 = 3;
static var TRACKCOLORLEVEL4 = 4;
static var TRACKCOLORLEVEL5 = 5;
static var TRACKCOLORLEVEL6 = 6;
static var TRACKCOLORLAVA = 7;
static var TRACKCOLORTRACKLOCK = 8;
static var TRACKCOLORCRUSHER = 8;
static var TRACKCOLORSPEEDBOOST = 8;
static var TRACKCOLORICE = 9;
}
Symbol 807 MovieClip [__Packages.Board] Frame 0
class Board extends ComponentBase
{
var mainTL, dispatchEvent, titleClip, endClip, popUpClip, addEventListener, songClip, tracks, track1, track2, track3, track4, track5, track6, cars, tcPath, tcCar, tcFirst, tcMoves, tcPoints, tcBMoves, tcBMax, tcMax, tcLast, rtCount, dtCount, deleteTrack, backGroundClip, tunnelBack, soundClip;
function Board (TL) {
super();
mainTL = TL;
}
function setGameMode(mod) {
gameMode = mod;
}
function getGameMode() {
return(gameMode);
}
function Run() {
if (!getPauseGame()) {
switch (gameMode) {
case MODE_SHOW_TITLE_SCREEN :
fMODE_SHOW_TITLE_SCREEN();
break;
case MODE_INIT_GAME :
fMODE_INIT_GAME();
setGameMode(MODE_SHOW_LEVELPOP);
break;
case MODE_SHOW_LEVELPOP :
fMODE_SHOW_LEVELPOP();
setGameMode(MODE_WAIT_FOR_START_BUTTON);
break;
case MODE_WAIT_FOR_START_BUTTON :
break;
case MODE_INIT_LEVEL :
fMODE_INIT_LEVEL();
setGameMode(MODE_BUILD_TRACKS);
break;
case MODE_BUILD_TRACKS :
fMODE_BUILD_TRACKS();
fMODE_TEST_CONNECTIONS();
scoreBoard1.TimeReset();
scoreBoard1.setCarsToFinish(0);
setGameMode(MODE_USER_PLAY);
break;
case MODE_USER_PLAY :
if (scoreBoard1.getTimeStarted()) {
scoreBoard1.TimeCalculate();
} else if (scoreBoard1.getTimeUp()) {
gameModeComplete = false;
iRow = maxRows;
setGameMode(MODE_END_GAME);
} else {
scoreBoard1.TimeStart();
}
break;
case MODE_TEST_CONNECTIONS :
fMODE_TEST_CONNECTIONS();
scoreBoard1.TimeCalculate();
if (fMODE_TEST_TRACKS()) {
gameModeComplete = false;
setGameMode(MODE_MOVE_CAR);
} else {
setGameMode(MODE_USER_PLAY);
}
break;
case MODE_MOVE_CAR :
scoreBoard1.TimeCalculate();
fMODE_MOVE_CAR();
setGameMode(MODE_TRAVERSE_BOARD);
break;
case MODE_TRAVERSE_BOARD :
scoreBoard1.TimeCalculate();
if (scoreBoard1.getTimeUp()) {
gameModeComplete = false;
iRow = maxRows;
setGameMode(MODE_END_GAME);
} else if (!gameModeComplete) {
fMODE_TRAVERSE_BOARD();
} else {
gameModeComplete = false;
setGameMode(MODE_REMOVE_TRACKS);
}
break;
case MODE_REMOVE_TRACKS :
scoreBoard1.TimeCalculate();
if (!gameModeComplete) {
fMODE_REMOVE_TRACKS();
} else {
gameModeComplete = false;
setGameMode(MODE_CHECK_LEVEL);
}
break;
case MODE_CHECK_LEVEL :
scoreBoard1.TimeCalculate();
if (fMODE_CHECK_LEVEL()) {
scoreBoard1.setTimeStarted(false);
gameModeComplete = false;
iRow = maxRows;
setGameMode(MODE_END_LEVEL);
} else {
setGameMode(MODE_RETRACK);
}
break;
case MODE_RETRACK :
scoreBoard1.TimeCalculate();
fMODE_RETRACK();
fMODE_REPLACE_CAR();
setWaitMode(15, MODE_TEST_CONNECTIONS);
break;
case MODE_REPLACE_CAR :
fMODE_REPLACE_CAR();
setGameMode(MODE_REMOVE_BAD_TRACK);
break;
case MODE_REMOVE_BAD_TRACK :
fMODE_REMOVE_BAD_TRACK();
setGameMode(MODE_RETRACK);
break;
case MODE_END_LEVEL :
if (!gameModeComplete) {
fMODE_END_LEVEL();
setWaitMode(5, MODE_END_LEVEL);
} else {
setGameMode(MODE_SHOW_STATS);
}
break;
case MODE_SHOW_STATS :
fMODE_SHOW_STATS();
setGameMode(MODE_HIDE_STATS);
break;
case MODE_HIDE_STATS :
setGameMode(MODE_SHOW_LEVELPOP);
break;
case MODE_END_GAME :
if (!gameModeComplete) {
fMODE_END_GAME();
setWaitMode(2, MODE_END_GAME);
} else {
gameModeComplete = false;
setGameMode(MODE_END_STATS);
}
break;
case MODE_END_STATS :
fMODE_END_STATS();
break;
case MODE_END_HIGH_SCORE :
break;
case MODE_RESTART_GAME :
break;
case MODE_WAIT :
fMODE_WAIT();
break;
case MODE_SPIN_WAIT :
fMODE_WAIT();
scoreBoard1.TimeCalculate();
break;
case MODE_WAIT_FOR_CALLBACK :
break;
case MODE_TRACKMOD :
fMODE_TRACKMOD();
setGameMode(MODE_REMOVE_BAD_TRACK);
}
dispatchEvent({type:"Run"});
}
}
function EventTitleStartButtonPressed() {
titleClip.setDisappear();
setGameMode(MODE_INIT_GAME);
}
function EventEndRestartButtonPressed() {
endClip.setDisappear();
setGameMode(MODE_SHOW_TITLE_SCREEN);
}
function EventLevelStartButtonPressed() {
popUpClip.setDisappear();
setWaitMode(8, MODE_INIT_LEVEL);
}
function EventTrackModsButtonPressed() {
if ((getGameMode() == MODE_USER_PLAY) && (!getPauseGame())) {
scoreBoard1.subTrackMods(1);
setGameMode(MODE_TRACKMOD);
}
}
function EventHelpButtonPressed() {
trace("EventHelpButtonPressed");
setPauseGame(true);
}
function EventCloseHelpButtonPressed() {
trace("EventCloseHelpButtonPressed");
setPauseGame(false);
}
function setPauseGame(bit) {
pauseGame = bit;
if (pauseGame) {
scoreBoard1.pauseTime();
} else {
scoreBoard1.unPauseTime();
}
}
function getPauseGame() {
return(pauseGame);
}
function fMODE_SHOW_TITLE_SCREEN() {
titleClip = mainTL.attachMovie("FTitleScreen", "title" + titleDepth, titleDepth);
titleClip.setLocation(0, 0);
titleClip.setParent(this);
titleClip.setExtremeRight(463);
titleClip.setExtremeLeft(-466);
titleClip.setAppear();
addEventListener("Run", titleClip);
setGameMode(MODE_WAIT_FOR_START_BUTTON);
trace("songClip:" + songClip);
songClip.playSong("titlesong");
}
function fMODE_END_STATS() {
endClip = mainTL.attachMovie("FEndScreen", "end" + endDepth, endDepth);
endClip.setLocation(0, 0);
endClip.setParent(this);
endClip.setExtremeRight(463);
endClip.setExtremeLeft(-466);
endClip.setAppear();
endClip.setValues(scoreBoard1.getScore(), scoreBoard1.getLevel(), scoreBoard1.getRacesComplete(), scoreBoard1.getTracksUsed(), scoreBoard1.getLongest());
addEventListener("Run", endClip);
setGameMode(MODE_WAIT_FOR_RESTART_BUTTON);
songClip.playSong("titlesong");
}
function fMODE_INIT_GAME() {
tracks = new Array();
track1 = new Array();
track2 = new Array();
track3 = new Array();
track4 = new Array();
track5 = new Array();
track6 = new Array();
cars = new Array();
tcBetweenPoints = false;
tcPath = null;
tcCar = null;
tcFirst = false;
tcMoves = 0;
tcPoints = 0;
tcBMoves = 0;
tcBMax = 0;
tcMax = 0;
tcLast = false;
rtCount = 0;
dtCount = 0;
deleteTrack = false;
iRow = 0;
iCol = 0;
waitFrames = 0;
waitElapsed = 0;
waitLastMode = 0;
tcIndex = TCNORMAL;
tracks = [0, track1, track2, track3, track4, track5, track6];
backGroundClip = mainTL.attachMovie("FBackground", "background1", backGroundDepth);
backGroundClip.setLocation(0, 0);
backGroundClip.resetColor();
tunnelBack = mainTL.attachMovie("FTunnelBack", "tunnelback1", tunnelBackDepth);
tunnelBack._x = 455;
tunnelBack._y = 9;
scoreBoard1 = mainTL.attachMovie("FScoreBoard", "scoreboard", scoreBoard1Depth);
scoreBoard1.setLocation(0, 300);
scoreBoard1.setLevel(0);
scoreBoard1.setSoundClip(soundClip);
scoreBoard1.setParent(this);
spinCar = false;
pauseGame = false;
gameModeComplete = true;
}
function fMODE_SHOW_LEVELPOP() {
popUpClip = mainTL.attachMovie("FLevelPopUp", "popup" + popUpDepth, popUpDepth);
popUpClip.setLocation(0, 0);
popUpClip.setParent(this);
popUpClip.setExtremeRight(463);
popUpClip.setExtremeLeft(-466);
popUpClip.setLevel(scoreBoard1.getLevel());
popUpClip.setAppear();
addEventListener("Run", popUpClip);
}
function fMODE_INIT_LEVEL() {
scoreBoard1.addTrackMods(1);
scoreBoard1.setLevel(scoreBoard1.getLevel() + 1);
}
function fMODE_BUILD_TRACKS() {
var _local2;
var _local4 = 0;
var _local3 = maxRows;
while (_local3 > 0) {
var _local5 = 1;
while (_local5 <= maxCols) {
_local4 = getNextPieceDepth();
_local2 = mainTL.attachMovie("TrackPiece", "track" + _local4, _local4);
_local2.createTrack(scoreBoard1.getEffectiveLevel(), scoreBoard1.getLevel());
_local2._x = startX + (TRACKSPACING * (_local5 - 1));
_local2._y = 0;
_local2.startFalling(startY + (TRACKSPACING * _local3), 25, _local3, _local5);
_local2.setParent(this);
_local2.setSoundClip(soundClip);
tracks[_local3][_local5] = _local2;
addEventListener("Run", _local2);
_local5++;
}
_local3--;
}
cars = new Array();
var _local5 = 1;
while (_local5 <= maxCars) {
cars.push(createCar(_local5));
_local5++;
}
backGroundClip.setColor(scoreBoard1.getLevel());
backGroundClip.resetSlots();
songClip.playSong("song" + scoreBoard1.getEffectiveLevel());
}
function createCar(slot) {
var _local2;
var _local3 = getNextCarDepth();
_local2 = mainTL.attachMovie("FCar", "car" + _local3, _local3);
_local2.setLocation(carStartX, carStartY + (TRACKSPACING * (slot - 1)));
_local2.setSlotLocation(carStartX, carStartY + (TRACKSPACING * (slot - 1)));
_local2.setParent(this);
_local2.setRaceComplete(false);
_local2.setSlot(slot);
addEventListener("Run", _local2);
return(_local2);
}
function fMODE_TEST_CONNECTIONS() {
var _local4 = false;
var _local5 = 0;
while (_local5 < 2) {
var _local3 = 1;
while (_local3 <= maxRows) {
var _local2 = 1;
while (_local2 <= maxCols) {
_local4 = false;
if (tracks[_local3][_local2].oleft) {
if (_local2 == 1) {
_local4 = true;
} else if (tracks[_local3][_local2 - 1].oright) {
_local4 = true;
} else if (tracks[_local3][_local2 - 2].jump) {
_local4 = true;
}
}
if (tracks[_local3][_local2].oright && (_local2 != maxCols)) {
if (tracks[_local3][_local2 + 1].oleft) {
_local4 = true;
} else if (tracks[_local3][_local2 + 2].jump) {
_local4 = true;
}
}
if (tracks[_local3][_local2].oup && (_local3 != 1)) {
if (tracks[_local3 - 1][_local2].odown) {
_local4 = true;
}
}
if (tracks[_local3][_local2].odown && (_local3 != maxRows)) {
if (tracks[_local3 + 1][_local2].oup) {
_local4 = true;
}
}
tracks[_local3][_local2].setConnected(_local4);
_local2++;
}
_local3++;
}
_local5++;
}
}
function fMODE_TEST_TRACKS() {
var _local4 = 0;
var _local3 = new CarPath();
var _local2 = 1;
while ((!_local3.getFinished()) && (_local2 <= maxRows)) {
if (tracks[_local2][1].connected) {
_local3 = findPath(_local2, 1);
}
_local2++;
}
if (_local3.getFinished()) {
tcPath = _local3;
return(true);
}
return(false);
}
function findPath(startRow, startCol) {
var _local4 = new CarPath();
var _local6 = false;
var _local5 = false;
var _local2 = startCol;
var _local3 = startRow;
var _local9 = true;
_local4.addPoint(startRow, startCol);
if (tracks[_local3][_local2].oleft) {
while ((!_local6) && (!_local5)) {
if ((_local2 == maxCols) && (tracks[_local3][_local2].oright)) {
_local5 = true;
} else if ((((_local2 != maxCols) && (tracks[_local3][_local2].oright)) && (tracks[_local3][_local2 + 1].oleft)) && (!_local4.isLastPath(_local3, _local2 + 1))) {
_local4.addPoint(_local3, _local2 + 1);
_local2 = _local2 + 1;
} else if ((((_local2 != 1) && (tracks[_local3][_local2].oleft)) && (tracks[_local3][_local2 - 1].oright)) && (!_local4.isLastPath(_local3, _local2 - 1))) {
_local4.addPoint(_local3, _local2 - 1);
_local2 = _local2 - 1;
} else if ((((_local3 != 1) && (tracks[_local3][_local2].oup)) && (tracks[_local3 - 1][_local2].odown)) && (!_local4.isLastPath(_local3 - 1, _local2))) {
_local4.addPoint(_local3 - 1, _local2);
_local3 = _local3 - 1;
} else if ((((_local3 != maxRows) && (tracks[_local3][_local2].odown)) && (tracks[_local3 + 1][_local2].oup)) && (!_local4.isLastPath(_local3 + 1, _local2))) {
_local4.addPoint(_local3 + 1, _local2);
_local3 = _local3 + 1;
} else {
_local6 = true;
}
}
} else {
_local6 = true;
_local5 = false;
}
if (_local5) {
_local4.setFinished(true);
} else {
_local4.setFinished(false);
}
return(_local4);
}
function fMODE_MOVE_CAR() {
tcFirst = true;
tcPoints = tcPath.getPathLength();
tcCar = cars[tcPath.getPointRow(0) - 1];
tcMoves = 0;
rtCount = 0;
dtCount = 0;
soundClip.playEngine();
tcCar.startBodyMoving();
}
function fMODE_TRAVERSE_BOARD() {
var _local4 = null;
var _local2 = null;
var _local5 = null;
var _local3 = null;
var _local8 = 0;
if ((tcMoves < tcPoints) || (tcLast)) {
tcCar.ResetCar();
if (!tcBetweenPoints) {
tcBetweenPoints = true;
if (tcFirst) {
tcCar.incrementRaces();
tcCar.setFacing(Car.FRIGHT, tcIndex);
tcIndex = TCNORMAL;
_local5 = tcPath.getPathSection(0);
tcMax = tcPath.getPathLength();
tcLast = false;
_local3 = tracks[_local5.getRowValue()][_local5.getColValue()];
tcBMax = Math.floor((_local3.getX() - tcCar.getX()) / tcIncArray[tcIndex]);
} else if (tcLast) {
tcCar.setFacing(Car.FRIGHT, tcIndex);
_local4 = tcPath.getPathSection(tcMoves - 1);
_local2 = tracks[_local4.getRowValue()][_local4.getColValue()];
tcBMoves = 0;
scoreTrack(_local2, tcMoves, tcCar);
tcBMax = Math.floor((tcEndPoint - tcCar.getX()) / tcIncArray[tcIndex]);
} else {
_local4 = tcPath.getPathSection(tcMoves);
_local2 = tracks[_local4.getRowValue()][_local4.getColValue()];
_local5 = tcPath.getPathSection(tcMoves + 1);
_local3 = tracks[_local5.getRowValue()][_local5.getColValue()];
scoreTrack(_local2, tcMoves, tcCar);
if (_local3.getX() > _local2.getX()) {
if (tcCar.getFacing() != Car.FRIGHT) {
soundClip.playSkid(1);
}
tcCar.setFacing(Car.FRIGHT, tcIndex);
tcBMax = Math.floor((_local3.getX() - _local2.getX()) / tcIncArray[tcIndex]);
} else if (_local3.getX() < _local2.getX()) {
if (tcCar.getFacing() != Car.FLEFT) {
soundClip.playSkid(1);
}
tcCar.setFacing(Car.FLEFT, tcIndex);
tcBMax = Math.floor((_local2.getX() - _local3.getX()) / tcIncArray[tcIndex]);
} else if (_local3.getY() > _local2.getY()) {
if (tcCar.getFacing() != Car.FDOWN) {
soundClip.playSkid(1);
}
tcCar.setFacing(Car.FDOWN, tcIndex);
tcBMax = Math.floor((_local3.getY() - _local2.getY()) / tcIncArray[tcIndex]);
} else if (_local3.getY() < _local2.getY()) {
if (tcCar.getFacing() != Car.FUP) {
soundClip.playSkid(1);
}
tcCar.setFacing(Car.FUP, tcIndex);
var _local6 = _local2.getY();
var _local7 = _local3.getY();
tcBMax = Math.floor((_local6 - _local7) / tcIncArray[tcIndex]);
}
}
tcBMoves = 0;
}
tcBMoves++;
if (tcBMoves > tcBMax) {
if (tcFirst) {
tcFirst = false;
} else if (tcLast) {
tcLast = false;
} else {
tcMoves++;
}
if (tcMoves == (tcMax - 1)) {
tcMoves++;
tcLast = true;
}
tcBetweenPoints = false;
} else if (tcCar.getFacing() == Car.FRIGHT) {
tcCar.setLocation(tcCar.getX() + tcIncArray[tcIndex], tcCar.getY());
} else if (tcCar.getFacing() == Car.FLEFT) {
tcCar.setLocation(tcCar.getX() - tcIncArray[tcIndex], tcCar.getY());
} else if (tcCar.getFacing() == Car.FUP) {
tcCar.setLocation(tcCar.getX(), tcCar.getY() - tcIncArray[tcIndex]);
} else if (tcCar.getFacing() == Car.FDOWN) {
tcCar.setLocation(tcCar.getX(), tcCar.getY() + tcIncArray[tcIndex]);
}
} else {
endTraverse();
gameModeComplete = true;
}
}
function endTraverse() {
if (tcPoints > scoreBoard1.getLongest()) {
scoreBoard1.setLongest(tcPoints);
}
scoreBoard1.addTracksUsed(tcPoints);
scoreBoard1.incRacesComplete();
tcFirst = false;
tcMoves = 0;
tcPoints = 0;
tcBMoves = 0;
tcBMax = 0;
tcMax = 0;
tcLast = false;
soundClip.stopEngine();
tcBetweenPoints = false;
}
function fMODE_REMOVE_TRACKS() {
var _local4 = null;
if (dtCount < tcPath.getPathLength()) {
var _local5 = tcPath.getPathSection(dtCount);
var _local2 = _local5.getColValue();
var _local3 = _local5.getRowValue();
_local4 = tracks[_local3][_local2];
_local4.ExplodeAfterComplete();
tracks[_local3][_local2] = null;
dtCount++;
} else {
gameModeComplete = true;
tcCar.setRaceComplete(true);
backGroundClip.turnSlotOn(tcCar.getSlot());
}
}
function fMODE_REMOVE_BAD_TRACK() {
var _local4 = null;
var _local3 = maxRows;
while (_local3 > 0) {
var _local2 = 1;
while (_local2 <= maxCols) {
_local4 = tracks[_local3][_local2];
if (_local4.getRemove()) {
_local4.setDisappear();
tracks[_local3][_local2] = null;
}
_local2++;
}
_local3--;
}
}
function fMODE_RETRACK() {
var _local2 = null;
var _local8 = null;
var _local5 = 1;
while (_local5 <= maxCols) {
if (tracks[maxRows][_local5] != null) {
_local8 = tracks[maxRows][_local5];
_local8.setForTermination(TRACKSPACING, 10);
tracks[maxRows][_local5] = null;
}
_local5++;
}
var _local10 = maxRows;
while (_local10 > 0) {
_local5 = maxCols;
while (_local5 > 0) {
if (tracks[_local10][_local5] != null) {
_local8 = tracks[_local10][_local5];
var _local7 = null;
var _local4 = 0;
if (_local10 != maxRows) {
var _local3 = _local10 + 1;
while (_local3 <= maxRows) {
_local7 = tracks[_local3][_local5];
if (_local7 == null) {
_local4++;
}
_local3++;
}
if (_local4 > 0) {
tracks[_local10 + _local4][_local5] = _local8;
tracks[_local10][_local5] = null;
_local8.startFalling(TRACKSPACING * _local4, 25, _local10, _local5);
}
}
}
_local5--;
}
_local10--;
}
_local5 = 1;
while (_local5 <= maxCols) {
var _local9 = 0;
_local10 = 1;
while ((tracks[_local10][_local5] == null) && (_local9 < maxRows)) {
_local9++;
_local10++;
}
var _local6 = 1;
while (_local6 <= _local9) {
_local2 = mainTL.attachMovie("TrackPiece", "track" + pieceCount, getNextPieceDepth());
_local2.createTrack(scoreBoard1.getEffectiveLevel(), scoreBoard1.getLevel());
_local2._x = startX + (TRACKSPACING * (_local5 - 1));
_local2._y = startY - TRACKSPACING;
_local2.setParent(this);
_local2.setSoundClip(soundClip);
addEventListener("Run", _local2);
tracks[_local6][_local5] = _local2;
_local2.startFalling(TRACKSPACING * (_local6 + 1), 25, _local10, _local5);
_local6++;
}
_local5++;
}
}
function fMODE_REPLACE_CAR() {
tcCar.gotoSlotLocation();
tcPath = null;
tcCar = null;
tcIndex = TCNORMAL;
}
function fMODE_CHECK_LEVEL() {
var _local5 = true;
var _local3 = null;
var _local4 = 0;
var _local2 = 0;
while (_local2 < cars.length) {
_local3 = cars[_local2];
if (!_local3.getRaceComplete()) {
_local5 = false;
} else {
_local4++;
}
_local2++;
}
scoreBoard1.setCarsToFinish(_local4);
return(_local5);
}
function setSoundClip(clp) {
soundClip = clp;
}
function setSongClip(clp) {
songClip = clp;
}
function fMODE_END_LEVEL() {
var _local4 = null;
soundClip.playCheer();
soundClip.stopClockTick();
if (iRow == 0) {
gameModeComplete = true;
var _local3 = 0;
while (_local3 < cars.length) {
var _local5 = cars[_local3];
_local5.Fade();
_local3++;
}
_local3 = 0;
while (_local3 < cars.length) {
cars.shift();
_local3++;
}
} else {
var _local2 = 0;
while (_local2 <= maxCols) {
_local4 = tracks[iRow][_local2];
if (_local4 != null) {
var _local6 = TRACKSPACING * Math.abs(maxRows - iRow);
_local4.SetForTerminationFallAndExplode(_local6, 10);
}
_local2++;
}
iRow--;
}
}
function fMODE_SHOW_STATS() {
songClip.playSong("titlesong");
}
function fMODE_END_GAME() {
var _local4 = null;
soundClip.stopEngine();
if (iRow == 0) {
gameModeComplete = true;
} else {
var _local2 = 0;
while (_local2 <= maxCols) {
_local4 = tracks[iRow][_local2];
if (_local4 != null) {
_local4.setDisappear();
}
_local2++;
}
iRow--;
}
var _local3 = 0;
while (_local3 < cars.length) {
var _local5 = cars[_local3];
_local5.Zoom();
_local3++;
}
_local3 = 0;
while (_local3 < cars.length) {
cars.shift();
_local3++;
}
}
function fMODE_WAIT() {
waitElapsed++;
if (waitElapsed >= waitFrames) {
waitElapsed = 0;
waitFrames = 0;
gameMode = waitLastMode;
}
}
function fMODE_TRACKMOD() {
var _local6 = new Array();
var _local2;
var _local4;
var _local3;
var _local5 = 0;
while (_local5 < 6) {
_local2 = null;
while ((_local2 == null) || (_local2.setRemove())) {
_local4 = Math.floor(Math.random() * maxRows) + 1;
_local3 = Math.floor(Math.random() * maxCols) + 1;
_local2 = tracks[_local4][_local3];
}
trace("tracktoremove:" + _local2);
_local2.setRemove();
_local5++;
}
soundClip.playWarp();
soundClip.playGoodBonus();
}
function ReplaceCarBySlotNumber(evnt) {
tcCar.ResetCar();
tcCar.gotoSlotLocation(evnt.slot);
endTraverse();
soundClip.stopEngine();
gameMode = MODE_REMOVE_BAD_TRACK;
}
function setWaitMode(wframes, lastmode) {
gameMode = MODE_WAIT;
waitLastMode = lastmode;
waitFrames = wframes;
waitElapsed = 0;
}
function setSpinWaitMode(wframes, lastmode) {
gameMode = MODE_SPIN_WAIT;
waitLastMode = lastmode;
waitFrames = wframes;
waitElapsed = 0;
}
function getNextPieceDepth() {
pieceCount++;
if ((pieceCount + pgetDepthBase()) > pgetDepthMax()) {
pieceCount = pgetDepthBase();
}
return(pieceCount + pgetDepthBase());
}
function getNextCarDepth() {
carCount++;
if ((carCount + cgetDepthBase()) > cgetDepthMax()) {
carCount = cgetDepthBase();
}
return(carCount + cgetDepthBase());
}
function trackClicked() {
setGameMode(MODE_TEST_CONNECTIONS);
soundClip.playClick();
}
function psetDepthBase(d) {
pdepthBase = d;
}
function pgetDepthBase() {
return(pdepthBase);
}
function psetDepthMax(d) {
pdepthMax = d;
}
function pgetDepthMax() {
return(pdepthMax);
}
function csetDepthBase(d) {
cdepthBase = d;
}
function cgetDepthBase() {
return(cdepthBase);
}
function csetDepthMax(d) {
cdepthMax = d;
}
function cgetDepthMax() {
return(cdepthMax);
}
function setStartX(x) {
startX = x;
}
function setStartY(y) {
startY = y;
}
function getStartY() {
return(startY);
}
function getStartX() {
return(startX);
}
function scoreTrack(trk, tcMoves, tcCar) {
var _local4 = 0;
var _local5 = false;
var _local8 = 1;
if (trk.special) {
switch (trk.specialType) {
case Track.ISPECIAL_ACCEL :
var _local9 = trk.specialvalue * scoreBoard1.getAccelBonusLevel();
scoreBoard1.incAccelBonusLevel();
createMessage(tcCar.getX(), tcCar.getY(), "Accelcharger Bonus!! ");
createFlyingScoreMod(trk._x, trk._y, trk.specialvalue * scoreBoard1.getAccelBonusLevel(), "", true, 30);
soundClip.playGoodBonus();
_local5 = true;
break;
case Track.ISPECIAL_ACCEL_MOD :
createFlyingTrackMod(trk._x, trk._y, trk.specialvalue);
soundClip.playGoodBonus();
_local5 = true;
break;
case Track.ISPECIAL_OIL :
if (!tcCar.getShield()) {
tcIndex = TCSLOW;
spinCar = true;
soundClip.playBadBonus();
tcCar.StartSpinning();
createMessage(tcCar.getX(), tcCar.getY(), "Oil Slick!");
soundClip.playSkid(5);
setSpinWaitMode(125, MODE_TRAVERSE_BOARD);
}
break;
case Track.ISPECIAL_TIMEADD :
scoreBoard1.TimeAddSeconds(trk.specialvalue);
soundClip.playGoodBonus();
createMessage(tcCar.getX(), tcCar.getY(), "Time + " + trk.specialvalue);
break;
case Track.ISPECIAL_TIMESUB :
if (!tcCar.getShield()) {
scoreBoard1.TimeSubSeconds(trk.specialvalue);
soundClip.playBadBonus();
createMessage(tcCar.getX(), tcCar.getY(), "Time - " + trk.specialvalue);
}
break;
case Track.ISPECIAL_LAVA :
if ((trk.toStatus == Track.TOOPEN) && (!tcCar.getShield())) {
soundClip.playBadBonus();
createMessage(tcCar.getX(), tcCar.getY(), "Lava Flow!");
tcCar.turnFireOn();
tcIndex = TCSLOW;
} else {
createMessage(tcCar.getX(), tcCar.getY(), "Survival bonus!! ");
createFlyingScoreMod(trk._x, trk._y, 100 * scoreBoard1.getLevel(), "", true, 25);
_local5 = true;
}
break;
case Track.ISPECIAL_CRUSHER :
if ((trk.toStatus == Track.TOOPEN) && (!tcCar.getShield())) {
createMessage(tcCar.getX(), tcCar.getY(), "The Crusher!");
soundClip.stopEngine();
soundClip.playBlast();
tcCar.Bladed();
trk.setRemove();
setGameMode(MODE_WAIT_FOR_CALLBACK);
} else {
createMessage(tcCar.getX(), tcCar.getY(), "Survival bonus!! ");
createFlyingScoreMod(trk._x, trk._y, 100 * scoreBoard1.getLevel(), "", true, 25);
_local5 = true;
}
break;
case Track.ISPECIAL_SPEEDBOOST :
soundClip.playGoodbonus();
tcIndex = TCFAST;
soundClip.playLaunch();
createMessage(tcCar.getX(), tcCar.getY(), "Speed Boost!");
break;
case Track.ISPECIAL_WARP :
if ((trk.toStatus == Track.TOOPEN) && (!tcCar.getShield())) {
createMessage(tcCar.getX(), tcCar.getY(), "Warp!");
soundClip.stopEngine();
soundClip.playWarp();
tcCar.Warped();
trk.setRemove();
setGameMode(MODE_WAIT_FOR_CALLBACK);
} else {
createMessage(tcCar.getX(), tcCar.getY(), "Survival bonus!! ");
createFlyingScoreMod(trk._x, trk._y, 100 * scoreBoard1.getLevel(), "", true, 25);
_local5 = true;
}
break;
case Track.ISPECIAL_TORNADO :
if ((trk.toStatus == Track.TOOPEN) && (!tcCar.getShield())) {
createMessage(tcCar.getX(), tcCar.getY(), "Dust Storm!");
tcCar.Tornadoed();
soundClip.stopEngine();
soundClip.playWind();
trk.setRemove();
setGameMode(MODE_WAIT_FOR_CALLBACK);
} else {
createMessage(tcCar.getX(), tcCar.getY(), "Survival bonus!! ");
createFlyingScoreMod(trk._x, trk._y, 100 * scoreBoard1.getLevel(), "", true, 25);
_local5 = true;
}
break;
case Track.ISPECIAL_TRACKLOCK :
createMessage(tcCar.getX(), tcCar.getY(), "Tracklock Bonus!! ");
createFlyingScoreMod(trk._x, trk._y, 200 * scoreBoard1.getLevel(), "", true, 25);
_local5 = true;
break;
case Track.ISPECIAL_PIT :
if ((trk.toStatus == Track.TOOPEN) && (!tcCar.getShield())) {
createMessage(tcCar.getX(), tcCar.getY(), "Track Pit!");
tcCar.Pitted();
soundClip.stopEngine();
soundClip.playFallDownPit();
trk.setRemove();
setGameMode(MODE_WAIT_FOR_CALLBACK);
} else {
createMessage(tcCar.getX(), tcCar.getY(), "Survival bonus!! ");
createFlyingScoreMod(trk._x, trk._y, 100 * scoreBoard1.getLevel(), "", true, 25);
_local5 = true;
}
break;
case Track.ISPECIAL_ICE :
if (!tcCar.getShield()) {
spinCar = true;
tcCar.StartSpinning();
soundClip.playBadBonus();
createMessage(tcCar.getX(), tcCar.getY(), "Ice Flow!");
soundClip.playSkid(5);
setSpinWaitMode(125, MODE_TRAVERSE_BOARD);
}
break;
case Track.ISPECIAL_PLASMA :
if (!tcCar.getShield()) {
tcIndex = TCSLOW;
soundClip.playBadBonus();
createMessage(tcCar.getX(), tcCar.getY(), "Plasma!");
}
break;
case Track.ISPECIAL_SHIELD :
tcCar.turnShieldOn();
soundClip.playGoodBonus();
createMessage(tcCar.getX(), tcCar.getY(), "Shield!");
}
trk.animateIcon();
} else {
_local5 = true;
}
if (_local5) {
if (tcCar.getRaceComplete()) {
_local4 = ((BASETRACKSCORE * (tcMoves + 1)) * scoreBoard1.getLevel()) + (BASETRACKSCORE * (scoreBoard1.getLevel() - 1));
_local4 = Math.ceil(_local4 / tcCar.getRaces());
} else {
_local4 = ((BASETRACKSCORE * (tcMoves + 1)) * scoreBoard1.getLevel()) + (BASETRACKSCORE * (scoreBoard1.getLevel() - 1));
}
var _local6 = 16777215 /* 0xFFFFFF */;
switch (tcIndex) {
case TCVERYSLOW :
_local4 = Math.ceil(_local4 / 4);
_local6 = 13369344 /* 0xCC0000 */;
break;
case TCSLOW :
_local4 = Math.ceil(_local4 / 2);
_local6 = 16711680 /* 0xFF0000 */;
break;
case TCNORMAL :
_local6 = 16777215 /* 0xFFFFFF */;
break;
case TCFAST :
_local4 = Math.ceil(_local4 * 2);
_local6 = 65280;
}
createScore(tcCar.getX(), tcCar.getY(), _local4, _local6);
}
}
function createScore(x, y, scr, clr) {
var _local2 = null;
scoreCount++;
if ((scoreCount + scoredepthBase) > scoredepthMax) {
scoreCount = 0;
}
_local2 = mainTL.attachMovie("FScore", "score" + scoreCount, scoreCount + scoredepthBase);
_local2.setFade(6);
_local2.setScale(1);
_local2.setScoreColor(clr);
_local2.setScore(scr);
_local2.setLocation(x, y);
_local2.startMoving();
_local2.setParent(this);
addEventListener("Run", _local2);
scoreBoard1.addScore(scr);
}
function createMessage(x, y, msg) {
var _local2 = null;
messageCount++;
if ((messageCount + messagedepthBase) > messagedepthMax) {
messageCount = 0;
}
_local2 = mainTL.attachMovie("FMessage", "message" + messageCount, messageCount + messagedepthBase);
_local2.setFade(2);
_local2.setScale(0.5);
_local2.setMessage(msg);
_local2.setLocation(x, y - 25);
_local2.startMoving();
_local2.setParent(this);
addEventListener("Run", _local2);
}
function createFlyingTrackMod(beginX, beginY, finalValue) {
var _local2 = null;
messageCount++;
if ((messageCount + messagedepthBase) > messagedepthMax) {
messageCount = 0;
}
trace("createFlyingTrackMod-finalValue:" + finalValue);
_local2 = mainTL.attachMovie("FFlyingtrackmod", "flyingtrackmod" + messageCount, messageCount + messagedepthBase);
_local2.setParent(this);
_local2.setLocation(beginX, beginY);
_local2.setFinalLocation(450, 300);
_local2.setDoSpin(true, 45);
_local2.startMoving(finalValue);
addEventListener("Run", _local2);
}
function EventAddTrackMod(o) {
var _local2 = 0;
_local2 = o.finalValue;
scoreBoard1.addTrackMods(_local2);
}
function createFlyingScoreMod(beginX, beginY, finalValue, msg, spin, deg) {
var _local2 = null;
messageCount++;
if ((messageCount + messagedepthBase) > messagedepthMax) {
messageCount = 0;
}
_local2 = mainTL.attachMovie("FFlyingscoremod", "flyingtrackmod" + messageCount, messageCount + messagedepthBase);
_local2.setParent(this);
_local2.setLocation(beginX, beginY);
_local2.setFinalLocation(140, 300);
_local2.setMessageText(msg);
_local2.setDoSpin(spin, deg);
_local2.startMoving(finalValue);
addEventListener("Run", _local2);
}
function EventAddScoreMod(o) {
var _local2 = 0;
_local2 = o.finalValue;
scoreBoard1.addBonus(_local2);
trace("EventScoreTrackMod-finalValue:" + _local2);
}
function createFlyingTime(beginX, beginY, finalValue, msg, spin, deg) {
var _local2 = null;
messageCount++;
if ((messageCount + messagedepthBase) > messagedepthMax) {
messageCount = 0;
}
_local2 = mainTL.attachMovie("FFlyingTime", "flyingtrackmod" + messageCount, messageCount + messagedepthBase);
_local2.setParent(this);
_local2.setLocation(beginX, beginY);
_local2.setFinalLocation(10, 300);
_local2.setMessageText(msg);
_local2.setDoSpin(spin, deg);
if (finalValue > 0) {
_local2.setRGBColor(65280);
} else {
_local2.setRGBColor(16711680);
}
_local2.startMoving(finalValue);
addEventListener("Run", _local2);
}
function EventFlyingTime(o) {
var _local2 = 0;
_local2 = o.finalValue;
scoreBoard1.TimeAddSeconds(_local2);
}
var startX = 0;
var startY = 0;
var carStartX = 40;
var carStartY = 27;
var pieceCount = 0;
var backGroundDepth = 5;
var pdepthBase = 500;
var pdepthMax = 15000;
var scoreCount = 0;
var scoredepthBase = 18000;
var scoredepthMax = 18100;
var messageCount = 0;
var messagedepthBase = 42200;
var messagedepthMax = 42300;
var carCount = 0;
var cdepthBase = 17000;
var cdepthMax = 17500;
static var maxRows = 6;
static var maxCols = 7;
static var maxCars = 6;
var tcBetweenPoints = false;
var tcIndex = 3;
var tcIncArray = new Array(0, 1, 2, 10, 25);
static var TCVERYSLOW = 1;
static var TCSLOW = 2;
static var TCNORMAL = 3;
static var TCFAST = 4;
var tcEndPoint = 500;
static var TRACKSPACING = 50;
static var BASETRACKSCORE = 5;
var titleDepth = 50000;
var endDepth = 50005;
var popUpDepth = 55000;
var gameMode = 0;
var gameModeComplete = false;
var iRow = 0;
var iCol = 0;
var waitFrames = 0;
var waitElapsed = 0;
var waitLastMode = 0;
var scoreBoard1Depth = 40000;
var scoreBoard1 = null;
var spinCar = false;
var tunnelBackDepth = 17800;
static var MODE_SHOW_TITLE_SCREEN = 5;
static var MODE_INIT_GAME = 10;
static var MODE_SHOW_LEVELPOP = 20;
static var MODE_WAIT_FOR_START_BUTTON = 25;
static var MODE_INIT_LEVEL = 30;
static var MODE_BUILD_TRACKS = 40;
static var MODE_USER_PLAY = 50;
static var MODE_TEST_CONNECTIONS = 60;
static var MODE_TEST_TRACKS = 70;
static var MODE_MOVE_CAR = 80;
static var MODE_TRAVERSE_BOARD = 90;
static var MODE_REMOVE_TRACKS = 100;
static var MODE_CHECK_LEVEL = 105;
static var MODE_RETRACK = 110;
static var MODE_END_LEVEL = 130;
static var MODE_SHOW_STATS = 140;
static var MODE_HIDE_STATS = 150;
static var MODE_END_GAME = 160;
static var MODE_END_STATS = 170;
static var MODE_END_HIGH_SCORE = 180;
static var MODE_RESTART_GAME = 190;
static var MODE_WAIT = 200;
static var MODE_REPLACE_CAR = 210;
static var MODE_REMOVE_BAD_TRACK = 220;
static var MODE_WAIT_FOR_CALLBACK = 230;
static var MODE_TRACKMOD = 240;
static var MODE_WAIT_FOR_RESTART_BUTTON = 250;
static var MODE_SPIN_WAIT = 260;
static var MAXTRACKCOLORS = 6;
var pauseGame = false;
}
Symbol 808 MovieClip [__Packages.CarPath] Frame 0
class CarPath
{
var points, finished;
function CarPath () {
points = new Array();
setFinished(false);
}
function addPoint(r, c) {
var _local2 = new PathSection(r, c);
points.push(_local2);
}
function getPathLength() {
return(points.length);
}
function getPointRow(idx) {
var _local2 = null;
_local2 = points[idx];
return(_local2.getRowValue());
}
function getPointCol(idx) {
var _local2 = null;
_local2 = points[idx];
return(_local2.getColValue());
}
function getPathSection(idx) {
var _local2 = null;
_local2 = points[idx];
return(_local2);
}
function setFinished(f) {
finished = f;
}
function getFinished() {
return(finished);
}
function printPath() {
var _local3 = null;
var _local5 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 <= (points.length - 1)) {
_local3 = points[_local2];
_local5 = _local3.getRowValue();
_local4 = _local3.getColValue();
trace((_local5 + ",") + _local4);
_local2++;
}
}
function isLastPath(row, col) {
var _local6 = false;
var _local5 = 0;
var _local4 = 0;
var _local3 = null;
var _local2 = 0;
_local2 = 0;
while (_local2 < points.length) {
_local3 = points[_local2];
_local5 = _local3.getRowValue();
_local4 = _local3.getColValue();
if (_local5 == row) {
if (_local4 == col) {
_local6 = true;
}
}
_local2++;
}
return(_local6);
}
}
Symbol 809 MovieClip [__Packages.PathSection] Frame 0
class PathSection
{
var fucker;
function PathSection (r, c) {
rowValue = r;
colValue = c;
fucker = r + c;
}
function getColValue() {
return(colValue);
}
function setColValue(c) {
colValue = c;
}
function getRowValue() {
return(rowValue);
}
function setRowValue(r) {
rowValue = r;
}
var rowValue = 0;
var colValue = 0;
}
Symbol 810 MovieClip [__Packages.Car] Frame 0
class Car extends ComponentBase
{
var cface, turning, finalTurnRotation, colorObj, greyTransform, origTransform, nextFace, lastFace, _rotation, parent, car_mc, _xscale, _yscale, _alpha, _x, _y, _visible, removeMovieClip, attachMovie, addEventListener, dispatchEvent, removeEventListener;
function Car () {
super();
cface = FRIGHT;
turning = false;
finalTurnRotation = 0;
raceComplete = false;
races = 0;
exploding = false;
bladed = false;
pitted = false;
tornadoed = false;
warped = false;
spinning = false;
shield = false;
part = null;
colorObj = new Color(this);
greyTransform = new Object();
greyTransform.ra = 100;
greyTransform.rb = -80;
greyTransform.ga = 100;
greyTransform.gb = -80;
greyTransform.ba = 100;
greyTransform.bb = -80;
origTransform = colorObj.getTransform();
nextFace = 0;
lastFace = 0;
turnedFrames = 0;
carTurning = false;
_rotation = FRIGHT;
zooming = false;
fading = false;
ResetCar();
}
function greyOut() {
colorObj.setTransform(greyTransform);
}
function colorOut() {
colorObj.setTransform(origTransform);
}
function setParent(par) {
parent = par;
}
function turnFireOn() {
car_mc.carbody.gotoAndStop(BODYFIRE);
}
function turnShieldOn() {
shield = true;
car_mc.carbody.gotoAndStop(BODYSHIELD);
}
function getShield() {
return(shield);
}
function getRaceComplete() {
return(raceComplete);
}
function setRaceComplete(comp) {
raceComplete = comp;
}
function setSlotLocation(x, y) {
slotX = x;
slotY = y;
}
function startBodyMoving() {
car_mc.carbody.gotoAndStop(BODYMOVING);
}
function startBodyStopped() {
car_mc.carbody.gotoAndStop(BODYSTOPPED);
}
function ResetCar() {
if (spinning) {
StopSpinning();
}
if (bladed) {
bladed = false;
car_mc.carbody._visible = true;
car_mc.carbody._alpha = 100;
}
if (pitted) {
pitted = false;
}
if (tornadoed) {
_rotation = FRIGHT;
_xscale = 100;
_yscale = 100;
tornadoed = false;
}
if (warped) {
_alpha = 100;
warped = false;
}
}
function StartSpinning() {
spinning = true;
}
function StopSpinning() {
spinning = false;
setFacing(cface);
}
function gotoSlotLocation() {
_x = slotX;
_y = slotY;
ResetCar();
setFacing(FRIGHT);
_xscale = 100;
_yscale = 100;
_visible = true;
startBodyStopped();
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setFacing(cf, speed) {
lastFace = cface;
cface = cf;
if (lastFace == cf) {
endTurn();
} else {
trace("speed:" + speed);
switch (speed) {
case Board.TCVERYSLOW :
MAXTURNFRAMES = MAXRETURNFRAMES_VERYSLOW;
break;
case Board.TCSLOW :
MAXTURNFRAMES = MAXRETURNFRAMES_SLOW;
break;
case Board.TCNORMAL :
MAXTURNFRAMES = MAXRETURNFRAMES_NORMAL;
break;
case Board.TCFAST :
MAXTURNFRAMES = MAXRETURNFRAMES_FAST;
break;
default :
MAXTURNFRAMES = MAXRETURNFRAMES_NORMAL;
}
nextFace = cf;
carTurning = true;
turnedFrames = 0;
trace("MaxReturnFrames:" + MAXTURNFRAMES);
}
}
function endTurn() {
cface = nextFace;
_rotation = cface;
}
function getFacing() {
return(cface);
}
function getBody() {
return(body);
}
function setSlot(slt) {
slot = slt;
car_mc.gotoAndStop(slot);
}
function getSlot() {
return(slot);
}
function getX() {
return(_x);
}
function getY() {
return(_y);
}
function incrementRaces() {
races++;
}
function getRaces() {
return(races);
}
function Terminate() {
parent.removeEventListener("Run", this);
removeMovieClip();
}
function Explode() {
part = attachMovie("FParticleExplosion", "part" + EXPLODE_DEPTH, EXPLODE_DEPTH);
part.setParent(this);
part.setLocation(0, 0);
part.setMaxParticles(20);
part.setVelocity(500);
part.setGravity(800);
part.setAngle(360);
part.setLife(200);
part.setDisbursment(360);
part.setFade(true);
part.setImage("particle");
part.setScale(200);
part.setRotation(0);
part.setStartColor(16711680);
part.setEndColor(16749609);
part.start();
exploding = true;
}
function Bladed() {
part = attachMovie("FParticleExplosion", "part" + EXPLODE_DEPTH, EXPLODE_DEPTH);
part.setParent(this);
part.setLocation(0, 0);
part.setMaxParticles(50);
part.setVelocity(300);
part.setGravity(2000);
part.setAngle(360);
part.setLife(300);
part.setDisbursment(360);
part.setFade(true);
part.setImage("particle_oblong");
part.setScale(300);
part.setRotation(15);
part.setStartColor(16711680);
part.setEndColor(16711680);
part.start();
bladed = true;
car_mc.carbody.gotoAndStop(BODYEXPLODE);
addEventListener("ReplaceCarBySlotNumber", parent);
}
function Pitted() {
pitted = true;
addEventListener("ReplaceCarBySlotNumber", parent);
}
function Tornadoed() {
tornadoed = true;
addEventListener("ReplaceCarBySlotNumber", parent);
}
function Warped() {
warped = true;
addEventListener("ReplaceCarBySlotNumber", parent);
}
function Zoom() {
zooming = true;
}
function Fade() {
fading = true;
}
function Run() {
if (carTurning) {
var _local4 = false;
var _local2 = 90 / MAXTURNFRAMES;
switch (lastFace) {
case FRIGHT :
if (nextFace == FUP) {
_rotation = _rotation - _local2;
} else {
_rotation = _rotation + _local2;
}
break;
case FDOWN :
if (nextFace == FRIGHT) {
_rotation = _rotation - _local2;
} else {
_rotation = _rotation + _local2;
}
break;
case FLEFT :
if (nextFace == FUP) {
_rotation = _rotation + _local2;
} else {
_rotation = _rotation - _local2;
}
break;
case FUP :
if (nextFace == FRIGHT) {
_rotation = _rotation + _local2;
} else {
_rotation = _rotation - _local2;
}
}
turnedFrames++;
if (turnedFrames >= MAXTURNFRAMES) {
carTurning = false;
endTurn();
}
}
if (exploding) {
part.Run();
car_mc.carbody._alpha = car_mc.carbody._alpha - 25;
if (!part.active) {
Terminate();
}
}
if (bladed) {
part.Run();
car_mc.carbody._alpha = car_mc.carbody._alpha - 10;
if (!part.active) {
dispatchEvent({type:"ReplaceCarBySlotNumber", slot:slot});
removeEventListener("ReplaceCarBySlotNumber", parent);
}
}
if (pitted) {
_xscale = _xscale - 5;
_yscale = _yscale - 5;
_rotation = _rotation + 36;
if (_xscale <= 0) {
dispatchEvent({type:"ReplaceCarBySlotNumber", slot:slot});
removeEventListener("ReplaceCarBySlotNumber", parent);
}
}
if (spinning) {
_rotation = _rotation + 36;
}
if (tornadoed) {
_rotation = _rotation + 36;
_xscale = _xscale + 5;
_yscale = _yscale + 5;
if (_xscale >= 250) {
dispatchEvent({type:"ReplaceCarBySlotNumber", slot:slot});
removeEventListener("ReplaceCarBySlotNumber", parent);
}
}
if (warped) {
_alpha = _alpha - 3;
if (_alpha <= 0) {
dispatchEvent({type:"ReplaceCarBySlotNumber", slot:slot});
removeEventListener("ReplaceCarBySlotNumber", parent);
}
}
if (fading) {
_alpha = _alpha - 10;
if (_alpha <= 0) {
Terminate();
}
}
if (zooming) {
_x = _x + 5;
_xscale = _xscale - 5;
_yscale = _yscale - 5;
_rotation = _rotation + 45;
if (_xscale <= 0) {
Terminate();
}
}
}
var body = 0;
var slot = 0;
var turnIncrement = 30;
var raceComplete = false;
var races = 0;
var exploding = false;
var bladed = false;
var pitted = false;
var tornadoed = false;
var warped = false;
var spinning = false;
var shield = false;
var zooming = false;
var fading = false;
var part = null;
var originalFacing = 0;
static var EXPLODE_DEPTH = 1000;
static var FRIGHT = 0;
static var FDOWN = 90;
static var FLEFT = 180;
static var FUP = 270;
static var MAXRETURNFRAMES_VERYSLOW = 11;
static var MAXRETURNFRAMES_SLOW = 7;
static var MAXRETURNFRAMES_NORMAL = 3.5;
static var MAXRETURNFRAMES_FAST = 1.5;
var MAXTURNFRAMES = 0;
var turnedFrames = 0;
var carTurning = false;
var slotX = 0;
var slotY = 0;
static var BODYSTOPPED = 1;
static var BODYMOVING = 2;
static var BODYEXPLODE = 3;
static var BODYLAVA = 4;
static var BODYFIRE = 5;
static var BODYSHIELD = 6;
}
Symbol 811 MovieClip [__Packages.TitleScreen] Frame 0
class TitleScreen extends ComponentBase
{
var animation, _visible, parent, _parent, _x, _y, removeMovieClip;
function TitleScreen () {
super();
animation.play_button.onRelease = clickHandler;
moving = false;
terminateAfterMove = false;
final_x = 0;
_visible = false;
}
function setParent(p) {
parent = p;
}
function clickHandler() {
trace("start clicked...in button");
_parent._parent.clickStart();
}
function clickStart() {
trace("start clicked...title");
_parent.play_ft.track();
parent.EventTitleStartButtonPressed();
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setExtremeLeft(el) {
extremeLeft = el;
}
function setExtremeRight(er) {
extremeRight = er;
}
function setAppear() {
moving = true;
_x = extremeRight;
final_x = 0;
_visible = true;
}
function setDisappear() {
moving = true;
final_x = extremeLeft;
terminateAfterMove = true;
}
function Terminate() {
parent.removeEventListener("Run", this);
removeMovieClip();
}
function Run() {
if (moving) {
_x = _x - 60;
if (_x <= final_x) {
_x = final_x;
moving = false;
if (terminateAfterMove) {
Terminate();
}
}
}
}
var moving = false;
var extremeRight = 0;
var extremeLeft = 0;
var terminateAfterMove = false;
var final_x = 0;
}
Symbol 812 MovieClip [__Packages.EndScreen] Frame 0
class EndScreen extends ComponentBase
{
var restartbutton, toysbutton, sendbutton, _visible, end_score, end_realm, end_races, end_tracks, end_longest, parent, _parent, getURL, _x, _y, removeMovieClip;
function EndScreen () {
super();
restartbutton.onRelease = clickHandler;
toysbutton.onRelease = toysHandler;
sendbutton.onRelease = sendHandler;
moving = false;
terminateAfterMove = false;
final_x = 0;
_visible = false;
end_score = 0;
end_realm = 0;
end_races = 0;
end_tracks = 0;
end_longest = 0;
}
function setParent(p) {
parent = p;
}
function setValues(escore, erealm, eraces, etracks, elongest) {
end_score = escore;
end_realm = erealm;
end_races = eraces;
end_tracks = etracks;
end_longest = elongest;
}
function clickHandler() {
_parent.clickRestart();
}
function toysHandler() {
_parent.clickToys();
}
function sendHandler() {
_parent.clickSend();
}
function clickRestart() {
_parent.playAgain_ft.track();
parent.EventEndRestartButtonPressed();
}
function clickToys() {
(getURL("/showcase/category_brand_product.aspx?category_id=7502"));// not popped
}
function clickSend() {
_parent.emailform_mc.gotoAndPlay("start");
_parent.emailform_mc._x = 62;
_parent.emailform_mc._y = 33;
_parent.emailform_mc.error_fromName_naughty._visible = false;
_parent.emailform_mc.error_fromName_blank._visible = false;
_parent.emailform_mc.error_toName_naughty._visible = false;
_parent.emailform_mc.error_toName_blank._visible = false;
_parent.emailform_mc.error_toEmail_bad._visible = false;
_parent.emailform_mc.error_toEmail_naughty._visible = false;
_parent.emailform_mc.error_toEmail_blank._visible = false;
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setExtremeLeft(el) {
extremeLeft = el;
}
function setExtremeRight(er) {
extremeRight = er;
}
function setAppear() {
moving = true;
_x = extremeRight;
final_x = 0;
_visible = true;
}
function setDisappear() {
moving = true;
final_x = extremeLeft;
terminateAfterMove = true;
}
function Terminate() {
parent.removeEventListener("Run", this);
removeMovieClip();
}
function Run() {
if (moving) {
_x = _x - 60;
if (_x <= final_x) {
_x = final_x;
moving = false;
if (terminateAfterMove) {
Terminate();
}
}
}
}
var moving = false;
var extremeRight = 0;
var extremeLeft = 0;
var terminateAfterMove = false;
var final_x = 0;
}
Symbol 813 MovieClip [__Packages.FlyingScoreBase] Frame 0
class FlyingScoreBase extends ComponentBase
{
var finalX, finalY, xunits, yunits, messageText, parent, addEventListener, finalValue, dispatchEvent, removeMovieClip, _x, _y, _rotation;
function FlyingScoreBase () {
super();
movedFrames = 0;
finalX = 0;
finalY = 0;
xunits = 0;
yunits = 0;
moving = false;
left = false;
right = false;
up = false;
down = false;
doSpin = false;
degrees = 0;
messageText = "";
}
function setParent(clp) {
parent = clp;
addEventListener(eventThrown, parent);
}
function Terminate() {
trace("Terminate-finalValue:" + finalValue);
dispatchEvent({type:eventThrown, finalValue:finalValue});
parent.removeEventListener("Run", this);
removeMovieClip();
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setFinalLocation(x, y) {
finalX = x;
finalY = y;
}
function getX() {
return(_x);
}
function getY() {
return(_y);
}
function setDoSpin(tf, deg) {
doSpin = tf;
degrees = deg;
}
function setMessageText(msg) {
messageText = msg;
}
function setRGBColor(clr) {
var _local2 = new Color(this);
_local2.setRGB(clr);
}
function startMoving(fv) {
finalValue = fv;
if (finalX > _x) {
right = true;
xunits = (finalX - _x) / MOVEFRAMES;
} else {
left = true;
xunits = (_x - finalX) / MOVEFRAMES;
}
if (finalY > _y) {
down = true;
yunits = (finalY - _y) / MOVEFRAMES;
} else {
up = true;
yunits = (_y - finalY) / MOVEFRAMES;
}
moving = true;
}
function Run() {
if (moving) {
movedFrames++;
if (up) {
_y = _y - yunits;
} else {
_y = _y + yunits;
}
if (right) {
_x = _x + xunits;
} else {
_x = _x - xunits;
}
if (doSpin) {
_rotation = _rotation + degrees;
}
if (movedFrames >= MOVEFRAMES) {
Terminate();
}
}
}
var moving = false;
var MOVEFRAMES = 20;
var movedFrames = 0;
var right = false;
var left = false;
var up = false;
var down = false;
var doSpin = false;
var degrees = 0;
var eventThrown = "";
}
Symbol 814 MovieClip [__Packages.Flyingtrackmod] Frame 0
class Flyingtrackmod extends FlyingScoreBase
{
function Flyingtrackmod () {
super();
}
var eventThrown = "EventAddTrackMod";
var MOVEFRAMES = 20;
}
Symbol 815 MovieClip [__Packages.Flyingscoremod] Frame 0
class Flyingscoremod extends FlyingScoreBase
{
function Flyingscoremod () {
super();
}
var eventThrown = "EventAddScoreMod";
var MOVEFRAMES = 30;
}
Symbol 816 MovieClip [__Packages.FlyingTime] Frame 0
class FlyingTime extends FlyingScoreBase
{
function FlyingTime () {
super();
}
var eventThrown = "EventFlyingTime";
var MOVEFRAMES = 15;
}
Symbol 817 MovieClip [__Packages.Background] Frame 0
class Background extends ComponentBase
{
var slot1, slot2, slot3, slot4, slot5, slot6, vortex, _x, _y;
function Background () {
super();
resetSlots();
resetColor();
}
function resetSlots() {
slot1.gotoAndStop("off");
slot2.gotoAndStop("off");
slot3.gotoAndStop("off");
slot4.gotoAndStop("off");
slot5.gotoAndStop("off");
slot6.gotoAndStop("off");
}
function resetColor() {
vortex.gotoAndStop(1);
}
function setLocation(x, y) {
_x = x;
_y = y;
}
function setColor(clr) {
var _local2 = "b" + clr.toString();
vortex.gotoAndStop(_local2);
}
function turnSlotOn(slot) {
switch (slot) {
case 1 :
slot1.gotoAndStop("on");
break;
case 2 :
slot2.gotoAndStop("on");
break;
case 3 :
slot3.gotoAndStop("on");
break;
case 4 :
slot4.gotoAndStop("on");
break;
case 5 :
slot5.gotoAndStop("on");
break;
case 6 :
slot6.gotoAndStop("on");
}
}
}
Symbol 818 MovieClip [__Packages.hotwheels.Email] Frame 0
class hotwheels.Email
{
var newRoot, word, fromName_txt, toName_txt, toEmail_txt;
function Email (tmpRoot) {
newRoot = tmpRoot;
tmpRoot.emailform_mc.error_fromName_naughty._visible = false;
tmpRoot.emailform_mc.error_fromName_blank._visible = false;
tmpRoot.emailform_mc.error_toName_naughty._visible = false;
tmpRoot.emailform_mc.error_toName_blank._visible = false;
tmpRoot.emailform_mc.error_toEmail_bad._visible = false;
tmpRoot.emailform_mc.error_toEmail_naughty._visible = false;
tmpRoot.emailform_mc.error_toEmail_blank._visible = false;
}
function validate() {
word = new hotwheels.WordCheck();
getWord().setWord(getFromName_txt());
if (getWord().isNaughty()) {
newRoot.emailform_mc.error_fromName_naughty._visible = true;
newRoot.emailform_mc.error_fromName_blank._visible = false;
return(false);
}
if (getWord().isNull()) {
newRoot.emailform_mc.error_fromName_naughty._visible = false;
newRoot.emailform_mc.error_fromName_blank._visible = true;
return(false);
}
if ((!getWord().isNaughty()) && (!getWord().isNull())) {
newRoot.emailform_mc.error_fromName_naughty._visible = false;
newRoot.emailform_mc.error_fromName_blank._visible = false;
}
getWord().setWord(getToName_txt());
if (getWord().isNaughty()) {
newRoot.emailform_mc.error_toName_naughty._visible = true;
newRoot.emailform_mc.error_toName_blank._visible = false;
return(false);
}
if (getWord().isNull()) {
newRoot.emailform_mc.error_toName_naughty._visible = true;
newRoot.emailform_mc.error_toName_blank._visible = false;
return(false);
}
if ((!getWord().isNaughty()) && (!getWord().isNull())) {
newRoot.emailform_mc.error_toName_naughty._visible = false;
newRoot.emailform_mc.error_toName_blank._visible = false;
}
getWord().setWord(getToEmail_txt());
if (getWord().isNaughty()) {
newRoot.emailform_mc.error_toEmail_naughty._visible = true;
newRoot.emailform_mc.error_toEmail_blank._visible = false;
newRoot.emailform_mc.error_toEmail_bad._visible = false;
return(false);
}
if (getWord().isNull()) {
newRoot.emailform_mc.error_toEmail_naughty._visible = false;
newRoot.emailform_mc.error_toEmail_blank._visible = true;
newRoot.emailform_mc.error_toEmail_bad._visible = false;
return(false);
}
if (!getWord().isEmail()) {
newRoot.emailform_mc.error_toEmail_naughty._visible = false;
newRoot.emailform_mc.error_toEmail_blank._visible = false;
newRoot.emailform_mc.error_toEmail_bad._visible = true;
return(false);
}
if (((!getWord().isNaughty()) && (!getWord().isNull())) && (getWord().isEmail())) {
newRoot.emailform_mc.error_toEmail_naughty._visible = false;
newRoot.emailform_mc.error_toEmail_blank._visible = false;
newRoot.emailform_mc.error_toEmail_bad._visible = false;
}
return(true);
}
function setFromName_txt(val) {
fromName_txt = val;
}
function getFromName_txt() {
return(fromName_txt);
}
function setToName_txt(val) {
toName_txt = val;
}
function getToName_txt() {
return(toName_txt);
}
function setToEmail_txt(val) {
toEmail_txt = val;
}
function getToEmail_txt() {
return(toEmail_txt);
}
function getWord() {
return(word);
}
}
Symbol 819 MovieClip [__Packages.hotwheels.WordCheck] Frame 0
class hotwheels.WordCheck
{
var exactNaughtyWords, searchNaughtyWords, toString, word;
function WordCheck () {
exactNaughtyWords = new Array("a hole", "ass", "ass hole", "ass whipe", "ass wipe", "be yotch", "bee yotch", "blow job", "chicken head", "dick head", "f you", "f ing", "fuc", "f-you", "give head", "gives head", "hell");
searchNaughtyWords = new Array("69", "666", "ahole", "alcohol", "alcoholic", "anal", "anul", "anus", "arse", "arson", "arsonist", "assassinate", "assassination", "asshole", "asswhipe", "asswipe", "bang", " bastard", "beyotch", "beeyotch", "biatch", "bisexual", "bitch", "blood", "blowjob", "blunt", "bollocks", "bollox", "bollux", "boob", "booze", "bratz", "breast", "burn", "butt", "caca", "cancer", "chickenhead", "cigar", "clit", "cocaine", "cock", "coke", "condemn", "crackhead", "cunt", "dammit", "damnit", "decapitate", "dead", "destroy", "dickhead", "dike", "dipshit", "doody", "drinker", "druggie", "drunk", "dyke", "eradicate", "eradicator", "evil", "execute", "execution", "exterminate", "exterminator", "fag", "fuck", "fuct", "fuk", "fukt", "funeral", "fux", "fyou", "gang", "gangbang", "gangsta", "gay", "givehead", "giveshead", "gook", "grave", "gun", "god", "hangover", "heroin", "homo", "horror", "jerk", "jesus", "kike", "kill", "knife", "lesbian", "lethal", "maniac", "motherfucker", "murder", "nigga", "nigger", "nympho", "penis", "piss", "playboy", "poison", "poop", "prostitute", "pubic", "pussi", "pussy", "queer", "rape", "rectum", "sex", "shag", "sheepshagger", "shit", "shite", "shoit", "shoot", "slaughter", "slut", "speedball", "spic", "spik", "stab", "stooped", "stupid", "suck", "sucs", "suffocate", "suffocation", "suicide", "suicidal", "suks", "sux", "terror", "tit", "tosser", "transexual", "transvestite", "twat", "urine", "vagina", "vixen", "wanker", "warlock", "weapon", "whore", "witch", "wop", "yerin");
}
function isNaughty() {
getWord().toString().toLowerCase().replace("-", " ").replace("_", " ");
if (getWord() != "") {
var _local4 = getWord().toString().toLowerCase().split(" ");
var _local3 = 0;
var _local2 = 0;
while (_local3 < _local4.length) {
_local2 = 0;
while (_local2 < exactNaughtyWords.length) {
if (_local4[_local3] == exactNaughtyWords[_local2]) {
return(true);
}
_local2++;
}
_local2 = 0;
while (_local2 < searchNaughtyWords.length) {
if (_local4[_local3].indexOf(searchNaughtyWords[_local2]) != -1) {
return(true);
}
_local2++;
}
_local3++;
}
}
return(false);
}
function lTrim() {
var _local3 = getWord().toString();
var _local2 = 0;
var _local4 = _local3.length;
while ((_local2 < _local4) && (_local3.charCodeAt(_local2) <= 32)) {
_local2++;
}
setWord(_local3.substring(_local2, _local4));
return(_local3.substring(_local2, _local4));
}
function rTrim() {
var _local3 = getWord().toString();
var _local2 = _local3.length - 1;
while ((_local2 >= 0) && (_local3.charCodeAt(_local2) <= 32)) {
_local2--;
}
setWord(_local3.substring(0, _local2 + 1));
return(_local3.substring(0, _local2 + 1));
}
function trim() {
var _local2 = getWord().toString();
_local2 = lTrim();
_local2 = rTrim();
return(_local2);
}
function isNull() {
var _local2 = trim();
return((_local2 == null) || (_local2.length == 0));
}
function isEmail() {
if (getWord().length < 5) {
return(false);
}
var _local4 = "*|,\":<>[]{}`';()&$#%";
var _local3 = getWord().length;
var _local2 = 0;
while (_local2 < _local3) {
if (_local4.indexOf(getWord().charAt(_local2)) != -1) {
return(false);
}
_local2++;
}
var _local5 = getWord().lastIndexOf("@");
if ((_local5 < 1) || (_local5 == (_local3 - 1))) {
return(false);
}
var _local6 = getWord().lastIndexOf(".");
if ((_local6 < 4) || (_local6 == (_local3 - 1))) {
return(false);
}
if (_local5 > _local6) {
return(false);
}
return(true);
}
function replace(searchStr, replaceStr) {
var _local4 = getWord().toString();
var _local5 = "";
var _local2 = 0;
var _local3;
if (searchStr == "") {
return(_local4);
}
if (_local4.indexOf(searchStr) != -1) {
while (_local3 = _local4.indexOf(searchStr, _local2) , _local3 != -1) {
_local5 = _local5 + _local4.substring(_local2, _local3);
_local5 = _local5 + replaceStr;
_local2 = _local3 + searchStr.length;
}
return(_local5 + _local4.substring(_local2));
}
return(_local4);
}
function sprintf() {
var _local5 = toString();
var _local6 = 0;
var _local4 = _local5.splitMultiChar("%s");
_local5 = "";
var _local3 = 0;
while (_local3 < _local4.length) {
_local5 = _local5 + (_local4[_local3] + arguments[_local3]);
_local3++;
}
return((_local6 ? (_local5 + "?") : (_local5)));
}
function splitMultiChar(c) {
var _local2 = getWord().toString();
_local2 = _local2.replace(c, "\u00B6");
var _local3 = _local2.split("\u00B6");
return(_local3);
}
function setWord(val) {
word = val;
}
function getWord() {
return(word);
}
}
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 11
stop();
Symbol 80 MovieClip Frame 22
stop();
Symbol 80 MovieClip Frame 33
stop();
Symbol 80 MovieClip Frame 43
stop();
Symbol 80 MovieClip Frame 53
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 90 MovieClip [FBackground] Frame 1
#initclip 42
Object.registerClass("FBackground", Background);
#endinitclip
Symbol 109 MovieClip Frame 12
stop();
Symbol 109 MovieClip Frame 13
play();
Symbol 109 MovieClip Frame 19
stop();
Symbol 109 MovieClip Frame 20
play();
Symbol 109 MovieClip Frame 26
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 2
stop();
Symbol 187 MovieClip Frame 3
stop();
Symbol 187 MovieClip Frame 4
stop();
Symbol 187 MovieClip Frame 5
stop();
Symbol 187 MovieClip Frame 6
stop();
Symbol 187 MovieClip Frame 7
stop();
Symbol 187 MovieClip Frame 8
stop();
Symbol 187 MovieClip Frame 9
stop();
Symbol 187 MovieClip Frame 10
stop();
Symbol 187 MovieClip Frame 11
stop();
Symbol 187 MovieClip Frame 12
stop();
Symbol 232 MovieClip Frame 14
stop();
Symbol 233 MovieClip [FLevelPopUp] Frame 1
#initclip 30
Object.registerClass("FLevelPopUp", LevelPopUp);
#endinitclip
Symbol 236 MovieClip [FMessage] Frame 1
#initclip 31
Object.registerClass("FMessage", Message);
#endinitclip
stop();
Symbol 237 MovieClip [FParticleExplosion] Frame 1
#initclip 32
Object.registerClass("FParticleExplosion", ParticleExplosion);
#endinitclip
Symbol 240 MovieClip [FScore] Frame 1
#initclip 33
Object.registerClass("FScore", Score);
#endinitclip
Symbol 271 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 2
stop();
Symbol 271 MovieClip Frame 3
stop();
Symbol 271 MovieClip Frame 4
stop();
Symbol 271 MovieClip Frame 5
stop();
Symbol 271 MovieClip Frame 6
stop();
Symbol 271 MovieClip Frame 7
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 5
play();
Symbol 282 MovieClip Frame 11
stop();
Symbol 282 MovieClip Frame 12
play();
Symbol 282 MovieClip Frame 18
stop();
Symbol 289 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 13
gotoAndPlay ("blink");
Symbol 289 MovieClip Frame 14
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 5
play();
Symbol 308 MovieClip Frame 11
stop();
Symbol 308 MovieClip Frame 12
play();
Symbol 308 MovieClip Frame 18
stop();
Symbol 311 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 11
stop();
Symbol 330 MovieClip Frame 12
play();
Symbol 330 MovieClip Frame 18
stop();
Symbol 330 MovieClip Frame 19
play();
Symbol 330 MovieClip Frame 25
stop();
Symbol 340 MovieClip Frame 11
stop();
Symbol 340 MovieClip Frame 12
play();
Symbol 340 MovieClip Frame 18
stop();
Symbol 340 MovieClip Frame 19
play();
Symbol 340 MovieClip Frame 25
stop();
Symbol 359 MovieClip Frame 11
stop();
Symbol 359 MovieClip Frame 12
play();
Symbol 359 MovieClip Frame 18
stop();
Symbol 359 MovieClip Frame 19
play();
Symbol 359 MovieClip Frame 25
stop();
Symbol 412 MovieClip Frame 8
nextbutton.onRelease = function () {
play();
};
Symbol 412 MovieClip Frame 16
nextbutton.onRelease = function () {
play();
};
stop();
Symbol 412 MovieClip Frame 17
nextbutton.onRelease = function () {
play();
};
Symbol 412 MovieClip Frame 26
nextbutton.onRelease = function () {
play();
};
backbutton.onRelease = function () {
gotoAndPlay ("instructions");
};
stop();
Symbol 412 MovieClip Frame 36
backbutton.onRelease = function () {
gotoAndPlay ("Mods_01");
};
stop();
Symbol 414 MovieClip [FScoreBoard] Frame 1
#initclip 34
Object.registerClass("FScoreBoard", ScoreBoard);
#endinitclip
stop();
Symbol 414 MovieClip [FScoreBoard] Frame 2
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 2
stop();
Symbol 425 MovieClip Frame 3
stop();
Symbol 425 MovieClip Frame 4
stop();
Symbol 425 MovieClip Frame 5
stop();
Symbol 425 MovieClip Frame 6
stop();
Symbol 437 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 14
stop();
Symbol 445 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 12
stop();
Symbol 513 MovieClip Frame 1
stop();
Symbol 513 MovieClip Frame 16
gotoAndPlay ("playing");
Symbol 522 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 2
stop();
Symbol 538 MovieClip Frame 1
stop();
Symbol 538 MovieClip Frame 34
stop();
Symbol 546 MovieClip Frame 1
stop();
Symbol 546 MovieClip Frame 34
stop();
Symbol 554 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 34
stop();
Symbol 562 MovieClip Frame 1
stop();
Symbol 562 MovieClip Frame 34
stop();
Symbol 569 MovieClip Frame 1
stop();
Symbol 569 MovieClip Frame 34
stop();
Symbol 577 MovieClip Frame 1
stop();
Symbol 577 MovieClip Frame 34
stop();
Symbol 587 MovieClip Frame 1
stop();
Symbol 587 MovieClip Frame 2
stop();
Symbol 587 MovieClip Frame 3
stop();
Symbol 587 MovieClip Frame 4
stop();
Symbol 587 MovieClip Frame 5
stop();
Symbol 587 MovieClip Frame 6
stop();
Symbol 587 MovieClip Frame 7
stop();
Symbol 587 MovieClip Frame 8
stop();
Symbol 587 MovieClip Frame 9
stop();
Symbol 587 MovieClip Frame 10
stop();
Symbol 587 MovieClip Frame 11
stop();
Symbol 587 MovieClip Frame 12
stop();
Symbol 587 MovieClip Frame 13
stop();
Symbol 587 MovieClip Frame 14
stop();
Symbol 587 MovieClip Frame 15
stop();
Symbol 587 MovieClip Frame 16
stop();
Symbol 587 MovieClip Frame 17
stop();
Symbol 587 MovieClip Frame 18
stop();
Symbol 587 MovieClip Frame 19
stop();
Symbol 587 MovieClip Frame 20
stop();
Symbol 587 MovieClip Frame 21
stop();
Symbol 598 MovieClip Frame 1
stop();
Symbol 598 MovieClip Frame 2
stop();
Symbol 598 MovieClip Frame 3
stop();
Symbol 598 MovieClip Frame 4
stop();
Symbol 598 MovieClip Frame 5
stop();
Symbol 598 MovieClip Frame 6
stop();
Symbol 598 MovieClip Frame 7
stop();
Symbol 598 MovieClip Frame 8
stop();
Symbol 598 MovieClip Frame 9
stop();
Symbol 598 MovieClip Frame 10
stop();
Symbol 598 MovieClip Frame 11
stop();
Symbol 598 MovieClip Frame 12
stop();
Symbol 604 MovieClip Frame 1
stop();
Symbol 604 MovieClip Frame 2
stop();
Symbol 604 MovieClip Frame 3
stop();
Symbol 604 MovieClip Frame 4
stop();
Symbol 604 MovieClip Frame 5
stop();
Symbol 604 MovieClip Frame 6
stop();
Symbol 604 MovieClip Frame 7
stop();
Symbol 604 MovieClip Frame 8
stop();
Symbol 605 MovieClip [TrackPiece] Frame 1
#initclip 35
Object.registerClass("TrackPiece", Track);
#endinitclip
stop();
Symbol 605 MovieClip [TrackPiece] Frame 2
stop();
Symbol 626 MovieClip Frame 13
stop();
Symbol 626 MovieClip Frame 14
play();
Symbol 626 MovieClip Frame 23
stop();
Symbol 626 MovieClip Frame 24
play();
Symbol 626 MovieClip Frame 28
stop();
Symbol 642 MovieClip Frame 23
stop();
gobutton.onRelease = function () {
play();
};
Symbol 642 MovieClip Frame 39
next_button.onRelease = function () {
play();
};
stop();
Symbol 642 MovieClip Frame 40
Symbol 642 MovieClip Frame 49
next_button.onRelease = function () {
play();
};
back_button.onRelease = function () {
gotoAndPlay ("instructions");
};
stop();
Symbol 642 MovieClip Frame 59
back_button.onRelease = function () {
gotoAndPlay ("Mods_01");
};
stop();
Symbol 643 MovieClip [FTitleScreen] Frame 1
#initclip 36
Object.registerClass("FTitleScreen", TitleScreen);
#endinitclip
Symbol 662 MovieClip Frame 21
stop();
Symbol 679 MovieClip Frame 1
stop();
Symbol 679 MovieClip Frame 2
stop();
Symbol 679 MovieClip Frame 3
stop();
Symbol 679 MovieClip Frame 4
stop();
Symbol 679 MovieClip Frame 5
stop();
Symbol 679 MovieClip Frame 6
stop();
Symbol 690 MovieClip Frame 21
stop();
Symbol 691 MovieClip Frame 1
stop();
Symbol 691 MovieClip Frame 2
stop();
Symbol 691 MovieClip Frame 3
stop();
Symbol 691 MovieClip Frame 4
stop();
Symbol 691 MovieClip Frame 5
stop();
Symbol 691 MovieClip Frame 6
stop();
Symbol 702 MovieClip Frame 21
stop();
Symbol 703 MovieClip Frame 1
stop();
Symbol 703 MovieClip Frame 2
stop();
Symbol 703 MovieClip Frame 3
stop();
Symbol 703 MovieClip Frame 4
stop();
Symbol 703 MovieClip Frame 5
stop();
Symbol 703 MovieClip Frame 6
stop();
Symbol 712 MovieClip Frame 1
stop();
Symbol 712 MovieClip Frame 2
stop();
Symbol 712 MovieClip Frame 3
stop();
Symbol 712 MovieClip Frame 4
stop();
Symbol 712 MovieClip Frame 5
stop();
Symbol 712 MovieClip Frame 6
stop();
Symbol 719 MovieClip Frame 1
stop();
Symbol 719 MovieClip Frame 2
stop();
Symbol 719 MovieClip Frame 3
stop();
Symbol 719 MovieClip Frame 4
stop();
Symbol 719 MovieClip Frame 5
stop();
Symbol 719 MovieClip Frame 6
stop();
Symbol 728 MovieClip Frame 1
stop();
Symbol 728 MovieClip Frame 2
stop();
Symbol 728 MovieClip Frame 3
stop();
Symbol 728 MovieClip Frame 4
stop();
Symbol 728 MovieClip Frame 5
stop();
Symbol 728 MovieClip Frame 6
stop();
Symbol 729 MovieClip Frame 1
stop();
Symbol 729 MovieClip Frame 2
stop();
Symbol 729 MovieClip Frame 3
stop();
Symbol 729 MovieClip Frame 4
stop();
Symbol 729 MovieClip Frame 5
stop();
Symbol 729 MovieClip Frame 6
stop();
Symbol 730 MovieClip [FCar] Frame 1
#initclip 37
Object.registerClass("FCar", Car);
#endinitclip
stop();
Symbol 739 MovieClip Frame 1
stop();
Symbol 739 MovieClip Frame 2
play();
Symbol 739 MovieClip Frame 9
stop();
Symbol 739 MovieClip Frame 10
play();
Symbol 739 MovieClip Frame 15
stop();
Symbol 744 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 2
play();
Symbol 744 MovieClip Frame 9
stop();
Symbol 744 MovieClip Frame 10
play();
Symbol 744 MovieClip Frame 15
stop();
Symbol 750 MovieClip Frame 1
stop();
Symbol 750 MovieClip Frame 2
play();
Symbol 750 MovieClip Frame 9
stop();
Symbol 750 MovieClip Frame 10
play();
Symbol 750 MovieClip Frame 15
stop();
Symbol 782 MovieClip [FEndScreen] Frame 1
#initclip 38
Object.registerClass("FEndScreen", EndScreen);
#endinitclip
Symbol 782 MovieClip [FEndScreen] Frame 9
stop();
Symbol 783 MovieClip [FFlyingtrackmod] Frame 1
#initclip 39
Object.registerClass("FFlyingtrackmod", Flyingtrackmod);
#endinitclip
Symbol 786 MovieClip [FFlyingscoremod] Frame 1
#initclip 40
Object.registerClass("FFlyingscoremod", Flyingscoremod);
#endinitclip
Symbol 788 MovieClip [FFlyingtime] Frame 1
#initclip 41
Object.registerClass("FFlyingtime", FlyingTime);
#endinitclip