Frame 1
function onLoadComplete() {
}
function startGame() {
play_ft.track();
gotoAndStop ("gameStart");
}
function endGame() {
payoff_ft.track();
gotoAndStop ("gameEnd");
}
function printGame() {
clearInterval(printInt);
print_ft.track();
printInt = setInterval(__main, "__printGame", 1000);
tmpPrintGame = printGame;
delete printGame;
}
function playAgain() {
playAgain_ft.track();
gotoAndStop ("welcome");
}
function exitGame() {
exitClick_ft.trackRedir();
}
function __printGame() {
pJob = new PrintJob();
var _local1 = 0;
if (pJob.start()) {
}
if (_local1 > 0) {
pJob.send();
}
printGame = tmpPrintGame;
delete tmpPrintGame;
clearInterval(printInt);
delete printInt;
}
stop();
_global.performance = new smashing.PerformanceTest(null, function () {
_global.__main.play();
});
_global.sSound = "on";
Stage.showMenu = false;
var appSection = "Games";
var appTitle = "Halfpipe";
var appPath = "/games/halfpipe/";
var exitClickURL = "";
var loadContent = new Array();
_global.__main = this;
var pJob;
var printInt;
var tmpPrintGame;
var play_ft = (new mattel.data.FlashTrack());
play_ft.__set__ti(((appSection + "-") + appTitle) + "-Play");
play_ft.__set__dcsuri(appPath + "play.ftrk");
var playAgain_ft = (new mattel.data.FlashTrack());
playAgain_ft.__set__ti(((appSection + "-") + appTitle) + "-Play Again");
playAgain_ft.__set__dcsuri(appPath + "play_again.ftrk");
var payoff_ft = (new mattel.data.FlashTrack());
payoff_ft.__set__ti(((appSection + "-") + appTitle) + "-Payoff");
payoff_ft.__set__dcsuri(appPath + "payoff.ftrk");
var print_ft = (new mattel.data.FlashTrack());
print_ft.__set__ti(((appSection + "-") + appTitle) + "-Print");
print_ft.__set__dcsuri(appPath + "print.ftrk");
var exitClick_ft = (new mattel.data.FlashTrack());
exitClick_ft.__set__ti(((appSection + "-") + appTitle) + "-Exit Click");
exitClick_ft.__set__dcsuri(appPath + "exit_click.ftrk");
exitClick_ft.__set__redirectLink(exitClickURL);
Frame 3
stop();
oBase = new smashing.Base();
nMedium = 700;
nLow = 300;
nCPU = _global.performance.processor;
if (nCPU <= nLow) {
_global.sLowEnd = "low";
} else if (nCPU <= nMedium) {
_global.sLowEnd = "medium";
} else {
_global.sLowEnd = "high";
}
smashing.Viewport.init();
_root.nDebug1 = nCPU;
this.onEnterFrame = function () {
var _local1 = this;
var _local2 = _local1.getBytesLoaded() / _local1.getBytesTotal();
var _local3 = _local1.loader.mcBar;
_local3.gotoAndStop(Math.ceil(_local2 * _local3._totalframes));
_local1.loader.loaded = Math.floor(_local2 * 100);
if (_local2 == 1) {
_local1.gotoAndStop("welcome");
delete _local1.onEnterFrame;
}
};
Frame 9
stop();
var emailform_mc = attachMovie("EmailSymbol", "email", 500);
emailform_mc._x = -550;
var myEmail = (new hotwheels.Email());
_global.halfpipe = this;
_quality = "high";
start_mc.onRelease = function () {
play_ft.track();
gotoAndStop ("board");
};
start_mc.hitArea = start_mc.mcHitArea;
if (bSoundInited == undefined) {
bSoundInited = true;
_global.aMusic = [mcMusic0, mcMusic1, mcMusic2];
aPaths = ["loop0.swf", "loop1.swf", "loop2.swf"];
oSoundLoader = new smashing.LoadWatcher(aPaths, _global.aMusic);
oSoundLoader.loadNextMovie();
}
_global.oSound = new smashing.SoundHandler(mcSound);
smashing.Viewport.reset();
Frame 16
stop();
loadVariables ("../../common/getauthcookie.aspx", this);
aBoards = [board1, board2, board3, board4];
var i = 0;
while (i < aBoards.length) {
aBoards[i].aBoards = aBoards;
i++;
}
_global.nBoard = 1;
next_btn.onRelease = function () {
gotoAndStop ("gameType");
};
Frame 21
function onUserInfo() {
var _local1 = us.getUser();
userid = _local1.getUserID();
if (((userid != 0) && (userid != -1)) && (userid != undefined)) {
myGameServices.recordScore(userid, siteid, gameid, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
}
var userid;
var gameid = 106;
var siteid = 34;
var m_connection = mx.remoting.NetServices.createGatewayConnection("/gateway.aspx");
var us = (new com.hotwheels.registration.UserServices(m_connection));
us.addEventListener("onUserInfo", this);
us.getCurrentUser();
var myGameServices = new SharedGameServices(m_connection);
myGameServices.addEventListener("onRecordScore", this);
aMatch = [play0, play1, play2];
aTrack = [track0, track1, track2];
i = 0;
while (i < aMatch.length) {
aMatch[i].aMatch = aMatch;
i++;
}
i = 0;
while (i < aTrack.length) {
aTrack[i].aTrack = aTrack;
i++;
}
_global.sType = "timed";
_global.nTrack = 0;
next_btn.onRelease = function () {
stopAllSounds();
gotoAndStop ("help");
};
stop();
Frame 29
stop();
_global.oMusic = new MusicHandler(_global.aMusic[_global.nTrack]);
play_btn.onRelease = function () {
gotoAndPlay(_global.sType);
};
Instance of Symbol 435 MovieClip [bg_buildings] "buildings" in Frame 34
onClipEvent (load) {
this.z = 850;
this.getScaleMod();
this.render();
}
Instance of Symbol 438 MovieClip [mcBackCrowd] "backCrowd" in Frame 34
onClipEvent (load) {
this.z = 450;
this.getScaleMod();
this.render();
}
Instance of Symbol 757 MovieClip [mcPlayerCPU] "mcPlayer" in Frame 34
onClipEvent (load) {
this.z = 25;
}
Instance of Symbol 936 MovieClip [mcNav] "mcNav" in Frame 34
onClipEvent (load) {
this._parent.mcPlayer.nScore = 0;
}
Instance of Symbol 942 MovieClip "mcRampSound" in Frame 34
onClipEvent (load) {
this.oSound = new Sound(this);
}
Frame 35
stop();
oMain = new RampJumpWorld(this);
oBase.setWorld(oMain);
_quality = _global.sLowEnd;
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.mcTrans._currentframe == _local1.mcTrans._totalframes) {
_local1.play();
delete _local1.onEnterFrame;
}
};
Frame 36
stop();
mcKeyGrabber.setWorld(oMain);
mcNav.mcReadyGo.play();
Frame 40
stop();
oBase.pause();
oMain = new RampTutorWorld(this);
_quality = _global.sLowEnd;
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.mcTrans._currentframe == _local1.mcTrans._totalframes) {
_local1.play();
delete _local1.onEnterFrame;
}
};
Frame 41
stop();
mcKeyGrabber.setWorld(oMain);
oBase.setWorld(oMain);
mcNav.mcReadyGo.play();
Frame 46
stop();
oMain = new FreeWorld(this);
oBase.setWorld(oMain);
_quality = _global.sLowEnd;
this.onEnterFrame = function () {
var _local1 = this;
if (_local1.mcTrans._currentframe == _local1.mcTrans._totalframes) {
_local1.play();
delete _local1.onEnterFrame;
}
};
Frame 47
stop();
mcKeyGrabber.setWorld(oMain);
mcNav.mcReadyGo.play();
Frame 50
stop();
oBase.pause();
_quality = "high";
Viewport.reset();
Instance of Symbol 975 MovieClip in Frame 50
onClipEvent (load) {
this.gotoAndStop(_global.sType);
}
Frame 54
next_btn.onRelease = function () {
play();
};
Frame 59
stop();
playAgain_mc.onRelease = playAgain;
seeToys_mc.onRelease = function () {
getURL ("/showcase/category_type_product.aspx?category_type_id=6");
};
send_btn.onRelease = function () {
emailform_mc._x = 1;
emailform_mc._y = 11;
emailform_mc.gotoAndStop("start");
emailform_mc.error_fromName_naughty._visible = false;
emailform_mc.error_fromName_blank._visible = false;
emailform_mc.error_toName_naughty._visible = false;
emailform_mc.error_toName_blank._visible = false;
emailform_mc.error_toEmail_bad._visible = false;
emailform_mc.error_toEmail_naughty._visible = false;
emailform_mc.error_toEmail_blank._visible = false;
};
Symbol 1015 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
var _local3 = queue;
if (_local3 != undefined) {
var l = _local3.length;
var _local1;
_local1 = 0;
while (_local1 < l) {
var _local2 = _local3[_local1];
if (_local2 == handler) {
_local3.splice(_local1, 1);
return;
}
_local1++;
}
}
}
static function initialize(object) {
var _local1 = object;
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
_local1.addEventListener = _fEventDispatcher.addEventListener;
_local1.removeEventListener = _fEventDispatcher.removeEventListener;
_local1.dispatchEvent = _fEventDispatcher.dispatchEvent;
_local1.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local2 = eventObj;
var queueName = ("__q_" + _local2.type);
var queue = queueObj[queueName];
if (queue != undefined) {
var i;
for (i in queue) {
var _local1 = queue[i];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(_local2);
}
if (_local1[_local2.type] != undefined) {
if (exceptions[_local2.type] == undefined) {
_local1[_local2.type](_local2);
}
}
} else {
_local1.apply(queueObj, [_local2]);
}
}
}
}
function dispatchEvent(eventObj) {
var _local1 = eventObj;
var _local2 = this;
if (_local1.target == undefined) {
_local1.target = _local2;
}
_local2[_local1.type + "Handler"](_local1);
_local2.dispatchQueue(_local2, _local1);
}
function addEventListener(event, handler) {
var _local2 = this;
var _local1 = "__q_" + event;
if (_local2[_local1] == undefined) {
_local2[_local1] = new Array();
}
_global.ASSetPropFlags(_local2, _local1, 1);
_removeEventListener(_local2[_local1], event, handler);
_local2[_local1].push(handler);
}
function removeEventListener(event, handler) {
var _local1 = "__q_" + event;
_removeEventListener(this[_local1], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 1016 MovieClip [__Packages.mx.controls.listclasses.DataProvider] Frame 0
class mx.controls.listclasses.DataProvider extends Object
{
var length, splice, dispatchEvent, sort;
function DataProvider (obj) {
super();
}
static function Initialize(obj) {
var _local3 = obj;
var _local2 = mixinProps;
var l = _local2.length;
_local3 = _local3.prototype;
var _local1 = 0;
while (_local1 < l) {
_local3[_local2[_local1]] = mixins[_local2[_local1]];
_global.ASSetPropFlags(_local3, _local2[_local1], 1);
_local1++;
}
mx.events.EventDispatcher.initialize(_local3);
_global.ASSetPropFlags(_local3, "addEventListener", 1);
_global.ASSetPropFlags(_local3, "removeEventListener", 1);
_global.ASSetPropFlags(_local3, "dispatchEvent", 1);
_global.ASSetPropFlags(_local3, "dispatchQueue", 1);
Object.prototype.LargestID = 0;
Object.prototype.getID = function () {
var _local1 = this;
if (_local1.__ID__ == undefined) {
_local1.__ID__ = Object.prototype.LargestID++;
_global.ASSetPropFlags(_local1, "__ID__", 1);
}
return(_local1.__ID__);
};
_global.ASSetPropFlags(Object.prototype, "LargestID", 1);
_global.ASSetPropFlags(Object.prototype, "getID", 1);
return(true);
}
function addItemAt(index, value) {
var _local1 = index;
var _local2 = this;
if (_local1 < _local2.length) {
_local2.splice(_local1, 0, value);
} else if (_local1 > _local2.length) {
return;
}
_local2[_local1] = value;
_local2.updateViews("addItems", _local1, _local1);
}
function addItem(value) {
addItemAt(length, value);
}
function addItemsAt(index, newItems) {
var _local1 = index;
var _local2 = this;
var _local3 = newItems;
_local1 = Math.min(_local2.length, _local1);
_local3.unshift(_local1, 0);
_local2.splice.apply(_local2, _local3);
_local3.splice(0, 2);
_local2.updateViews("addItems", _local1, (_local1 + _local3.length) - 1);
}
function removeItemsAt(index, len) {
var _local3 = index;
var _local2 = new Array();
var _local1 = 0;
while (_local1 < len) {
_local2.push(getItemID(_local3 + _local1));
_local1++;
}
var oldItems = splice(_local3, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local3, lastItem:(_local3 + len) - 1, removedItems:oldItems, removedIDs:_local2});
}
function removeItemAt(index) {
var _local1 = this[index];
removeItemsAt(index, 1);
return(_local1);
}
function removeAll(Void) {
var _local1 = this;
_local1.splice(0);
_local1.updateViews("removeItems", 0, _local1.length - 1);
}
function replaceItemAt(index, itemObj) {
var _local1 = index;
var _local2 = this;
if ((_local1 < 0) || (_local1 >= _local2.length)) {
} else {
var _local3 = _local2.getItemID(_local1);
_local2[_local1] = itemObj;
_local2[_local1].__ID__ = _local3;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function getItemAt(index) {
return(this[index]);
}
function getItemID(index) {
var _local1 = this[index];
if ((typeof(_local1) != "object") && (_local1 != undefined)) {
return(index);
}
return(_local1.getID());
}
function sortItemsBy(fieldName, order) {
var _local1 = this;
var _local2 = order;
if (typeof(_local2) == "string") {
_local1.sortOn(fieldName);
if (_local2.toUpperCase() == "DESC") {
_local1.reverse();
}
} else {
_local1.sortOn(fieldName, _local2);
}
_local1.updateViews("sort");
}
function sortItems(compareFunc, optionFlags) {
sort(compareFunc, optionFlags);
updateViews("sort");
}
function editField(index, fieldName, newData) {
var _local1 = index;
this[_local1][fieldName] = newData;
dispatchEvent({type:"modelChanged", eventName:"updateField", firstItem:_local1, lastItem:_local1, 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 1017 MovieClip [__Packages.smashing.PerformanceTest] Frame 0
class smashing.PerformanceTest
{
function PerformanceTest (itterations, onComplete) {
var _local1 = this;
if (itterations) {
_local1.loops = itterations;
}
_local1.remainingLoops = _local1.loops;
if (onComplete) {
_local1.onComplete = onComplete;
}
var _local2 = System.capabilities.version.substr(4).split(",");
_local1.flashMajorVersion = Number(_local2[0]);
_local1.flashMinorVersion = Number(_local2[2]);
_local1.complete = false;
_local1.intervalID = setInterval(function (o) {
o.test();
}, 0, _local1);
}
function test() {
var _local3 = this;
if (_local3.remainingLoops <= 0) {
_local3.finalize();
clearInterval(_local3.intervalID);
} else {
_local3.remainingLoops--;
var startTime = getTimer();
var _local2;
var _local1 = 0;
while (_local1 < 6400) {
_local2 = {};
_local1++;
}
_local3.time = _local3.time + (getTimer() - startTime);
}
}
function finalize() {
var _local1 = this;
_local1.score = Math.floor((_local1.loops / _local1.time) * 10000);
if (_local1.flashMajorVersion >= 7) {
_local1.log = Math.log(_local1.score * 0.015);
} else {
_local1.log = Math.log(_local1.score * 0.023);
}
_local1.processor = _local1.log * 1000;
_local1.complete = true;
_local1.onComplete(_local1);
}
function toString() {
var _local1 = this;
if (_local1.score) {
return((((((((("Loops:\t" + _local1.loops) + "\nFlash Version: \t") + System.capabilities.version) + "\nTotal Time:\t") + _local1.time) + "\nScore: \t") + _local1.score) + "\nProcessor: \t") + _local1.processor);
}
return("Test In Process.");
}
var score = 0;
var time = 0;
var loops = 20;
var complete = false;
}
Symbol 1018 MovieClip [__Packages.mattel.data.Serializable] Frame 0
interface mattel.data.Serializable{}
Symbol 1019 MovieClip [__Packages.mattel.panels.connections.FlashTrackPanelConnect] Frame 0
class mattel.panels.connections.FlashTrackPanelConnect
{
function FlashTrackPanelConnect () {
}
static var lcName = "__FlashTrackPanel__";
}
Symbol 1020 MovieClip [__Packages.mattel.data.NRStringExtensions] Frame 0
class mattel.data.NRStringExtensions
{
function NRStringExtensions () {
mx.events.EventDispatcher.initialize(this);
}
function isNaughty(s) {
var _local1 = this;
_local1.send_lv = new LoadVars();
_local1.result_lv = new LoadVars();
_local1.result_lv.onLoad = mx.utils.Delegate.create(_local1, _local1.isNaughtyResponse);
_local1.send_lv.phrase = _local1.trim(s);
_local1.send_lv.sendAndLoad(_local1.naughtyCheckURL, _local1.result_lv, "POST");
}
function isNaughtyResponse() {
var _local1 = this;
var _local2 = _local1.result_lv.answer == "Y";
_local1.dispatchEvent({type:"naughtyResult", result:_local2});
}
function isEmpty(s) {
var _local1 = s;
_local1 = trim(_local1);
return(((_local1 == null) || (_local1 == undefined)) || (_local1.length == 0));
}
function isEmail(s) {
var _local2 = s;
if (_local2.length < 5) {
return(false);
}
var iChars = "*|,\":<>[]{}`';()&$#%";
var _local3 = _local2.length;
var _local1 = 0;
while (_local1 < _local3) {
if (iChars.indexOf(_local2.charAt(_local1)) != -1) {
return(false);
}
_local1++;
}
var atIndex = _local2.lastIndexOf("@");
if ((atIndex < 1) || (atIndex == (_local3 - 1))) {
return(false);
}
var pIndex = _local2.lastIndexOf(".");
if ((pIndex < 4) || (pIndex == (_local3 - 1))) {
return(false);
}
if (atIndex > pIndex) {
return(false);
}
return(true);
}
function isAllAlpha(s) {
var _local2 = s;
var _local1 = 0;
while (_local1 < _local2.length) {
if (parseInt(_local2.charAt(_local1)).toString() != "NaN") {
return(false);
}
_local1++;
}
return(true);
}
function lTrim(s) {
var _local2 = s;
if (_local2.length == undefined) {
return(_local2);
}
var _local1 = 0;
while ((_local1 < _local2.length) && (_local2.charCodeAt(_local1) <= 32)) {
_local1++;
}
return(_local2.substring(_local1, _local2.length));
}
function rTrim(s) {
var _local2 = s;
if (_local2.length == undefined) {
return(_local2);
}
var _local1 = _local2.length - 1;
while ((_local1 >= 0) && (_local2.charCodeAt(_local1) <= 32)) {
_local1--;
}
return(_local2.substring(0, _local1 + 1));
}
function trim(s) {
var _local1 = s;
_local1 = lTrim(_local1);
_local1 = rTrim(_local1);
return(_local1);
}
function replace(s, searchStr, replaceStr) {
var _local3 = s;
var tempStr = "";
var _local1 = 0;
var _local2;
if (((s == undefined) || (s == null)) || (s.length == 0)) {
return(s);
}
if (_local3.indexOf(searchStr) != -1) {
while (_local2 = _local3.indexOf(searchStr, _local1) , _local2 != -1) {
tempStr = tempStr + _local3.substring(_local1, _local2);
tempStr = tempStr + replaceStr;
_local1 = _local2 + searchStr.length;
}
return(tempStr + _local3.substring(_local1));
}
return(_local3);
}
function trimAllInArray(a) {
var _local2 = a;
var _local3 = this;
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local3.trim(_local2[_local1]);
_local1++;
}
return(_local2);
}
var naughtyCheckURL = "/common/checker.aspx";
}
Symbol 1021 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = func;
var _local3 = arguments;
var _local1 = function () {
var _local1 = arguments;
var _local2 = _local1.callee.target;
var _local3 = _local1.callee.func;
return(_local3.apply(_local2, _local1));
};
_local1.target = obj;
_local1.func = _local2;
return(_local1);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1022 MovieClip [__Packages.mattel.data.FlashTrack] Frame 0
class mattel.data.FlashTrack
{
var oParams, sPopupName, sPopupProps, sRedirectLink, sDomain;
function FlashTrack (t, autoTrack, u) {
var _local1 = this;
_local1.init();
if (t != undefined) {
var _local2 = Stringer.replace(t, " ", "+");
var _local3 = ((u == null) ? ((_local2 + ".") + _local1.sDefaultURIExtension) : (Stringer.replace(u, " ", "+")));
_local1.__set__title(_local2);
_local1.__set__uri(_local3);
if (autoTrack) {
_local1.doAutoTrack();
}
}
}
function set campaignID(val) {
oParams.campaignID = Stringer.trim(val);
//return(campaignID);
}
function get campaignID() {
return(oParams.campaignID);
}
function set contentGroup(val) {
oParams.contentGroup = Stringer.trim(val);
//return(contentGroup);
}
function get contentGroup() {
return(oParams.contentGroup);
}
function set defaultURIExtension(val) {
sDefaultURIExtension = Stringer.trim(val);
//return(defaultURIExtension);
}
function get defaultURIExtension() {
return(sDefaultURIExtension);
}
function set enabled(val) {
setEnabled(val);
//return(enabled);
}
function get enabled() {
return(getEnabled());
}
function get parameters() {
return(oParams);
}
function set popupName(val) {
sPopupName = Stringer.trim(val);
//return(popupName);
}
function get popupName() {
return(sPopupName);
}
function set popupProps(val) {
sPopupProps = Stringer.trim(val);
//return(popupProps);
}
function get popupProps() {
return(sPopupProps);
}
function set redirectLink(val) {
sRedirectLink = Stringer.trim(val);
//return(redirectLink);
}
function get redirectLink() {
return(sRedirectLink);
}
function set title(val) {
oParams.title = Stringer.trim(val);
//return(title);
}
function get title() {
return(oParams.title);
}
function set uri(val) {
oParams.uri = Stringer.trim(val);
//return(uri);
}
function get uri() {
return(oParams.uri);
}
function set dcsuri(val) {
uri = (val);
//return(dcsuri);
}
function get dcsuri() {
return(uri);
}
function set ti(val) {
title = (val);
//return(ti);
}
function get ti() {
return(title);
}
static function setEnabled(b) {
bEnabled = b || (b == undefined);
}
static function getEnabled() {
return(bEnabled);
}
static function initialize(optFlag) {
if (optFlag == null) {
bEnabled = true;
} else {
bEnabled = optFlag;
}
}
function setProperty(pName, pVal) {
oParams[pName] = pVal;
}
function getProperty(pName) {
return(oParams[pName]);
}
function track() {
return(_track("FlashTrack"));
}
function trackRedir(rLink) {
var _local1 = this;
if (rLink != null) {
_local1.__set__redirectLink(rLink);
}
if (_local1.sRedirectLink.length == 0) {
_local1.traceOutput(new mattel.data.exceptions.MissingTrackingURLException());
return(false);
}
return(_local1._track("FlashTrackRedir"));
}
function trackRedirPopup(rLink, pProps, pName) {
var _local1 = this;
if (rLink != null) {
_local1.__set__redirectLink(rLink);
}
if (pProps != null) {
_local1.__set__popupProps(pProps);
}
if (pName != null) {
_local1.__set__popupName(pName);
}
if (_local1.sRedirectLink.length == 0) {
_local1.traceOutput(new mattel.data.exceptions.MissingTrackingURLException());
return(false);
}
if (_local1.sPopupProps.length == 0) {
_local1.traceOutput(new mattel.data.exceptions.MissingPopupPropsException());
}
return(_local1._track("FlashTrackRedirPopup"));
}
function trackCustom(action, parameters) {
var _local2 = parameters;
var _local3 = this;
if (action == null) {
return(false);
}
if (_local2 != null) {
var _local1;
for (_local1 in _local2) {
_local3.oParams[_local1] = _local2[_local1];
}
}
_local3._track(action);
return(undefined);
}
function serialize() {
var _local3 = this;
var serStr = (("'version','" + version) + "'");
if (_local3.sRedirectLink != null) {
serStr = serStr + ((",'redirectLink','" + _local3.sRedirectLink) + "'");
}
if (_local3.sPopupName != null) {
serStr = serStr + ((",'popupName','" + _local3.sPopupName) + "'");
}
if (_local3.sPopupProps != null) {
serStr = serStr + ((",'popupProps','" + _local3.sPopupProps) + "'");
}
var _local1;
for (_local1 in _local3.oParams) {
var _local2 = _local1;
var pVal = Stringer.replace(Stringer.replace(_local3.oParams[_local1], "'", "\\'"), "\"", "\\\"");
serStr = serStr + ((((",'" + _local2) + "','") + pVal) + "'");
}
return(serStr);
}
function init() {
var _local1 = this;
var _local2 = new Date();
_local1.oFileInfo = new mattel.system.FileInfo(_root);
_local1.oParams = new Object();
_local1.sSWFID = ((("__" + _local1.oFileInfo.__get__fileName()) + (FTCount++)) + _local2.getTime()) + "__";
_local1.lcSend = new LocalConnection();
_local1.lcReceive = new LocalConnection();
_local1.lcReceive.enable = mx.utils.Delegate.create(_local1, _local1.lcSetEnabled);
_local1.lcReceive.allowDomain = _local1.allowDomain;
_local1.lcReceive.allowInsecureDomain = _local1.allowInsecureDomain;
_local1.lcReceive.connect(_local1.sSWFID);
_local1.lcSend.onStatus = mx.utils.Delegate.create(_local1, _local1.onLCSenderStatus);
_local1.lcSend.send(FTConnect, "initialize", _local1.sSWFID, _local1.oFileInfo.__get__fileName());
}
function traceOutput(val) {
var _local1 = this;
if (_local1.bLCConnected) {
var _local2 = (("<i><b>[" + _local1.oFileInfo.__get__fileName()) + "]</b></i> ") + val.message;
_local1.lcSend.send(FTConnect, "trace", _local1.sSWFID, _local2);
}
}
function doAutoTrack() {
var _local1 = this;
clearInterval(_local1.intTrack);
_local1.intTrack = setInterval(_local1, "track", 1000);
}
function _track(action) {
var _local1 = this;
clearInterval(_local1.intTrack);
if (!_local1.bLCAttemptMade) {
_local1.sPendingCall = action;
return(false);
}
if ((_local1.__get__title().length == 0) || (_local1.__get__title() == undefined)) {
_local1.traceOutput(new mattel.data.exceptions.InvalidTrackingDataException());
return(false);
}
var _local2;
for (_local2 in _local1.oParams) {
_local1.oParams[_local2] = Stringer.replace(String(_local1.oParams[_local2]), " ", "+");
}
if ((_local1.__get__uri().length == 0) || (_local1.__get__uri() == undefined)) {
_local1.traceOutput(new mattel.data.exceptions.MissingURIException());
_local1.__set__uri(_local1.extractURI());
}
var jsParams = _local1.serialize();
var _local3 = new mattel.data.exceptions.FlashTrackExecutedNotice();
_local3.message = _local3.message + (((((("<ul><li><b>details:</b> " + action) + "( ") + jsParams) + " );</li><li><b>javascript enabled:</b> ") + bEnabled) + "</li></ul>");
_local1.traceOutput(_local3);
if (bEnabled) {
getURL (((("javascript:" + action) + "( ") + jsParams) + " );");
}
return(bEnabled);
}
function extractURI() {
var _local2 = this;
var _local3 = _local2.oFileInfo.__get__fileDirectory();
var _local1 = _local2.oFileInfo.__get__fileName();
_local1 = _local1.slice(0, _local1.lastIndexOf(".", _local1.length));
return(((((_local3 + _local1) + "_") + _local2.__get__title()) + ".") + _local2.sDefaultURIExtension);
}
function handlePendingCall() {
var _local1 = this;
if (_local1.sPendingCall != undefined) {
clearInterval(_local1.intPending);
_local1.intPending = setInterval(_local1, "trackPendingCall", 250);
}
}
function trackPendingCall() {
var _local1 = this;
clearInterval(_local1.intPending);
_root.txtOutput.text = _root.txtOutput.text + (("handlePendingCall -> sPendingCall: " + _local1.sPendingCall) + newline);
_local1._track(_local1.sPendingCall);
delete _local1.sPendingCall;
}
function allowDomain(sendingDomain) {
sDomain = sendingDomain;
return(true);
}
function allowInsecureDomain(sendingDomain) {
sDomain = sendingDomain;
return(true);
}
function lcSetEnabled(b) {
bLCConnected = true;
setEnabled(b);
handlePendingCall();
}
function onLCSenderStatus(oInfo) {
var _local1 = this;
delete _local1.lcSend.onStatus;
_local1.bLCAttemptMade = true;
_local1.bLCConnected = oInfo.level == "status";
if (!_local1.bLCConnected) {
_local1.handlePendingCall();
} else {
_local1.lcSend.send(FTConnect, "getEnabled", _local1.sSWFID);
}
}
static var bEnabled = true;
static var FTConnect = mattel.panels.connections.FlashTrackPanelConnect.lcName;
static var FTCount = 0;
static var Stringer = new mattel.data.NRStringExtensions();
var sDefaultURIExtension = "ftrk";
var bLCAttemptMade = false;
var bLCConnected = false;
static var version = "2.0.1";
}
Symbol 1023 MovieClip [__Packages.mattel.system.FileInfo] Frame 0
class mattel.system.FileInfo
{
var mcTarget, sFilePath, sFileName, sFileDirectory;
function FileInfo (targ) {
mcTarget = ((targ == undefined) ? (_root) : (targ));
extractFileInfo();
}
function get filePath() {
return(sFilePath);
}
function get fileName() {
return(sFileName);
}
function get fileDirectory() {
return(sFileDirectory);
}
function extractFileInfo() {
var _local2 = unescape(mcTarget._url);
var _local1 = "";
var len = _local2.length;
var fileIdx = _local2.indexOf(":///");
if (fileIdx == -1) {
var _local3 = _local2.indexOf("://");
if (_local3 == -1) {
_local1 = _local2;
} else {
var slashIdx = _local2.indexOf("/", _local3 + 3);
if (slashIdx == -1) {
_local1 = _local2.slice(_local3 + 3, len);
} else {
_local1 = _local2.slice(slashIdx, len);
}
}
} else {
_local1 = _local2.slice(fileIdx + 4, _local2.length);
}
var lastSlashIdx = _local1.lastIndexOf("/", _local1.length);
sFilePath = _local1;
sFileName = _local1.slice(lastSlashIdx + 1, _local1.length);
sFileDirectory = _local1.slice(0, lastSlashIdx + 1);
}
}
Symbol 1024 MovieClip [__Packages.mattel.data.exceptions.MissingTrackingURLException] Frame 0
class mattel.data.exceptions.MissingTrackingURLException extends Error
{
var message;
function MissingTrackingURLException () {
super();
message = "<font color='#990000'><b>ERROR:</b> No redirectLink specified.</font><ul><li>FlashTrack requires a redirect url when calling trackRedir() or trackRedirPopup().</li></ul>";
}
var name = "MissingTrackingURLException";
}
Symbol 1025 MovieClip [__Packages.mattel.data.exceptions.MissingPopupPropsException] Frame 0
class mattel.data.exceptions.MissingPopupPropsException extends Error
{
var message;
function MissingPopupPropsException () {
super();
message = "<font color='#FF6600'><b>WARNING:</b> No popupProps specified.</font><ul><li>It is recommended that popup properties be defined when calling trackRedirPopup().</li></ul>";
}
var name = "MissingPopupPropsException";
}
Symbol 1026 MovieClip [__Packages.mattel.data.exceptions.InvalidTrackingDataException] Frame 0
class mattel.data.exceptions.InvalidTrackingDataException extends Error
{
var message;
function InvalidTrackingDataException () {
super();
message = "<font color='#990000'><b>ERROR:</b> FlashTrack requires a title.</font><ul><li>Tracking calls to this instance will not be executed without a title.</li></ul>";
}
var name = "InvalidTrackingDataException";
}
Symbol 1027 MovieClip [__Packages.mattel.data.exceptions.MissingURIException] Frame 0
class mattel.data.exceptions.MissingURIException extends Error
{
var message;
function MissingURIException () {
super();
message = "<font color='#FF6600'><b>WARNING:</b> No URI specified;</font><ul><li>URI will be generated from the _root._url property. It is highly recommended that a URI be defined for all FlashTrack instances.</li></ul>";
}
var name = "MissingURIException";
}
Symbol 1028 MovieClip [__Packages.mattel.data.exceptions.FlashTrackExecutedNotice] Frame 0
class mattel.data.exceptions.FlashTrackExecutedNotice extends Error
{
var message;
function FlashTrackExecutedNotice () {
super();
message = "<font color='#339900'>FlashTrack executed.</font>";
}
var name = "FlashTrackExecutedNotice";
}
Symbol 1029 MovieClip [__Packages.smashing.Base] Frame 0
class smashing.Base
{
static var interval;
var aT, currentWorld;
function Base () {
if (interval != null) {
clearInterval(interval);
interval = null;
}
aT = [];
}
function get playing() {
return(bPlay);
}
function play() {
var _local1 = this;
if (interval == null) {
_local1.bPlay = true;
_local1.last = getTimer();
interval = setInterval(function (o) {
o.update();
}, 0, _local1);
_local1.currentWorld.onPlay();
}
}
function pause() {
if (interval != null) {
bPlay = false;
clearInterval(interval);
interval = null;
currentWorld.onPause();
}
}
function update(o) {
var _local2 = this;
var nCurrent = getTimer();
var nElapsed = ((nCurrent - _local2.last) / 1000);
_local2.currentWorld.update(nElapsed);
_local2.last = nCurrent;
if (_local2.aT.length > 4) {
var _local3;
_local3 = 0;
var _local1 = 0;
while (_local1 < _local2.aT.length) {
_local3 = _local3 + _local2.aT[_local1];
_local1++;
}
_root.nDebug0 = _local3 / _local2.aT.length;
_local2.aT = [];
}
_local2.aT.push(nElapsed);
}
function setWorld(oWorld) {
var _local1 = this;
if (oWorld != null) {
_local1.currentWorld.onExit();
_local1.currentWorld = oWorld;
_local1.currentWorld.onEnter();
}
}
static function hey() {
}
var bPlay = false;
}
Symbol 1030 MovieClip [__Packages.smashing.World] Frame 0
interface smashing.World{}
Symbol 1031 MovieClip [__Packages.smashing.Viewport] Frame 0
class smashing.Viewport
{
static var x, y, centerX, centerY, startX, startY, render;
function Viewport () {
}
static function init() {
Stage.scaleMode = "showAll";
x = Stage.width / 2;
y = Stage.height / 2;
centerX = x;
centerY = y;
startX = x;
startY = y;
render = renderHigh;
Stage.scaleMode = "noScale";
}
static function initLow() {
Stage.scaleMode = "showAll";
x = Stage.width / 2;
y = Stage.height / 2;
centerX = x;
centerY = y;
startX = x;
startY = y;
render = renderHigh;
Stage.scaleMode = "noScale";
}
static function getPos(o) {
var _local2 = o;
var _local1 = new smashing.RenderResult();
var xd = (_local2.x - x);
var yd = (_local2.y - y);
var _local3 = _local2.z - z;
_local1.x = xd;
_local2.mpX = xd;
_local1.y = yd;
_local2.mpY = yd;
_local1.scale = focal / (focal + _local3);
_local2.mpZ = _local3;
return(_local1);
}
static function localize(p) {
var _local1 = p;
return(new smashing.FastPoint3D(_local1.x - x, _local1.y - y, _local1.z - z));
}
static function getFocal(p) {
var _local3 = p;
var _local1 = new smashing.FastPoint3D(_local3.x - x, _local3.y - y, _local3.z - z);
var _local2 = focal / (focal + _local1.z);
return(new smashing.FastPoint((_local1.x * _local2) + centerX, (_local1.y * _local2) + centerY));
}
static function getScaleMod(zd) {
return(focal / (focal + zd));
}
static function renderHigh(o) {
var _local1 = o;
if (_local1.changed == true) {
var _local2 = z + _local1.z;
_local1._x = ((_local1.x - x) / _local2) + centerX;
_local1._y = ((_local1.y - y) / _local2) + centerY;
}
}
static function renderLow(o) {
var _local1 = o;
if (_local1.changed == true) {
_local1._x = (_local1.x - x) + centerX;
_local1._y = (_local1.y - y) + centerY;
}
}
static function reset() {
x = startX;
y = startY;
z = 0;
}
static var z = 0;
static var focal = 1300;
static var variance = 80;
}
Symbol 1032 MovieClip [__Packages.smashing.FastPoint3D] Frame 0
class smashing.FastPoint3D
{
var x, y, z;
function FastPoint3D (x, y, z) {
var _local1 = this;
_local1.x = Number(x);
_local1.y = Number(y);
_local1.z = Number(z);
}
function get length() {
var _local1 = this;
var _local2 = Math.sqrt(((_local1.x * _local1.x) + (_local1.y * _local1.y)) + (_local1.z * _local1.z));
return(_local2);
}
function set length(newLength) {
var _local1 = this;
if (_local1.__get__length() != 0) {
var _local2 = newLength / _local1.__get__length();
_local1.x = _local1.x * _local2;
_local1.y = _local1.y * _local2;
_local1.z = _local1.z * _local2;
}
//return(_local1.__get__length());
}
function get lengthSqu() {
var _local1 = this;
return(((_local1.x * _local1.x) + (_local1.y * _local1.y)) + (_local1.z * _local1.z));
}
function addPoint(p) {
var _local1 = p;
var _local2 = this;
return(new smashing.FastPoint3D(_local1.x + _local2.x, _local1.y + _local2.y, _local1.z + _local2.z));
}
function subtractPoint(p) {
var _local1 = p;
var _local2 = this;
return(new smashing.FastPoint3D(_local2.x - _local1.x, _local2.y - _local1.y, _local2.z - _local1.z));
}
function addScalar(n) {
var _local1 = n;
var _local2 = this;
return(new smashing.FastPoint3D(_local2.x + _local1, _local2.y + _local1, _local2.z + _local1));
}
function subtractScalar(n) {
var _local1 = n;
var _local2 = this;
return(new smashing.FastPoint3D(_local2.x - _local1, _local2.y - _local1, _local2.z - _local1));
}
function dot(p) {
var _local1 = p;
var _local2 = this;
return(((_local2.x * _local1.x) + (_local2.y * _local1.y)) + (_local2.z * _local1.z));
}
function copy() {
var _local1 = this;
return(new smashing.FastPoint3D(_local1.x, _local1.y, _local1.z));
}
function cross(v) {
var _local1 = v;
var _local2 = this;
if (!_local1) {
_local1 = new smashing.FastPoint3D(0, 0, 0);
}
return(new smashing.FastPoint3D((_local2.y * _local1.z) - (_local2.z * _local1.y), (_local2.z * _local1.x) - (_local2.x * _local1.z), (_local2.x * _local1.y) - (_local2.y * _local1.x)));
}
function normalize() {
var _local1 = this;
if (((!_local1.x) && (!_local1.y)) && (!_local1.z)) {
} else {
var _local2 = _local1.__get__length();
_local1.x = _local1.x / _local2;
_local1.y = _local1.y / _local2;
_local1.z = _local1.z / _local2;
}
}
function multiply(n) {
var _local1 = n;
var _local2 = this;
return(new smashing.FastPoint3D(_local2.x * _local1, _local2.y * _local1, _local2.z * _local1));
}
function divide(n) {
var _local1 = n;
var _local2 = this;
if (_local1 == 0) {
return(new smashing.FastPoint3D(0, 0, 0));
}
return(new smashing.FastPoint3D(_local2.x / _local1, _local2.y / _local1, _local2.z / _local1));
}
function reverse() {
var _local1 = this;
return(new smashing.FastPoint3D(-_local1.x, -_local1.y, -_local1.z));
}
function equals(p) {
var _local1 = p;
var _local2 = this;
if (((_local2.x == _local1.x) && (_local2.y == _local1.y)) && (_local2.z == _local1.z)) {
return(true);
}
return(false);
}
function zero() {
var _local1 = this;
_local1.x = 0;
_local1.y = 0;
_local1.z = 0;
}
function distSqu(p) {
var _local3 = p.x - x;
var _local2 = p.y - y;
var _local1 = (p.z = z);
return(((_local3 * _local3) + (_local2 * _local2)) + (_local1 * _local1));
}
function toString() {
var _local1 = this;
return(((((("FastPoint3D(" + _local1.x) + ",") + _local1.y) + ",") + _local1.z) + ")");
}
}
Symbol 1033 MovieClip [__Packages.smashing.Renderable] Frame 0
class smashing.Renderable extends MovieClip
{
function Renderable () {
super();
}
function set scale(n) {
var _local1 = this;
_local1._xscale = n;
_local1._yscale = n;
//return(_local1.__get__scale());
}
function render() {
var _local3 = this;
var _local1 = smashing.Viewport.getPos(_local3);
if (_local1 != undefined) {
var _local2 = _local1.scale;
if (_local1.x != undefined) {
_local3._x = (_local1.x * _local2) + smashing.Viewport.centerX;
}
if (_local1.y != undefined) {
_local3._y = (_local1.y * _local2) + smashing.Viewport.centerY;
}
if (_local2 != _local3.mpScale) {
_local3.mpScale = _local2;
_local3.__set__scale((_local2 / _local3.scaleMod) * 100);
}
}
}
var mpX = 16777215;
var mpY = 16777215;
var mpZ = 16777215;
var mpScale = 16777215;
var mScale = 100;
var changed = true;
var scaleMod = 1;
}
Symbol 1034 MovieClip [__Packages.smashing.RenderResult] Frame 0
class smashing.RenderResult
{
function RenderResult () {
}
function toString() {
var _local1 = this;
return(((((("[class RenderResult, x:" + _local1.x) + ", y:") + _local1.y) + " scale:") + _local1.scale) + "]");
}
}
Symbol 1035 MovieClip [__Packages.smashing.FastPoint] Frame 0
class smashing.FastPoint
{
var x, y;
function FastPoint (x, y) {
this.x = Number(x);
this.y = Number(y);
}
function get length() {
var _local1 = this;
var _local2 = Math.sqrt((_local1.x * _local1.x) + (_local1.y * _local1.y));
return(_local2);
}
function set length(newLength) {
var _local1 = this;
if (_local1.__get__length() != 0) {
var _local2 = newLength / _local1.__get__length();
_local1.x = _local1.x * _local2;
_local1.y = _local1.y * _local2;
}
//return(_local1.__get__length());
}
function get lengthSqu() {
var _local1 = this;
return((_local1.x * _local1.x) + (_local1.y * _local1.y));
}
function addPoint(p) {
return(new smashing.Point(p.__get__x() + x, p.__get__y() + y));
}
function subtractPoint(p) {
return(new smashing.Point(x - p.__get__x(), y - p.__get__y()));
}
function addScalar(n) {
return(new smashing.Point(x + n, y + n));
}
function subtractScalar(n) {
return(new smashing.Point(x - n, y - n));
}
function dot(p) {
return((x * p.__get__x()) + (y * p.__get__y()));
}
function copy() {
return(new smashing.Point(x, y));
}
function cross() {
return(new smashing.Point(y, -x));
}
function normalize() {
var _local1 = this;
if ((!_local1.x) && (!_local1.y)) {
} else {
var _local2 = _local1.__get__length();
_local1.x = _local1.x / _local2;
_local1.y = _local1.y / _local2;
}
}
function multiply(nFactor) {
var _local1 = copy();
_local1.x = _local1.x * nFactor;
_local1.y = _local1.y * nFactor;
return(_local1);
}
function divide(scalar) {
var _local2 = scalar;
var _local1 = copy();
if (_local2 == 0) {
_local1.x = 0;
_local1.y = 0;
} else {
_local1.x = _local1.x / _local2;
_local1.y = _local1.y / _local2;
return(_local1);
}
return(undefined);
}
function reverse() {
var _local1 = new smashing.Point(x * -1, y * -1);
return(_local1);
}
function rotate(nRad) {
var _local1 = this;
var nLength = _local1.__get__length();
var _local3 = Math.sin(nRad);
var _local2 = Math.cos(nRad);
if ((_local3 > 1) || (_local3 < -1)) {
}
if ((_local2 > 1) || (_local2 < -1)) {
}
_local1.x = (_local1.x * _local2) + (_local1.y * (-_local3));
_local1.y = (_local1.x * _local3) + (_local1.y * _local2);
_local1.__set__length(nLength);
}
function rotateSinCos(nSin, nCos) {
var _local1 = this;
_local1.x = (_local1.x * nCos) + (_local1.y * (-nSin));
_local1.y = (_local1.x * nSin) + (_local1.y * nCos);
}
function findCosine(vOther) {
var _local2 = dot(vOther);
var _local1 = length * vOther.__get__length();
var _local3 = _local2 / _local1;
return(_local3);
}
function equals(p) {
if ((x == p.__get__x()) && (y == p.__get__y())) {
return(true);
}
return(false);
}
function zero() {
x = 0;
y = 0;
}
function distSqu(p) {
var _local2 = p.__get__x() - x;
var _local1 = p.__get__y() - y;
return((_local2 * _local2) + (_local1 * _local1));
}
function toString() {
return(((("FastPoint (" + x) + ",") + y) + ")");
}
}
Symbol 1036 MovieClip [__Packages.smashing.Point] Frame 0
class smashing.Point
{
var m_x, m_y;
function Point (x, y) {
m_x = Number(x);
m_y = Number(y);
}
function get x() {
return(m_x);
}
function set x(n) {
var _local1 = this;
_local1.m_x = Number(n);
_local1.m_bChanged = true;
//return(_local1.__get__x());
}
function get y() {
return(m_y);
}
function set y(n) {
var _local1 = this;
_local1.m_y = Number(n);
_local1.m_bChanged = true;
//return(_local1.__get__y());
}
function get length() {
var _local1 = this;
var _local2;
if (_local1.m_bChanged == true) {
_local1.m_bChanged = false;
_local1.m_nLength = Math.sqrt((_local1.__get__x() * _local1.__get__x()) + (_local1.__get__y() * _local1.__get__y()));
_local2 = _local1.m_nLength;
} else {
_local2 = _local1.m_nLength;
}
return(_local2);
}
function set length(newLength) {
var _local1 = this;
if (_local1.__get__length() != 0) {
var _local2 = newLength / _local1.__get__length();
_local1.m_nLength = newLength;
_local1.m_bChanged = false;
_local1.x = _local1.x * _local2;
_local1.y = _local1.y * _local2;
}
//return(_local1.__get__length());
}
function get lengthSqu() {
var _local1 = this;
return((_local1.m_x * _local1.m_x) + (_local1.m_y * _local1.m_y));
}
function addPoint(p) {
x = x + p.x;
y = y + p.y;
}
function subtractPoint(p) {
x = x - p.x;
y = y - p.y;
}
function addScalar(n) {
x = x + n;
y = y + n;
}
function subtractScalar(n) {
x = x - n;
y = y - n;
}
function dot(p) {
return((x * p.__get__x()) + (y * p.__get__y()));
}
function copy() {
return(new smashing.Point(x, y));
}
function cross() {
return(new smashing.Point(y, -x));
}
function normalize() {
var _local1 = this;
if ((!_local1.__get__x()) && (!_local1.__get__y())) {
}
var _local2 = _local1.__get__length();
_local1.x = _local1.x / _local2;
_local1.y = _local1.y / _local2;
}
function multiply(n) {
x = x * n;
y = y * n;
}
function divide(scalar) {
var _local1 = scalar;
if (_local1 == 0) {
} else {
x = x / _local1;
y = y / _local1;
}
}
function reverse() {
x = x * -1;
y = y * -1;
}
function rotate(nRad) {
var _local1 = this;
var nLength = _local1.__get__length();
var _local3 = Math.sin(nRad);
var _local2 = Math.cos(nRad);
if ((_local3 > 1) || (_local3 < -1)) {
}
if ((_local2 > 1) || (_local2 < -1)) {
}
_local1.__set__x((_local1.__get__x() * _local2) + (_local1.__get__y() * (-_local3)));
_local1.__set__y((_local1.__get__x() * _local3) + (_local1.__get__y() * _local2));
_local1.__set__length(nLength);
}
function rotateSinCos(nSin, nCos) {
var _local1 = this;
_local1.__set__x((_local1.__get__x() * nCos) + (_local1.__get__y() * (-nSin)));
_local1.__set__y((_local1.__get__x() * nSin) + (_local1.__get__y() * nCos));
}
function findCosine(vOther) {
var _local2 = dot(vOther);
var _local1 = length * vOther.__get__length();
var _local3 = _local2 / _local1;
return(_local3);
}
function equals(p) {
if ((x == p.__get__x()) && (y == p.__get__y())) {
return(true);
}
return(false);
}
function zero() {
var _local1 = this;
_local1.m_x = 0;
_local1.m_y = 0;
_local1.m_bChanged = true;
}
function distSqu(p) {
var _local2 = p.__get__x() - x;
var _local1 = p.__get__y() - y;
return((_local2 * _local2) + (_local1 * _local1));
}
function toString() {
return(((("Point (" + x) + ",") + y) + ")");
}
var m_bChanged = true;
var m_nLength = 0;
}
Symbol 1037 MovieClip [__Packages.hotwheels.Email] Frame 0
class hotwheels.Email
{
var newRoot, fromName_txt, toName_txt, toEmail_txt, word;
function Email (tmpRoot) {
var _local1 = tmpRoot;
newRoot = _local1;
_local1.emailform_mc.error_fromName_naughty._visible = false;
_local1.emailform_mc.error_fromName_blank._visible = false;
_local1.emailform_mc.error_toName_naughty._visible = false;
_local1.emailform_mc.error_toName_blank._visible = false;
_local1.emailform_mc.error_toEmail_bad._visible = false;
_local1.emailform_mc.error_toEmail_naughty._visible = false;
_local1.emailform_mc.error_toEmail_blank._visible = false;
}
function validate() {
var _local1 = this;
_local1.word = new hotwheels.WordCheck();
_local1.getWord().setWord(_local1.getFromName_txt());
if (_local1.getWord().isNaughty()) {
_local1.newRoot.emailform_mc.error_fromName_naughty._visible = true;
_local1.newRoot.emailform_mc.error_fromName_blank._visible = false;
return(false);
}
if (_local1.getWord().isNull()) {
_local1.newRoot.emailform_mc.error_fromName_naughty._visible = false;
_local1.newRoot.emailform_mc.error_fromName_blank._visible = true;
return(false);
}
if ((!_local1.getWord().isNaughty()) && (!_local1.getWord().isNull())) {
_local1.newRoot.emailform_mc.error_fromName_naughty._visible = false;
_local1.newRoot.emailform_mc.error_fromName_blank._visible = false;
}
_local1.getWord().setWord(_local1.getToName_txt());
if (_local1.getWord().isNaughty()) {
_local1.newRoot.emailform_mc.error_toName_naughty._visible = true;
_local1.newRoot.emailform_mc.error_toName_blank._visible = false;
return(false);
}
if (_local1.getWord().isNull()) {
_local1.newRoot.emailform_mc.error_toName_naughty._visible = true;
_local1.newRoot.emailform_mc.error_toName_blank._visible = false;
return(false);
}
if ((!_local1.getWord().isNaughty()) && (!_local1.getWord().isNull())) {
_local1.newRoot.emailform_mc.error_toName_naughty._visible = false;
_local1.newRoot.emailform_mc.error_toName_blank._visible = false;
}
_local1.getWord().setWord(_local1.getToEmail_txt());
if (_local1.getWord().isNaughty()) {
_local1.newRoot.emailform_mc.error_toEmail_naughty._visible = true;
_local1.newRoot.emailform_mc.error_toEmail_blank._visible = false;
_local1.newRoot.emailform_mc.error_toEmail_bad._visible = false;
return(false);
}
if (_local1.getWord().isNull()) {
_local1.newRoot.emailform_mc.error_toEmail_naughty._visible = false;
_local1.newRoot.emailform_mc.error_toEmail_blank._visible = true;
_local1.newRoot.emailform_mc.error_toEmail_bad._visible = false;
return(false);
}
if (!_local1.getWord().isEmail()) {
_local1.newRoot.emailform_mc.error_toEmail_naughty._visible = false;
_local1.newRoot.emailform_mc.error_toEmail_blank._visible = false;
_local1.newRoot.emailform_mc.error_toEmail_bad._visible = true;
return(false);
}
if (((!_local1.getWord().isNaughty()) && (!_local1.getWord().isNull())) && (_local1.getWord().isEmail())) {
_local1.newRoot.emailform_mc.error_toEmail_naughty._visible = false;
_local1.newRoot.emailform_mc.error_toEmail_blank._visible = false;
_local1.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 1038 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() {
var _local2 = this;
_local2.getWord().toString().toLowerCase().replace("-", " ").replace("_", " ");
if (_local2.getWord() != "") {
var s_array = _local2.getWord().toString().toLowerCase().split(" ");
var _local3 = 0;
var _local1 = 0;
while (_local3 < s_array.length) {
_local1 = 0;
while (_local1 < _local2.exactNaughtyWords.length) {
if (s_array[_local3] == _local2.exactNaughtyWords[_local1]) {
return(true);
}
_local1++;
}
_local1 = 0;
while (_local1 < _local2.searchNaughtyWords.length) {
if (s_array[_local3].indexOf(_local2.searchNaughtyWords[_local1]) != -1) {
return(true);
}
_local1++;
}
_local3++;
}
}
return(false);
}
function lTrim() {
var _local2 = getWord().toString();
var _local1 = 0;
var _local3 = _local2.length;
while ((_local1 < _local3) && (_local2.charCodeAt(_local1) <= 32)) {
_local1++;
}
setWord(_local2.substring(_local1, _local3));
return(_local2.substring(_local1, _local3));
}
function rTrim() {
var _local2 = getWord().toString();
var _local1 = _local2.length - 1;
while ((_local1 >= 0) && (_local2.charCodeAt(_local1) <= 32)) {
_local1--;
}
setWord(_local2.substring(0, _local1 + 1));
return(_local2.substring(0, _local1 + 1));
}
function trim() {
var _local2 = this;
var _local1 = _local2.getWord().toString();
_local1 = _local2.lTrim();
_local1 = _local2.rTrim();
return(_local1);
}
function isNull() {
var _local1 = trim();
return((_local1 == null) || (_local1.length == 0));
}
function isEmail() {
var _local2 = this;
if (_local2.getWord().length < 5) {
return(false);
}
var iChars = "*|,\":<>[]{}`';()&$#%";
var _local3 = _local2.getWord().length;
var _local1 = 0;
while (_local1 < _local3) {
if (iChars.indexOf(_local2.getWord().charAt(_local1)) != -1) {
return(false);
}
_local1++;
}
var atIndex = _local2.getWord().lastIndexOf("@");
if ((atIndex < 1) || (atIndex == (_local3 - 1))) {
return(false);
}
var pIndex = _local2.getWord().lastIndexOf(".");
if ((pIndex < 4) || (pIndex == (_local3 - 1))) {
return(false);
}
if (atIndex > pIndex) {
return(false);
}
return(true);
}
function replace(searchStr, replaceStr) {
var _local3 = getWord().toString();
var tempStr = "";
var _local1 = 0;
var _local2;
if (searchStr == "") {
return(_local3);
}
if (_local3.indexOf(searchStr) != -1) {
while (_local2 = _local3.indexOf(searchStr, _local1) , _local2 != -1) {
tempStr = tempStr + _local3.substring(_local1, _local2);
tempStr = tempStr + replaceStr;
_local1 = _local2 + searchStr.length;
}
return(tempStr + _local3.substring(_local1));
}
return(_local3);
}
function sprintf() {
var _local3 = toString();
var q = 0;
var _local2 = _local3.splitMultiChar("%s");
_local3 = "";
var _local1 = 0;
while (_local1 < _local2.length) {
_local3 = _local3 + (_local2[_local1] + arguments[_local1]);
_local1++;
}
if (!q) {
return(_local3);
}
return(_local3 + "?");
}
function splitMultiChar(c) {
var _local1 = getWord().toString();
_local1 = _local1.replace(c, "\u00B6");
var _local2 = _local1.split("\u00B6");
return(_local2);
}
function setWord(val) {
word = val;
}
function getWord() {
return(word);
}
}
Symbol 1039 MovieClip [__Packages.smashing.SoundHandler] Frame 0
class smashing.SoundHandler
{
function SoundHandler (loc) {
var _local3 = this;
_local3.location = loc;
_local3.aSnd = [];
var _local2;
var _local1 = 0;
while (_local1 < 8) {
_local2 = loc.createEmptyMovieClip("mcSnd" + _local1, _local1);
_local3.aSnd[_local1] = new Sound(_local2);
_local1++;
}
}
function playSnd(sId, vol) {
var _local2 = this;
var _local1 = _local2.aSnd[_local2.cSound];
_local1.stop();
if (vol != undefined) {
_local1.setVolume(vol);
} else {
_local1.setVolume(100);
}
_local1.attachSound(sId);
_local1.start();
_local2.cSound++;
if (_local2.cSound >= _local2.aSnd.length) {
_local2.cSound = 0;
}
return(_local1);
}
var cSound = 0;
}
Symbol 1040 MovieClip [__Packages.smashing.LoadWatcher] Frame 0
class smashing.LoadWatcher
{
var aStatus, bLoading, nCurrent;
function LoadWatcher (aPaths, aClips) {
var _local2 = this;
if (aPaths.length == aClips.length) {
_local2.aPaths = aPaths;
_local2.aClips = aClips;
_local2.aStatus = [];
var _local1 = 0;
while (_local1 < _local2.aClips.length) {
if (_local2.aClips[_local1] == undefined) {
}
_local2.aStatus[_local1] = smashing.LoadValues.UNREQUESTED;
_local1++;
}
_local2.nCurrent = 0;
}
}
function getFirstNonLoaded(nStart, nEnd) {
var _local3 = nEnd;
if (nStart == undefined) {
nStart = 0;
}
if (_local3 == undefined) {
_local3 = aStatus.length;
}
var _local2 = -1;
var _local1 = nStart;
while (_local1 < _local3) {
if (aStatus[_local1] == smashing.LoadValues.UNREQUESTED) {
_local2 = _local1;
break;
}
_local1++;
}
return(_local2);
}
function setFirstToLoad(nIndex) {
if (!bLoading) {
nCurrent = nIndex;
}
}
function loadNextMovie() {
var _local1 = this;
_local1.bLoading = true;
if (_local1.nInterval != undefined) {
clearInterval(_local1.nInterval);
}
var _local2 = _local1.getFirstNonLoaded(_local1.nCurrent);
if (_local2 == -1) {
_local2 = _local1.getFirstNonLoaded(0, _local1.nCurrent);
}
if (_local2 != -1) {
_local1.nCurrent = _local2;
_local1.aClips[_local1.nCurrent].loadMovie(_local1.aPaths[_local1.nCurrent]);
_local1.aStatus[_local1.nCurrent] = smashing.LoadValues.REQUESTED;
_local1.nInterval = setInterval(_local1.checkProgress, 30, _local1);
} else {
_local1.onAllClipsLoaded();
}
}
function getPercentLoaded(nIndex) {
var _local1 = nIndex;
var _local2 = this;
if ((_local2.aStatus[_local1] == smashing.LoadValues.LOADING) || (_local2.aStatus[_local1] == smashing.LoadValues.COMPLETE)) {
return(_local2.aClips[_local1].getBytesLoaded() / _local2.aClips[_local1].getBytesTotal());
}
return(0);
}
function checkProgress(oLoadWatcher) {
var _local1 = oLoadWatcher;
switch (_local1.aStatus[_local1.nCurrent]) {
case smashing.LoadValues.REQUESTED :
if (_local1.aClips[_local1.nCurrent].getBytesTotal() > 4) {
_local1.aStatus[_local1.nCurrent] = smashing.LoadValues.LOADING;
}
return;
case smashing.LoadValues.LOADING :
if (_local1.getPercentLoaded(_local1.nCurrent) != 1) {
break;
}
_local1.aStatus[_local1.nCurrent] = smashing.LoadValues.COMPLETE;
_local1.loadNextMovie();
return;
}
}
function delegateLoad(nIndex) {
return(undefined);
}
}
Symbol 1041 MovieClip [__Packages.smashing.LoadValues] Frame 0
class smashing.LoadValues
{
function LoadValues () {
}
static var UNREQUESTED = 0;
static var REQUESTED = 1;
static var LOADING = 2;
static var COMPLETE = 3;
}
Symbol 1042 MovieClip [__Packages.mx.remoting.NetServices] Frame 0
class mx.remoting.NetServices extends Object
{
static var defaultGatewayUrl, logger, traceNetServices;
function NetServices () {
super();
}
static function setDefaultGatewayUrl(url) {
defaultGatewayUrl = url;
}
static function setGatewayUrl(url) {
gatewayUrl = url;
}
static function createGatewayConnection(url, infoLogger) {
var _local1 = url;
logger = infoLogger;
if (_local1 == undefined) {
_local1 = gatewayUrl;
if (_local1 == undefined) {
_local1 = defaultGatewayUrl;
}
}
if (_local1 == undefined) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is undefined");
logger.logInfo(("NetServices: createGatewayConnection - gateway url <" + _local1) + "> is undefined", mx.services.Log.DEBUG);
return(null);
}
var _local2 = new mx.remoting.Connection();
_local2.connect(_local1);
__sharedConnections[_local1] = _local2;
return(_local2);
}
static function getConnection(uri) {
return(__sharedConnections[uri]);
}
static function getHostUrl() {
var _local2 = _root;
if (!isHttpUrl(_local2._url)) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
var _local1 = _local2._url.indexOf("/", 8);
if (_local1 < 0) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
return(_local2._url.substring(0, _local1));
}
static function isHttpUrl(url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
static function getHttpUrl(url) {
var _local1 = url;
if (!isHttpUrl(_local1)) {
_local1 = getHostUrl() + _local1;
}
return(_local1);
}
static function trace(who, severity, number, message) {
traceNetServices(who, severity, number, message);
}
static var version = "1.2.0.124";
static var gatewayUrl = _root.gatewayUrl;
static var __sharedConnections = new Array();
}
Symbol 1043 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
var _local1 = this;
var _local2 = level;
if (_local2 == undefined) {
_local2 = BRIEF;
}
if (_local2 <= _local1.level) {
if (_local2 == DEBUG) {
_local1.onLog((((_local1.getDateString() + " [DEBUG] ") + _local1.name) + ": ") + msg);
} else {
_local1.onLog((((_local1.getDateString() + " [INFO] ") + _local1.name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 1044 MovieClip [__Packages.mx.remoting.Connection] Frame 0
class mx.remoting.Connection extends NetConnection
{
var uri;
function Connection () {
super();
}
function getService(serviceName, client) {
var _local1 = new mx.remoting.NetServiceProxy(this, serviceName, client);
return(_local1);
}
function setCredentials(userId, password) {
addHeader("Credentials", false, {userid:userId, password:password});
}
function clone() {
var _local1 = new mx.remoting.Connection();
_local1.connect(uri);
return(_local1);
}
function getDebugId() {
return(null);
}
function getDebugConfig() {
return(null);
}
function setDebugId(id) {
}
function updateConfig() {
}
function call() {
super.call.apply(super, arguments);
}
function close() {
super.close();
}
function connect(url) {
return(super.connect(url));
}
function addHeader(name, mustUnderstand, obj) {
super.addHeader(name, mustUnderstand, obj);
}
function trace(traceObj) {
}
function AppendToGatewayUrl(urlSuffix) {
var _local1 = this;
_local1.__urlSuffix = urlSuffix;
if (_local1.__originalUrl == null) {
_local1.__originalUrl = _local1.uri;
}
var _local2 = _local1.__originalUrl + urlSuffix;
_local1.connect(_local2);
}
function ReplaceGatewayUrl(newUrl) {
connect(newUrl);
}
function RequestPersistentHeader(info) {
var _local1 = info;
addHeader(_local1.name, _local1.mustUnderstand, _local1.data);
}
static var version = "1.2.0.124";
}
Symbol 1045 MovieClip [__Packages.mx.remoting.NetServiceProxy] Frame 0
class mx.remoting.NetServiceProxy extends Object
{
var nc, client;
function NetServiceProxy (netC, servName, cli) {
var _local1 = this;
super();
if (netC != null) {
_local1.nc = netC;
_local1.serviceName = servName;
_local1.client = cli;
}
_local1._allowRes = true;
}
function _setParentService(service) {
nc = service.nc;
client = service.client;
}
function __resolve(methodName) {
var _local1 = this;
var _local2 = arguments;
if (_local1._allowRes) {
var _local3 = function () {
var _local1 = this;
var _local2 = arguments;
if (_local1.client != null) {
_local2.unshift(new mx.remoting.NetServiceProxyResponder(_local1, methodName));
} else if (typeof(_local2[0].onResult) != "function") {
mx.remoting.NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, and no responder was given in call to " + methodName);
_local2.unshift(new mx.remoting.NetServiceProxyResponder(_local1, methodName));
}
if (typeof(_local1.serviceName) == "function") {
_local1.serviceName = _local1.servicename;
}
_local2.unshift((_local1.serviceName + ".") + methodName);
return(_local1.nc.call.apply(_local1.nc, _local2));
};
return(_local3);
}
return(null);
}
static function registerNetServiceProxy() {
Object.registerClass("NetServiceProxy", mx.remoting.NetServiceProxy);
return(true);
}
static var init = registerNetServiceProxy();
var _allowRes = false;
}
Symbol 1046 MovieClip [__Packages.mx.remoting.NetServiceProxyResponder] Frame 0
class mx.remoting.NetServiceProxyResponder extends Object
{
var service, methodName;
function NetServiceProxyResponder (serv, method) {
super();
service = serv;
methodName = method;
}
function onResult(result) {
var _local2 = result;
var _local1 = service.client;
if ((_local2 instanceof mx.remoting.NetServiceProxy) || (_local2 instanceof mx.remoting.RecordSet)) {
_local2._setParentService(service);
}
var _local3 = methodName + "_Result";
if (typeof(_local1[_local3]) == "function") {
_local1[_local3].apply(_local1, [_local2]);
} else if (typeof(_local1.onResult) == "function") {
_local1.onResult(_local2);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + _local2);
}
}
function onStatus(result) {
var _local2 = result;
var _local1 = service.client;
var _local3 = methodName + "_Status";
if (typeof(_local1[_local3]) == "function") {
_local1[_local3].apply(_local1, [_local2]);
} else if (typeof(_local1.onStatus) == "function") {
_local1.onStatus(_local2);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(_local2);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(_local2);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 2, (((_local3 + " was received from server: <") + _local2.level) + "> ") + _local2.description);
}
}
}
Symbol 1047 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData{}
Symbol 1048 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange{}
Symbol 1049 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList{}
Symbol 1050 MovieClip [__Packages.mx.remoting.RecordSet] Frame 0
class mx.remoting.RecordSet extends Object
{
var mTitles, _items, mRecordSetID, dispatchEvent, gateway_conn, mDataFetcher;
function RecordSet (columnNames) {
var _local1 = this;
super();
mx.events.EventDispatcher.initialize(_local1);
_local1._items = new Array();
_local1.uniqueID = 0;
if (_local1.mTitles != null) {
} else {
if (_local1.serverInfo == null) {
if (_local1.serverinfo != null) {
_local1.serverInfo = _local1.serverinfo;
}
}
if (_local1.serverInfo == null) {
_local1.mTitles = columnNames;
} else if (_local1.serverInfo.version != 1) {
mx.remoting.NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
} else {
_local1.mTitles = _local1.serverInfo.columnNames;
_local1.mRecordsAvailable = 0;
_local1.setData(((_local1.serverInfo.cursor == null) ? 0 : (_local1.serverInfo.cursor - 1)), _local1.serverInfo.initialData);
if (_local1.serverInfo.initialData.length != _local1.serverInfo.totalCount) {
_local1.mRecordSetID = _local1.serverInfo.id;
if (_local1.mRecordSetID != null) {
_local1.serviceName = ((_local1.serverInfo.serviceName == null) ? "RecordSet" : (_local1.serverInfo.serviceName));
_local1.mTotalCount = _local1.serverInfo.totalCount;
_local1.mDeliveryMode = "ondemand";
_local1.mAllNotified = false;
_local1.mOutstandingRecordCount = 0;
} else {
mx.remoting.NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
_local1.serverInfo = null;
}
}
}
function addItem(item) {
addItemAt(length, item);
}
function addItemAt(index, item) {
var _local1 = index;
var _local2 = this;
var _local3 = true;
if ((_local1 < _local2.__get__length()) && (_local1 >= 0)) {
_local2.__get__items().splice(_local1, 0, item);
} else if (_local1 == _local2.__get__length()) {
_local2.__get__items()[_local1] = item;
} else {
_local3 = false;
mx.remoting.NetServices.trace("Cannot add an item outside the bounds of the RecordSet");
return;
}
if (_local3) {
item.__ID__ = _local2.uniqueID++;
}
_local2.updateViews("addItems", _local1, _local1);
}
function addEventListener(event, listener) {
}
function clear() {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
var _local2 = _local1.__get__items().length;
_local1.__get__items().splice(0);
_local1.uniqueID = 0;
_local1.updateViews("removeItems", 0, _local2);
}
}
function contains(itmToCheck) {
var _local2 = itmToCheck;
if (isObjectEmpty(_local2)) {
return(false);
}
var itemAtIndex;
var _local3;
var _local1 = 0;
while (_local1 < items.length) {
itemAtIndex = items[_local1];
_local3 = true;
for (var t in _local2) {
if (_local2[t] != itemAtIndex[t]) {
_local3 = false;
break;
}
}
if (_local3) {
return(true);
}
_local1++;
}
return(false);
}
function getColumnNames() {
return(mTitles);
}
function get columnNames() {
return(getColumnNames());
}
function getLocalLength() {
return(items.length);
}
function getLength() {
var _local1 = this;
if (_local1.mRecordSetID != null) {
return(_local1.mTotalCount);
}
return(_local1.__get__items().length);
}
function getIterator() {
var _local1 = new mx.remoting.RecordSetIterator(this);
return(_local1);
}
function get length() {
return(getLength());
}
function getItemAt(index) {
var _local1 = index;
var _local2 = this;
if ((_local1 < 0) || (_local1 >= _local2.__get__length())) {
return(null);
}
if (_local2.mRecordSetID == null) {
return(_local2.__get__items()[_local1]);
}
_local2.requestRecord(_local1);
var _local3 = _local2.__get__items()[_local1];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
}
function getItemID(index) {
return(items[index].__ID__);
}
function get items() {
return(_items);
}
function initialize(info) {
}
function filter(filterFunction, context) {
if (checkLocal()) {
} else {
var _local3 = new mx.remoting.RecordSet(mTitles);
var rcount = length;
var _local2 = 0;
while (_local2 < rcount) {
var _local1 = getItemAt(_local2);
if (((_local1 != null) && (_local1 != 1)) && (filterFunction(_local1, context))) {
_local3.addItem(_local1);
}
_local2++;
}
return(_local3);
}
return(undefined);
}
function sortItems(compareFunc, optionFlags) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
_local1.__get__items().sort(compareFunc, optionFlags);
_local1.updateViews("sort");
}
}
function sortItemsBy(fieldNames, order, optionFlags) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
if (typeof(order) == "string") {
_local1.__get__items().sortOn(fieldNames);
if (order.toUpperCase() == "DESC") {
_local1.__get__items().reverse();
}
} else {
_local1.__get__items().sortOn(fieldNames, optionFlags);
}
_local1.updateViews("sort");
}
}
function sort(compareFunc) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
_local1.__get__items().sort(compareFunc);
_local1.updateViews("sort");
}
}
function isEmpty() {
return(items.length == 0);
}
function isLocal() {
return(mRecordSetID == null);
}
function isFullyPopulated() {
return(isLocal());
}
function getRemoteLength() {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.mRecordsAvailable);
}
return(_local1.mTotalCount);
}
function getNumberAvailable() {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.getLength());
}
return(_local1.mRecordsAvailable);
}
function replaceItemAt(index, item) {
var _local1 = index;
var _local2 = this;
if ((_local1 >= 0) && (_local1 <= _local2.__get__length())) {
var _local3 = _local2.getItemID(_local1);
_local2.__get__items()[_local1] = item;
_local2.__get__items()[_local1].__ID__ = _local3;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function removeAll() {
clear();
}
function removeItemAt(index) {
var _local1 = index;
var _local2 = this;
var _local3 = _local2._items[_local1];
_local2._items.splice(_local1, 1);
var rItems = [_local2._items[_local1]];
var rIDs = [_local2.getItemID(_local1)];
_local2.dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local1, lastItem:_local1, removedItems:rItems, removedIDs:rIDs});
return(_local3);
}
function removeEventListener(event, listener) {
}
function requestRange(range) {
var _local1 = range.getStart();
var _local2 = range.getEnd();
return(internalRequestRange(_local1, _local2));
}
function setDeliveryMode(mode, pagesize, numPrefetchPages) {
var _local1 = this;
var _local2 = pagesize;
var _local3 = numPrefetchPages;
_local1.mDeliveryMode = mode.toLowerCase();
_local1.stopFetchAll();
if ((_local2 == null) || (_local2 <= 0)) {
_local2 = 25;
}
switch (_local1.mDeliveryMode) {
case "ondemand" :
return;
case "page" :
if (_local3 == null) {
_local3 = 0;
}
_local1.mPageSize = _local2;
_local1.mNumPrefetchPages = _local3;
return;
case "fetchall" :
_local1.stopFetchAll();
_local1.startFetchAll(_local2);
return;
default :
mx.remoting.NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
}
function editField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function getEditingData(index, fieldName) {
return(items[index][fieldName]);
}
function setField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function changeFieldValue(index, fieldName, value) {
var _local1 = index;
var _local2 = this;
if (_local2.checkLocal()) {
} else if ((_local1 < 0) || (_local1 >= _local2.getLength())) {
} else {
_local2.__get__items()[_local1][fieldName] = value;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function isObjectEmpty(objToCheck) {
var _local2 = objToCheck;
var _local1 = true;
for (var _local3 in _local2) {
_local1 = false;
return(_local1);
}
return(_local1);
}
function arrayToObject(anArray) {
if (mTitles == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local3 = new Object();
var alen = anArray.length;
var _local2;
var _local1 = 0;
while (_local1 < alen) {
_local2 = mTitles[_local1];
if (_local2 == null) {
_local2 = ("column" + _local1) + 1;
}
_local3[_local2] = anArray[_local1];
_local1++;
}
return(_local3);
}
function checkLocal() {
if (isLocal()) {
return(false);
}
mx.remoting.NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(true);
}
function getRecordSetService() {
var _local1 = this;
if (_local1.mRecordSetService == null) {
if (_local1.gateway_conn == null) {
_local1.gateway_conn = mx.remoting.NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
_local1.gateway_conn = _local1.gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
_local1.gateway_conn.setupRecordSet();
_local1.gateway_conn.setDebugId("RecordSet " + _local1.mRecordSetID);
}
_local1.mRecordSetService = _local1.gateway_conn.getService(_local1.serviceName, _local1);
if (_local1.mRecordSetService == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
_local1.mRecordSetService = null;
}
}
return(_local1.mRecordSetService);
}
function internalRequestRange(index, lastIndex) {
var _local1 = index;
var _local2 = this;
var highestRequested = -1;
if (_local1 < 0) {
_local1 = 0;
}
if (lastIndex >= _local2.getRemoteLength()) {
lastIndex = _local2.getRemoteLength() - 1;
}
var _local3;
var last;
while (_local1 <= lastIndex) {
while ((_local1 <= lastIndex) && (_local2.__get__items()[_local1] != null)) {
_local1++;
}
_local3 = _local1;
while ((_local1 <= lastIndex) && (_local2.__get__items()[_local1] == null)) {
_local2.mOutstandingRecordCount++;
_local2.__get__items()[_local1] = 1;
_local1++;
}
last = _local1 - 1;
if (_local3 <= last) {
_local2.logger.logInfo((((" Fetching records from index [" + _local3) + "] to index [") + last) + "]");
_local2.getRecordSetService().getRecords(_local2.mRecordSetID, _local3 + 1, (last - _local3) + 1);
highestRequested = last;
_local2.updateViews("fetchRows", _local3, last);
}
}
return(highestRequested);
}
function removeItems(index, len) {
var _local3 = index;
var _local2 = new Array();
var _local1 = 0;
while (_local1 < len) {
_local2.push(getItemID(_local3 + _local1));
_local1++;
}
var oldItems = items.splice(_local3, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local3, lastItem:(_local3 + len) - 1, removedItems:oldItems, removedIDs:_local2});
}
function getRecords_Result(info) {
var _local1 = this;
var _local2 = info;
_local1.setData(_local2.Cursor - 1, _local2.Page);
_local1.mOutstandingRecordCount = _local1.mOutstandingRecordCount - _local2.Page.length;
_local1.updateViews("updateItems", _local2.Cursor - 1, ((_local2.Cursor - 1) + _local2.Page.length) - 1);
if ((_local1.mRecordsAvailable == _local1.mTotalCount) && (!_local1.mAllNotified)) {
_local1.updateViews("allRows");
_local1.mRecordSetService.release();
_local1.mAllNotified = true;
_local1.mRecordSetID = null;
_local1.mRecordSetService = null;
}
}
function release_Result() {
}
function requestOneRecord(index) {
var _local1 = this;
var _local2 = index;
if (_local1.__get__items()[_local2] == null) {
if (_local1.mDeliveryMode == "ondemand") {
_local1.logger.logInfo((" INFO: Fetching Record [" + _local2) + "]");
}
_local1.getRecordSetService().getRecords(_local1.mRecordSetID, _local2 + 1, 1);
_local1.mOutstandingRecordCount++;
_local1.__get__items()[_local2] = 1;
_local1.updateViews("fetchRows", _local2, _local2);
}
}
function requestRecord(index) {
var _local1 = this;
if (_local1.mDeliveryMode != "page") {
_local1.requestOneRecord(index);
} else {
var _local2 = int(index / _local1.mPageSize) * _local1.mPageSize;
var _local3 = (_local2 + (_local1.mPageSize * (_local1.mNumPrefetchPages + 1))) - 1;
_local1.internalRequestRange(_local2, _local3);
}
}
function _setParentService(service) {
gateway_conn = service.nc;
}
function setData(start, dataArray) {
var _local1 = this;
var datalen = dataArray.length;
var _local3;
var rec;
var _local2 = 0;
while (_local2 < datalen) {
_local3 = _local2 + start;
rec = _local1.__get__items()[_local3];
if ((rec != null) && (rec != 1)) {
mx.remoting.NetServices.trace("RecordSet", "warning", 106, "Already got record # " + _local3);
} else {
_local1.mRecordsAvailable = _local1.mRecordsAvailable + 1;
}
_local1.__get__items()[_local3] = _local1.arrayToObject(dataArray[_local2]);
_local1.__get__items()[_local3].__ID__ = _local1.uniqueID++;
_local2++;
}
}
function startFetchAll(pagesize) {
var _local1 = this;
if (_local1.mDataFetcher != null) {
_local1.mDataFetcher.disable();
}
_local1.mDataFetcher = new mx.remoting.RsDataFetcher(_local1, pagesize);
}
function stopFetchAll() {
mDataFetcher.disable();
mDataFetcher = null;
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static function registerRecordSet() {
Object.registerClass("RecordSet", mx.remoting.RecordSet);
return(true);
}
static var version = "1.2.0.124";
static var init = registerRecordSet();
}
Symbol 1051 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator{}
Symbol 1052 MovieClip [__Packages.mx.remoting.RecordSetIterator] Frame 0
class mx.remoting.RecordSetIterator
{
var _recordSet, _cursor;
function RecordSetIterator (rec) {
_recordSet = rec;
_cursor = 0;
}
function hasNext() {
return(_cursor < _recordSet.getLength());
}
function next() {
return(_recordSet.getItemAt(_cursor++));
}
static var version = "1.2.0.124";
}
Symbol 1053 MovieClip [__Packages.mx.remoting.RsDataFetcher] Frame 0
class mx.remoting.RsDataFetcher extends Object
{
var mEnabled;
function RsDataFetcher (pgRS, increment) {
var _local1 = this;
super();
_local1.mRecordSet = pgRS;
_local1.mRecordSet.addEventListener("modelChanged", _local1);
_local1.mIncrement = increment;
_local1.mNextRecord = 0;
_local1.mEnabled = true;
_local1.doNext();
}
function disable() {
mEnabled = false;
}
function doNext() {
var _local1 = this;
if (_local1.mEnabled) {
do {
if (_local1.mNextRecord >= _local1.mRecordSet.getRemoteLength()) {
return;
}
var _local2 = new mx.remoting.RsDataRange(_local1.mNextRecord, (_local1.mNextRecord + _local1.mIncrement) - 1);
_local1.mHighestRequested = _local1.mRecordSet.requestRange(_local2);
_local1.mNextRecord = _local1.mNextRecord + _local1.mIncrement;
} while (_local1.mHighestRequested <= 0);
}
}
function modelChanged(eventObj) {
var _local1 = this;
var _local2 = eventObj;
if (((_local2.eventName == "updateItems") && (_local2.firstItem <= _local1.mHighestRequested)) && (_local2.lastItem >= _local1.mHighestRequested)) {
_local1.doNext();
}
if (_local2.eventName == "allRows") {
_local1.disable();
}
}
}
Symbol 1054 MovieClip [__Packages.mx.remoting.RsDataRange] Frame 0
class mx.remoting.RsDataRange extends Object
{
var _start, _end;
function RsDataRange (s, e) {
super();
_start = s;
_end = e;
}
function getStart() {
return(_start);
}
function getEnd() {
return(_end);
}
function setEnd(e) {
_end = e;
}
function setStart(s) {
_start = s;
}
}
Symbol 1055 MovieClip [__Packages.com.hotwheels.registration.UserServices] Frame 0
class com.hotwheels.registration.UserServices extends LoadVars
{
var m_user, m_rand, load, dispatchEvent, m_userService;
function UserServices (conn) {
var _local1 = this;
super();
mx.events.EventDispatcher.initialize(_local1);
_local1.m_loginLog = new mx.services.Log(mx.services.Log.DEBUG, "UserServices");
_local1.m_userService = new mx.remoting.Service(null, _local1.m_loginLog, "Mattel.HotWheels.UserServices_HW", conn, null);
_local1.setDefaultValues();
}
function setDefaultValues() {
m_user = new com.hotwheels.registration.User();
}
function getUser() {
return(m_user);
}
function getLoggedInUserID() {
m_rand = Math.random();
load("/common/getauthcookie.aspx");
}
function setLoggedInUserID() {
var _local1 = this;
_local1.userID = _local1.getUser().getUserID();
_local1.username = _local1.getUser().getNickname();
_local1.password = _local1.getUser().getPassword();
_local1.sendAndLoad("/common/setauthcookie.aspx", new LoadVars(), "POST");
}
function getCurrentUser() {
getLoggedInUserID();
}
function setUserPreferences() {
var _local1 = this;
var _local2 = _local1.m_userService.SetPrettyPage(_local1.getUser().getUserID(), int(_local1.getUser().getAvatar()), _local1.getUser().getBackground(), "", new Array());
_local2.__set__responder(new mx.rpc.RelayResponder(_local1, "onSetUserPreferences", null));
}
function onLoad() {
var _local1 = this;
_local1.getUser().setUserID(_local1.userID);
_local1.getUserInfo();
}
function onSetUserPreferences() {
dispatchEvent({type:"onSetUserPreferences"});
}
function getUserInfo(userID) {
var _local1 = this;
var _local3 = userID;
if (_local3 == null) {
_local3 = _local1.getUser().getUserID();
}
var _local2 = _local1.m_userService.GetUserInfo(int(_local3));
_local2.__set__responder(new mx.rpc.RelayResponder(_local1, "onUserInfoResult", null));
}
function getInfoForUsername(username) {
var _local1 = m_userService.GetInfoForUsername(username);
_local1.__set__responder(new mx.rpc.RelayResponder(this, "onUsernameInfoResult", null));
}
function login() {
var _local1 = this;
var _local2 = _local1.m_userService.LogIn(_local1.getUser().getNickname(), _local1.getUser().getPassword());
_local2.__set__responder(new mx.rpc.RelayResponder(_local1, "onLogInResult", null));
}
function logOut() {
var _local1 = this;
_local1.getUser().setDefaultValues();
_local1.setLoggedInUserID();
_local1.dispatchEvent({type:"onLogOut"});
}
function join() {
var _local2 = this;
var _local1 = _local2.getUser();
var _local3 = _local2.m_userService.Join(_local1.getNickname(), _local1.getPassword(), _local1.getUserHint(), _local1.getEmailAddress(), _local1.getParentEmailAddress(), _local1.getAvatar());
_local3.__set__responder(new mx.rpc.RelayResponder(_local2, "onJoinResult", null));
}
function GetPrettyPage() {
var _local2 = this;
var _local1 = _local2.getUser();
var _local3 = _local2.m_userService.Join(_local1.getNickname(), _local1.getPassword(), _local1.getUserHint(), _local1.getEmailAddress(), _local1.getParentEmailAddress(), _local1.getAvatar());
_local3.__set__responder(new mx.rpc.RelayResponder(_local2, "onJoinResult", null));
}
function getHintList() {
var _local1 = m_userService.HintList();
_local1.__set__responder(new mx.rpc.RelayResponder(this, "onHintListResult", null));
}
function getUserHint() {
var _local1 = this;
var _local2 = _local1.m_userService.UserHint(_local1.getUser().getNickname());
_local2.__set__responder(new mx.rpc.RelayResponder(_local1, "onUserHintResult", null));
}
function onUserHintResult(r) {
dispatchEvent({type:"onUserHint", result:r.__get__result()});
}
function onUserInfoResult(r) {
setUserProps(r.__get__result().Table.getItemAt(0));
dispatchEvent({type:"onUserInfo"});
}
function onUsernameInfoResult(r) {
setUserProps(r.__get__result().Table.getItemAt(0));
dispatchEvent({type:"onUsernameInfo"});
}
function onLogInResult(r) {
var _local1 = this;
_local1.setUserProps(r.__get__result().Table.getItemAt(0));
if ((_local1.getUser().getUserID() != null) && (_local1.getUser().getUserID() != -1)) {
_local1.setLoggedInUserID();
_local1.dispatchEvent({type:"onLogIn"});
_local1.getUserInfo();
} else {
_local1.dispatchEvent({type:"onLogInFail"});
}
}
function onJoinResult(r) {
var _local1 = this;
var _local2 = r.__get__result().Table.getItemAt(0);
if (_local2.NewName != null) {
_local1.getUser().setNickname(_local2.NewName);
_local1.dispatchEvent({type:"onNicknameTaken"});
} else {
_local1.setUserProps(r.__get__result().Table.getItemAt(0));
_local1.setLoggedInUserID();
_local1.dispatchEvent({type:"onJoin"});
}
}
function setUserProps(obj) {
var _local1 = obj;
var _local2 = this;
if (_local1.userID != null) {
_local2.getUser().setUserID(_local1.userID);
} else if (_local1.UserID != null) {
_local2.getUser().setUserID(_local1.UserID);
} else {
_local2.getUser().setUserID(_local1.userid);
}
_local2.getUser().setNickname(_local1.NickName);
_local2.getUser().setAvatar(_local1.Avatar);
_local2.getUser().setBackground(_local1.Background);
_local2.getUser().setEmailAddress(_local1.EmailAddressUser);
_local2.getUser().setParentEmailAddress(_local1.EmailAddressParent);
_local2.getUser().setUserHint(-1);
_local2.getUser().setLastBirthdayEmailSentDate(_local1.LastBirthdayEmailSentDate);
_local2.getUser().setCountedBirthdayYear(_local1.CountBirthdayYear);
_local2.getUser().setLastPlayDate(_local1.lastplaydate);
}
function onHintListResult(r) {
dispatchEvent({type:"onHintList", list:r.__get__result().Table});
}
}
Symbol 1056 MovieClip [__Packages.mx.remoting.Service] Frame 0
class mx.remoting.Service extends Object
{
var __conn, __serviceName, __responder;
function Service (gatewayURI, logger, serviceName, conn, resp) {
var _local1 = this;
var _local2 = conn;
var _local3 = gatewayURI;
super();
_local1.log = logger;
_local1.log.logInfo("Creating Service for " + serviceName, mx.services.Log.VERBOSE);
if ((_local3 == "") && (_local2 == null)) {
_local3 = mx.remoting.NetServices.gatewayUrl;
}
_local3 = mx.remoting.NetServices.getHttpUrl(_local3);
if (_local2 == null) {
_local2 = mx.remoting.NetServices.getConnection(_local3);
if (_local2 == null) {
_local1.log.logInfo("Creating gateway connection for " + _local3, mx.services.Log.VERBOSE);
_local2 = mx.remoting.NetServices.createGatewayConnection(_local3, logger);
}
}
_local1.__conn = _local2;
_local2.updateConfig();
_local1._allowRes = true;
_local1.__serviceName = serviceName;
_local1.__responder = resp;
_local1.log.logInfo("Successfully created Service", mx.services.Log.VERBOSE);
}
function get connection() {
return(__conn);
}
function __resolve(methodName) {
var _local2 = this;
if (_local2._allowRes) {
var _local1 = _local2.__makeOpFunc(methodName);
_local2[methodName] = _local1;
return(_local1);
}
return(null);
}
function __makeOpFunc(name) {
var op = (new mx.remoting.Operation(name, this));
var _local1 = function () {
op.invoke(arguments);
return(op.send());
};
_local1.send = function () {
return(op.createThenSend());
};
_local1.setResponder = function (resp) {
op.responder = resp;
};
_local1.getRequest = function () {
return(op.request);
};
_local1.setRequest = function (val) {
op.request = val;
};
_local1.addProperty("request", _local1.getRequest, _local1.setRequest);
_local1.operation = op;
return(_local1);
}
function get name() {
return(__serviceName);
}
function get responder() {
return(__responder);
}
static var version = "1.2.0.124";
var _allowRes = false;
}
Symbol 1057 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder{}
Symbol 1058 MovieClip [__Packages.mx.rpc.ResultEvent] Frame 0
class mx.rpc.ResultEvent extends Object
{
var __result;
function ResultEvent (res) {
super();
__result = res;
}
function get result() {
return(__result);
}
}
Symbol 1059 MovieClip [__Packages.mx.rpc.FaultEvent] Frame 0
class mx.rpc.FaultEvent extends Object
{
var __fault;
function FaultEvent (f) {
super();
__fault = f;
}
function get fault() {
return(__fault);
}
}
Symbol 1060 MovieClip [__Packages.mx.rpc.Fault] Frame 0
class mx.rpc.Fault extends Object
{
var __faultcode, __faultstring, __detail, __type;
function Fault (code, msg, detail, type) {
var _local1 = this;
super();
_local1.__faultcode = code;
_local1.__faultstring = msg;
_local1.__detail = detail;
_local1.__type = type;
}
function get faultcode() {
return(__faultcode);
}
function get faultstring() {
return(__faultstring);
}
function get detail() {
return(__detail);
}
function get description() {
var _local2 = this;
if (_local2.__description == null) {
if (_local2.__faultstring.indexOf(":") > -1) {
_local2.__description = _local2.__faultstring.substring(_local2.__faultstring.indexOf(":") + 1);
var _local1 = 0;
while (_local2.__description.indexOf(" ", _local1) == _local1) {
_local1++;
}
if (_local1 > 0) {
_local2.__description = _local2.__description.substring(_local1);
}
} else {
_local2.__description = _local2.__faultstring;
}
}
return(_local2.__description);
}
function get type() {
return(__type);
}
}
Symbol 1061 MovieClip [__Packages.mx.remoting.Operation] Frame 0
class mx.remoting.Operation
{
var __arguments, __responder, __request, __methodName;
function Operation (methodName, parent) {
var _local1 = this;
_local1.__service = parent;
_local1.__responder = parent.responder;
_local1.__methodName = methodName;
_local1.__invokationName = (_local1.__service.__get__name() + ".") + methodName;
_local1.__request = new Object();
_local1.__arguments = new Array();
}
function createThenSend(Void) {
createArguments();
return(send());
}
function send(Void) {
var _local1 = this;
_local1.__service.log.logInfo((("Invoking " + _local1.__methodName) + " on ") + _local1.__service.__get__name());
var _local3 = new mx.remoting.PendingCall(_local1.__service, _local1.__methodName);
_local3.__set__responder(_local1.__responder);
var _local2 = null;
if (_local1.__arguments == null) {
_local2 = new Array();
} else {
_local2 = _local1.__arguments.concat();
}
_local1.__invokationName = (_local1.__service.__get__name() + ".") + _local1.__methodName;
_local2.unshift(_local1.__invokationName, _local3);
_local1.__service.__get__connection().call.apply(_local1.__service.__get__connection(), _local2);
return(_local3);
}
function invoke(a) {
__arguments = a;
}
function get responder() {
return(__responder);
}
function set responder(r) {
__responder = r;
//return(responder);
}
function get request() {
return(__request);
}
function set request(r) {
__request = r;
//return(request);
}
function get name() {
return(__methodName);
}
function createArguments() {
var _local1 = this;
if (_local1.__request != null) {
_local1.__arguments = new Array();
for (var _local2 in _local1.__request) {
if (_local2 != "arguments") {
_local1.__arguments.unshift(_local1.__request[_local2]);
}
}
}
}
}
Symbol 1062 MovieClip [__Packages.mx.remoting.PendingCall] Frame 0
class mx.remoting.PendingCall extends Object
{
var __service, __methodName, __responder;
function PendingCall (srv, methodName) {
super();
__service = srv;
__methodName = methodName;
}
function get responder() {
return(__responder);
}
function set responder(res) {
__responder = res;
//return(responder);
}
function onResult(result) {
var _local1 = result;
var _local2 = this;
_local1.serviceName = _local1.serviceName;
if (_local1 != null) {
if (_local1 instanceof mx.remoting.NetServiceProxy) {
var serv = (new mx.remoting.Service(null, null, _local1.serviceName, _local2.__service.__get__connection(), _local2.__service.__get__responder()));
_local1 = serv;
} else if (_local1 instanceof mx.remoting.RecordSet) {
var _local3 = new mx.remoting.NetServiceProxy(_local2.__service.__get__connection());
_local1._setParentService(_local3);
_local1.logger = _local2.__service.log;
}
}
if (_local2.__responder != null) {
_local2.__responder.onResult(new mx.rpc.ResultEvent(_local1));
}
if (_local2.__service.log != null) {
_local2.__service.log.logInfo((((_local2.__service.__get__name() + ".") + _local2.__methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(_local1));
}
}
function onStatus(status) {
var _local1 = this;
var _local2 = status;
if (_local1.__responder != null) {
_local1.__responder.onFault(new mx.rpc.FaultEvent(new mx.rpc.Fault(_local2.code, _local2.description, _local2.details, _local2.type)));
}
if (_local1.__service.log != null) {
_local1.__service.log.logDebug("Service invocation failed.");
_local1.__service.log.logDebug((((_local1.__service.__get__name() + ".") + _local1.__methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(_local2));
}
}
function get methodName() {
return(__methodName);
}
static var inited = mx.remoting.NetServiceProxy.registerNetServiceProxy();
}
Symbol 1063 MovieClip [__Packages.mx.data.binding.ObjectDumper] Frame 0
class mx.data.binding.ObjectDumper
{
var inProgress;
function ObjectDumper () {
inProgress = new Array();
}
static function toString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local1 = indent;
var _local2 = maxLineLength;
var _local3 = new mx.data.binding.ObjectDumper();
if (_local2 == undefined) {
_local2 = 100;
}
if (_local1 == undefined) {
_local1 = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, _local2, _local1));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local1 = obj;
var x = 0;
while (x < inProgress.length) {
if (inProgress[x] == _local1) {
return("***");
}
x++;
}
inProgress.push(_local1);
indent++;
var t = typeof(_local1);
var result;
if ((_local1 instanceof XMLNode) && (showXMLstructures != true)) {
result = _local1.toString();
} else if (_local1 instanceof Date) {
result = _local1.toString();
} else if (t == "object") {
var _local3 = new Array();
if (_local1 instanceof Array) {
result = "[";
var i = 0;
while (i < _local1.length) {
_local3.push(i);
i++;
}
} else {
result = "{";
for (var i in _local1) {
_local3.push(i);
}
_local3.sort();
}
var sep = "";
var _local2 = 0;
while (_local2 < _local3.length) {
var val = _local1[_local3[_local2]];
var show = true;
if (typeof(val) == "function") {
show = showFunctions == true;
}
if (typeof(val) == "undefined") {
show = showUndefined == true;
}
if (show) {
result = result + sep;
if (!(_local1 instanceof Array)) {
result = result + (_local3[_local2] + ": ");
}
result = result + realToString(val, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
sep = ", `";
}
_local2++;
}
if (_local1 instanceof Array) {
result = result + "]";
} else {
result = result + "}";
}
} else if (t == "function") {
result = "function";
} else if (t == "string") {
result = ("\"" + _local1) + "\"";
} else {
result = String(_local1);
}
if (result == "undefined") {
result = "-";
}
inProgress.pop();
return(replaceAll(result, "`", ((result.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var result = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
result = result + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(result);
}
function doIndent(indent) {
var _local3 = indent;
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 1064 MovieClip [__Packages.com.hotwheels.registration.User] Frame 0
class com.hotwheels.registration.User
{
var m_userID, m_nickname, m_avatar, m_background, m_emailAddressUser, m_emailAddressParent, m_userHint, m_lastBirthdayEmailSentDate, m_countedBirthdayYear, m_password, m_lastPlayDate;
function User () {
setDefaultValues();
}
function setDefaultValues() {
var _local1 = this;
_local1.setUserID(-1);
_local1.setNickname("");
_local1.setAvatar(-1);
_local1.setBackground(-1);
_local1.setEmailAddress("");
_local1.setParentEmailAddress("");
_local1.setUserHint(-1);
_local1.setPassword("");
_local1.setLastBirthdayEmailSentDate(new Date());
_local1.setCountedBirthdayYear(-1);
_local1.setLastPlayDate("");
}
function getUserID() {
return(m_userID);
}
function setUserID(value) {
m_userID = value;
}
function getNickname() {
return(m_nickname);
}
function setNickname(value) {
m_nickname = value;
}
function getAvatar() {
return(m_avatar);
}
function setAvatar(value) {
m_avatar = value;
}
function getBackground() {
return(m_background);
}
function setBackground(value) {
m_background = value;
}
function getEmailAddress() {
return(m_emailAddressUser);
}
function setEmailAddress(value) {
m_emailAddressUser = value;
}
function getParentEmailAddress() {
return(m_emailAddressParent);
}
function setParentEmailAddress(value) {
m_emailAddressParent = value;
}
function getUserHint() {
return(m_userHint);
}
function setUserHint(value) {
m_userHint = value;
}
function getLastBirthdayEmailSentDate() {
return(m_lastBirthdayEmailSentDate);
}
function setLastBirthdayEmailSentDate(value) {
m_lastBirthdayEmailSentDate = value;
}
function getCountedBirthdayYear() {
return(m_countedBirthdayYear);
}
function setCountedBirthdayYear(value) {
m_countedBirthdayYear = value;
}
function getPassword() {
return(m_password);
}
function setPassword(value) {
m_password = value;
}
function getLastPlayDate() {
return(m_lastPlayDate);
}
function setLastPlayDate(value) {
m_lastPlayDate = value;
}
function toString() {
var _local1 = this;
return(((((("{ userid: " + _local1.getUserID()) + ", nickname: ") + _local1.getNickname()) + " ,password: ") + _local1.getPassword()) + " }");
}
}
Symbol 1065 MovieClip [__Packages.mx.rpc.RelayResponder] Frame 0
class mx.rpc.RelayResponder extends Object
{
var __onFault, __obj, __onResult;
function RelayResponder (resp, resultFunc, faultFunc) {
var _local1 = this;
super();
_local1.__obj = resp;
_local1.__onFault = faultFunc;
_local1.__onResult = resultFunc;
}
function onFault(fault) {
__obj[__onFault](fault);
}
function onResult(result) {
__obj[__onResult](result);
}
}
Symbol 1066 MovieClip [__Packages.SharedGameServices] Frame 0
class SharedGameServices
{
var sharedgame_service;
function SharedGameServices (conn) {
var _local1 = this;
mx.events.EventDispatcher.initialize(_local1);
_local1.myuserPetID = 0;
_local1.mylevel = "";
_local1.sharedgame_service = conn.getService("Mattel.GameService.Data.Shared_GameService", _local1);
}
function getPlayerStatus(userid, siteid) {
sharedgame_service.GetPlayerStatus(userid, siteid);
}
function GetPlayerStatus_Result(result) {
var _local1 = this;
_local1.playerstatus = result.Table;
_local1.dispatchEvent({type:"onPlayerStatus", target:_local1, playerstatus:_local1.playerstatus});
}
function recordScore(userid, siteid, gameid, score, gametime, gamelevel, credits, specialone, specialtwo, specialthree, specialfour, rowsback) {
sharedgame_service.RecordScore(userid, siteid, gameid, score, gametime, gamelevel, credits, specialone, specialtwo, specialthree, specialfour, rowsback);
}
function RecordScore_Result(result) {
var _local1 = this;
_local1.prizeinfo = result.Table;
_local1.topinfo = result.Table1;
_local1.dispatchEvent({type:"onRecordScore", target:_local1, prizeinfo:_local1.prizeinfo});
}
function getTopScoreList(siteid, gameid, rowsback) {
sharedgame_service.GetTopScoreList(siteid, gameid, rowsback);
}
function GetTopScoreList_Result(result) {
var _local1 = this;
_local1.gamestatus = result.Table;
_local1.dispatchEvent({type:"onGetTopScoreList", target:_local1, gamestatus:_local1.gamestatus});
}
function getTopAwardList(siteid, gameid, rowsback) {
sharedgame_service.GetTopAwardList(siteid, gameid, rowsback);
}
function GetTopAwardList_Result(result) {
var _local1 = this;
_local1.topstatus = result.Table;
_local1.dispatchEvent({type:"onGetTopAwardList", target:_local1, topstatus:_local1.topstatus});
}
}
Symbol 1067 MovieClip [__Packages.MusicButton] Frame 0
class MusicButton extends MovieClip
{
var nTrack, gotoAndStop, hitTest;
function MusicButton () {
var _local1 = this;
super();
_local1.nTrack = Number(_local1._name.charAt(5));
_local1.onRollOver = _local1.over;
_local1.onRollOut = _local1.out;
_local1.onRelease = _local1.releaseInactive;
}
function over() {
var _local1 = _global.aMusic[nTrack];
if (_local1.getBytesTotal() > 4) {
if (_local1.getBytesLoaded() == _local1.getBytesTotal()) {
_local1.play();
}
}
gotoAndStop("over");
}
function overSelected() {
var _local1 = _global.aMusic[nTrack];
if (_local1.getBytesTotal() > 4) {
if (_local1.getBytesLoaded() == _local1.getBytesTotal()) {
_local1.play();
}
}
}
function out() {
var _local1 = _global.aMusic[nTrack];
_local1.oSound.stop();
gotoAndStop("off");
}
function onEnterFrame() {
if (!hitTest(_root._xmouse, _root._ymouse, true)) {
var _local1 = _global.aMusic[nTrack];
_local1.oSound.stop();
}
}
function outSelected() {
var _local1 = _global.aMusic[nTrack];
_local1.oSound.stop();
delete onEnterFrame;
}
function releaseInactive() {
select();
_global.nTrack = nTrack;
}
function releaseActive() {
var _local1 = _global.aMusic[nTrack];
_local1.oSound.stop();
}
function waitForTrack() {
var _local1 = _global.aMusic[nTrack];
if (_local1.getBytesTotal() > 4) {
if (_local1.getBytesLoaded() == _local1.getBytesTotal()) {
_local1.play();
delete onEnterFrame;
}
}
}
function select() {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.aTrack.length) {
if (_local2.aTrack[_local1]._name != _local2._name) {
_local2.aTrack[_local1].deselect();
}
_local1++;
}
_local2.onRollOver = _local2.overSelected;
_local2.onRollOut = _local2.outSelected;
_local2.onRelease = _local2.releaseActive;
_local2.gotoAndStop("on");
}
function deselect() {
var _local1 = this;
_local1.gotoAndStop("off");
_local1.loading._visible = false;
_local1.onRollOver = _local1.over;
_local1.onRollOut = _local1.out;
_local1.onRelease = _local1.releaseInactive;
}
}
Symbol 1068 MovieClip [__Packages.MusicHandler] Frame 0
class MusicHandler
{
var mcMusic;
function MusicHandler (music) {
mcMusic = music;
}
function mute() {
bMute = true;
mcMusic.oSound.stop();
}
function unMute() {
bMute = false;
mcMusic.play();
}
function playMusic() {
if (bMute == false) {
mcMusic.play();
}
}
function stopMusic() {
mcMusic.oSound.stop();
}
var bMute = false;
}
Symbol 1069 MovieClip [__Packages.BG] Frame 0
class BG extends smashing.Renderable
{
var scaleMod, z;
function BG () {
var _local1 = this;
super();
_local1.x = _local1._x;
_local1.y = _local1._y;
}
function getScaleMod() {
scaleMod = smashing.Viewport.getScaleMod(z);
}
}
Symbol 1070 MovieClip [__Packages.Ramp] Frame 0
class Ramp extends smashing.Renderable
{
static var target;
var td, nTop;
function Ramp () {
var _local1 = this;
super();
_local1.leftVert = new smashing.Line(_local1.p0._x, _local1.p0._y, _local1.p1._x, _local1.p1._y);
_local1.dLeft = _local1.leftVert.vector.length;
_local1.rightVert = new smashing.Line(_local1.p4._x, _local1.p4._y, _local1.p5._x, _local1.p5._y);
_local1.dRight = _local1.rightVert.vector.length;
_local1.flat = new smashing.Line(_local1.p2._x, _local1.p2._y, _local1.p3._x, _local1.p3._y);
_local1.dFlat = _local1.flat.vector.length;
_local1.lr = _local1.c0._x - _local1.p1._x;
_local1.dLC = (_local1.lr * Math.PI) / 2;
_local1.rr = _local1.p4._x - _local1.c1._x;
_local1.dRC = (_local1.rr * Math.PI) / 2;
_local1.td = (((_local1.dLeft + _local1.dRight) + _local1.dFlat) + _local1.dLC) + _local1.dRC;
_local1.nTop = _local1.p0._y + _local1._y;
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.z = rampDepthStart;
target = _local1;
}
function get totalDist() {
return(td);
}
function get top() {
return(nTop);
}
function get onCircle() {
return(bOnCircle);
}
function findPos(l) {
var _local1 = this;
var _local2 = l;
if ((_local2 < 0) || (_local2 > _local1.td)) {
} else {
var _local3 = 0;
var nPD = 0;
_local3 = _local3 + _local1.dLeft;
if (_local2 < _local3) {
var pV = _local1.leftVert.vector.copy();
pV.length = _local2;
pV.x = pV.x + (_local1.x + _local1.p0._x);
pV.y = pV.y + (_local1.y + _local1.p0._y);
return(pV);
}
nPD = nPD + _local1.dLeft;
_local3 = _local3 + _local1.dLC;
if (_local2 < _local3) {
var nD = (_local2 - nPD);
var nR = (nD / _local1.dLC);
return(_local1.getPointLeft(nR));
}
nPD = nPD + _local1.dLC;
_local3 = _local3 + _local1.dFlat;
if (_local2 < _local3) {
var nD = (_local2 - nPD);
var pV = _local1.flat.vector.copy();
pV.length = nD;
pV.x = pV.x + (_local1.x + _local1.p2._x);
pV.y = pV.y + (_local1.y + _local1.p2._y);
return(pV);
}
nPD = nPD + _local1.dFlat;
_local3 = _local3 + _local1.dRC;
if (_local2 < _local3) {
var nD = (_local2 - nPD);
var nR = (1 - (nD / _local1.dRC));
return(_local1.getPointRight(nR));
}
nPD = nPD + _local1.dRC;
_local3 = _local3 + _local1.dRight;
var nD = (_local2 - nPD);
var pV = _local1.rightVert.vector.copy();
pV.length = nD;
pV.x = pV.x + (_local1.x + _local1.p4._x);
pV.y = pV.y + (_local1.y + _local1.p4._y);
return(pV);
}
return(undefined);
}
function getPointLeft(nR) {
var _local1 = this;
var _local3 = nR;
var _local2 = new smashing.Point(0, 0);
_local3 = (_local3 / 2) * Math.PI;
var nS = Math.sin(_local3);
var nC = Math.cos(_local3);
_local2 = new smashing.Point(-(nC * _local1.lr), nS * _local1.lr);
_local2.x = _local2.x + (_local1.x + _local1.c0._x);
_local2.y = _local2.y + (_local1.y + _local1.c0._y);
return(_local2);
}
function getPointRight(nR) {
var _local1 = this;
var _local3 = nR;
var _local2 = new smashing.Point(0, 0);
_local3 = (_local3 / 2) * Math.PI;
var nS = Math.sin(_local3);
var nC = Math.cos(_local3);
_local2 = new smashing.Point(nC * _local1.lr, nS * _local1.lr);
_local2.x = _local2.x + (_local1.x + _local1.c1._x);
_local2.y = _local2.y + (_local1.y + _local1.c1._y);
return(_local2);
}
static function getLeftVert(loc) {
var _local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D(target.p0._x + target._x, target.p0._y + target._y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(0, target.p1._y - target.p0._y, rampDepth);
_local1.s2 = new smashing.FastPoint3D(0, target.p1._y - target.p0._y, 0);
_local1.init();
_local1.setColor(230, 182, 134);
return(_local1);
}
static function getRightVert(loc) {
var _local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D(target.p4._x + target._x, target.p4._y + target._y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(0, target.p5._y - target.p4._y, rampDepth);
_local1.s2 = new smashing.FastPoint3D(0, target.p5._y - target.p4._y, 0);
_local1.init();
_local1.setColor(230, 182, 134);
return(_local1);
}
static function getBottom(loc) {
var _local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D(target.p2._x + target._x, target.p2._y + target._y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(target.p3._x - target.p2._x, target.p3._y - target.p2._y, rampDepth);
_local1.s2 = new smashing.FastPoint3D(target.p3._x - target.p2._x, target.p3._y - target.p2._y, 0);
_local1.init();
_local1.setColor(230, 182, 134);
return(_local1);
}
static function getLeftTop(loc) {
var _local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D((target.p0._x + target._x) - 50, target.p0._y + target._y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(50, 0, rampDepth);
_local1.s2 = new smashing.FastPoint3D(50, 0, 0);
_local1.init();
_local1.setColor(230, 182, 134);
return(_local1);
}
static function getRightTop(loc) {
var _local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D(target.p5._x + target._x, target.p5._y + target._y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(50, 0, rampDepth);
_local1.s2 = new smashing.FastPoint3D(50, 0, 0);
_local1.init();
_local1.setColor(230, 182, 134);
return(_local1);
}
static function addLeftCurve(a, loc) {
var chunks = 3;
var sec = (1 / chunks);
var _local1;
var _local2;
var ep;
var _local3 = 0;
while (_local3 < chunks) {
_local2 = target.getPointLeft(sec * _local3);
ep = target.getPointLeft(sec * (_local3 + 1));
_local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D(_local2.x, _local2.y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(ep.x - _local2.x, ep.y - _local2.y, rampDepth);
_local1.s2 = new smashing.FastPoint3D(ep.x - _local2.x, ep.y - _local2.y, 0);
_local1.init();
_local1.setColor(230, 182, 134);
a.push(_local1);
_local3++;
}
}
static function addRightCurve(a, loc) {
var chunks = 3;
var sec = (1 / chunks);
var _local1;
var _local2;
var ep;
var _local3 = 0;
while (_local3 < chunks) {
_local2 = target.getPointRight(1 - (sec * _local3));
ep = target.getPointRight(1 - (sec * (_local3 + 1)));
_local1 = new Square3D(loc);
_local1.p = new smashing.FastPoint3D(_local2.x, _local2.y, rampDepthStart);
_local1.s0 = new smashing.FastPoint3D(0, 0, rampDepth);
_local1.s1 = new smashing.FastPoint3D(ep.x - _local2.x, ep.y - _local2.y, rampDepth);
_local1.s2 = new smashing.FastPoint3D(ep.x - _local2.x, ep.y - _local2.y, 0);
_local1.init();
_local1.setColor(230, 182, 134);
a.push(_local1);
_local3++;
}
}
function render() {
var _local1 = this;
var _local2 = smashing.Viewport.getPos(_local1);
var dist = (smashing.Viewport.y - _local1.y);
if (dist >= -270) {
if (_local2 != undefined) {
_local1._visible = true;
var _local3 = _local2.scale;
if (_local2.x != undefined) {
_local1._x = (_local2.x * _local3) + smashing.Viewport.centerX;
}
if (_local2.y != undefined) {
_local1._y = (_local2.y * _local3) + smashing.Viewport.centerY;
}
if (_local3 != _local1.mpScale) {
_local1.mpScale = _local3;
_local1.__set__scale((_local3 / _local1.scaleMod) * 100);
}
}
} else {
_local1._visible = false;
}
}
var bOnCircle = false;
static var rampDepth = 600;
static var rampDepthStart = 0;
}
Symbol 1071 MovieClip [__Packages.smashing.Line] Frame 0
class smashing.Line
{
var vector, p0;
function Line (x0, y0, x1, y1) {
var _local1 = this;
_local1.p0 = new smashing.Point(x0, y0);
_local1.p1 = new smashing.Point(x1, y1);
_local1.vector = new smashing.Point(_local1.p1.__get__x() - _local1.p0.__get__x(), _local1.p1.__get__y() - _local1.p0.__get__y());
}
function get normal() {
var _local1 = this;
if (_local1.bChanged == true) {
_local1.bChanged = false;
_local1.vN = new smashing.Point(_local1.vector.__get__y(), -_local1.vector.__get__x());
_local1.vN.normalize();
}
return(_local1.vN);
}
function setLine(x0, y0, x1, y1) {
var _local1 = this;
_local1.p0.__set__x(x0);
_local1.p0.__set__y(y0);
_local1.p1.__set__x(x1);
_local1.p1.__set__y(y1);
_local1.vector.__set__x(_local1.p1.__get__x() - _local1.p0.__get__x());
_local1.vector.__set__y(_local1.p1.__get__y() - _local1.p0.__get__y());
_local1.bChanged = true;
}
function move(nX, nY) {
var _local1 = this;
_local1.p0.x = _local1.p0.x + nX;
_local1.p0.y = _local1.p0.y + nY;
_local1.p1.x = _local1.p1.x + nX;
_local1.p1.y = _local1.p1.y + nY;
}
function collisionPointSwept(p, m, radius) {
var _local1 = this;
var _local2 = m;
var nMotionDot = _local2.dot(_local1.__get__normal());
if (nMotionDot > 0) {
return(null);
}
var pLocalStart = (new smashing.Point(p.__get__x() - _local1.p0.__get__x(), p.__get__y() - _local1.p0.__get__y()));
var pOffset = _local1.__get__normal().copy();
pOffset.multiply(radius);
var pR = pLocalStart.copy();
pR.subtractPoint(pOffset);
var nOffLine = ((((-pR.y) * _local2.__get__x()) + (pR.x * _local2.__get__y())) / ((_local2.__get__y() * _local1.vector.__get__x()) + ((-_local2.__get__x()) * _local1.vector.__get__y())));
var lReturn;
if ((nOffLine >= 0) && (nOffLine <= 1)) {
var _local3 = new smashing.Point(_local1.vector.__get__x() * nOffLine, _local1.vector.__get__y() * nOffLine);
var dX = (_local3.x - pR.x);
var dY = (_local3.y - pR.y);
var mX = _local2.__get__x();
var mY = _local2.__get__y();
var pD = (new smashing.Point(_local3.x - pR.x, _local3.y - pR.y));
if (((dX * mX) + (dY * mY)) < 0) {
return(null);
}
dX = dX * dX;
dY = dY * dY;
mX = mX * mX;
mY = mY * mY;
var nD = (dX + dY);
if (nD > (mX + mY)) {
return(null);
}
_local3.x = _local3.x + (_local1.p0.__get__x() + pOffset.x);
_local3.y = _local3.y + (_local1.p0.__get__y() + pOffset.y);
lReturn = new smashing.CollisionResult(_local3, _local1.__get__normal(), nD);
lReturn.lHit = _local3;
} else {
var unitMotion = _local2.normalize();
if (nOffLine < 0) {
var pEndPoint = _local1.p0;
var pToEnd = pLocalStart.reverse();
} else if (nOffLine > 0) {
var pEndPoint = _local1.p1;
var pToEnd = (new smashing.Point(_local1.p1.__get__x() - p.__get__x(), _local1.p1.__get__y() - p.__get__y()));
}
var nClosest = pToEnd.dot(unitMotion);
if (_local2.__get__length() < (Math.abs(nClosest) - radius)) {
return(null);
}
var nHyp = pToEnd.length;
var nOppSqu = ((nHyp * nHyp) - (nClosest * nClosest));
var nRadiusSqu = (radius * radius);
if (nOppSqu > nRadiusSqu) {
return(null);
}
var nFinal = (Math.sqrt(nRadiusSqu - nOppSqu) - nClosest);
if (Math.abs(nFinal) > _local2.__get__length()) {
return(null);
}
var vFinal = unitMotion.multiply(nFinal);
if (vFinal.dot(_local2) > 0) {
return(null);
}
var vClipped = (new smashing.Point(p.__get__x() - vFinal.x, p.__get__y() - vFinal.y));
var vCNormal = (new smashing.Point(vClipped.x - pEndPoint.x, vClipped.y - pEndPoint.y)).normalize();
lReturn = new smashing.CollisionResult(vClipped, vCNormal, nFinal * nFinal);
lReturn.lHit = vFinal;
}
return(lReturn);
}
function collisionPoint(p, m, r) {
var _local1 = this;
var nMD = m.dot(_local1.__get__normal());
if (nMD > 0) {
return(null);
}
var _local3 = new smashing.Point(p.__get__x() + m.__get__x(), p.__get__y() + m.__get__y());
var de = ((_local1.vector.__get__x() * (_local3.x - _local1.p0.__get__x())) + (_local1.vector.__get__y() * (_local3.y - _local1.p0.__get__y())));
var e2 = _local1.vector.dot(_local1.vector);
var _local2;
var nDist;
var lR;
if (de < 0) {
_local2 = new smashing.Point(_local3.x - _local1.p0.__get__x(), _local3.y - _local1.p0.__get__y());
nDist = _local2.dot(_local2);
if (nDist > (r * r)) {
return(null);
}
var cN = _local2.normalize();
_local2.length = r;
var pC2 = _local1.p0.addPoint(_local2);
var xF = (pC2.x - p.__get__x());
var yF = (pC2.y - p.__get__y());
var lR = (new smashing.CollisionResult(pC2, cN, (xF * xF) + (yF * yF)));
lR.lHit = _local1.p0;
lR.nRatio = 0;
} else if (de > e2) {
_local2 = new smashing.Point(_local3.x - _local1.p1.__get__x(), _local3.y - _local1.p1.__get__y());
nDist = _local2.dot(_local2);
if (nDist > (r * r)) {
return(null);
}
var cN = _local2.normalize();
_local2.length = r;
var pC2 = _local1.p1.addPoint(_local2);
var xF = (pC2.x - p.__get__x());
var yF = (pC2.y - p.__get__y());
var lR = (new smashing.CollisionResult(pC2, cN, (xF * xF) + (yF * yF)));
lR.lHit = _local1.p1;
lR.nRatio = 1;
} else {
var t = (de / e2);
var pC = (new smashing.Point(_local1.p0.__get__x() + (_local1.vector.__get__x() * t), _local1.p0.__get__y() + (_local1.vector.__get__y() * t)));
var xDist = (_local3.x - pC.x);
var yDist = (_local3.y - pC.y);
if (((xDist * xDist) + (yDist * yDist)) > (r * r)) {
return(null);
}
var pC2 = (new smashing.Point(pC.x + (_local1.__get__normal().__get__x() * r), pC.y + (_local1.__get__normal().__get__y() * r)));
var xF = (pC2.x - p.__get__x());
var yF = (pC2.y - p.__get__y());
var lR = (new smashing.Line(pC2.x + cN.x, pC2.y + cN.y, pC2.x, pC2.y));
var dist2 = ((xF * xF) + (yF * yF));
lR = new smashing.CollisionResult(pC2, _local1.__get__normal(), dist2);
lR.lHit = pC;
lR.nRatio = t;
}
return(lR);
}
function nearestPointSeg(m0) {
var _local1 = this;
var D = (new smashing.Point(m0.__get__x() - _local1.p0.__get__x(), m0.__get__y() - _local1.p0.__get__y()));
var _local2 = _local1.vector.dot(D);
var e2 = _local1.vector.dot(_local1.vector);
if (_local2 < 0) {
return(_local1.p0);
}
if (_local2 > e2) {
return(_local1.p1);
}
var _local3 = _local2 / e2;
return(new smashing.Point(_local1.p0.__get__x() + (_local1.vector.__get__x() * _local3), _local1.p0.__get__y() + (_local1.vector.__get__y() * _local3)));
}
function nearestPointLine(m0) {
var _local1 = this;
var _local3 = new smashing.Point(m0.__get__x() - _local1.p0.__get__x(), m0.__get__y() - _local1.p0.__get__y());
var de = _local1.vector.dot(_local3);
var e2 = _local1.vector.dot(_local1.vector);
var _local2 = de / e2;
return(new smashing.Point(_local1.p0.__get__x() + (_local1.vector.__get__x() * _local2), _local1.p0.__get__y() + (_local1.vector.__get__y() * _local2)));
}
function nearestPointRatio(p) {
var _local1 = this;
var _local2 = new smashing.Point(p.__get__x() - _local1.p0.__get__x(), p.__get__y() - _local1.p0.__get__y());
var de = _local1.vector.dot(_local2);
var e2 = _local1.vector.dot(_local1.vector);
var _local3 = de / e2;
return(_local3);
}
function distanceFrom(p) {
var _local3 = this;
var _local1 = new smashing.Point(p.__get__x() - _local3.p0.__get__x(), p.__get__y() - _local3.p0.__get__y());
var _local2 = _local3.__get__normal().dot(_local1);
return(_local2);
}
function intersection(op0, op1, oVector) {
var _local1 = op0;
var a1;
var b1;
var c1;
var a2;
var b2;
var c2;
var det_inv;
var _local3;
var _local2;
var xi;
var yi;
if (vector.__get__x() != 0) {
_local3 = vector.__get__y() / vector.__get__x();
} else {
_local3 = Infinity;
}
if ((op1.__get__x() - _local1.__get__x()) != 0) {
_local2 = (op1.__get__y() - _local1.__get__y()) / (op1.__get__x() - _local1.__get__x());
} else {
_local2 = Infinity;
}
a1 = _local3;
a2 = _local2;
b1 = -1;
b2 = -1;
c1 = p0.__get__y() - (_local3 * p0.__get__x());
c2 = _local1.__get__y() - (_local2 * _local1.__get__x());
det_inv = 1 / ((a1 * b2) - (a2 * b1));
xi = ((b1 * c2) - (b2 * c1)) * det_inv;
yi = ((a2 * c1) - (a1 * c2)) * det_inv;
return(new smashing.Point(xi, yi));
}
function toString() {
var _local1 = this;
return(((((((("Line(" + _local1.p0.__get__x()) + ", ") + _local1.p0.__get__y()) + ", ") + _local1.p1.__get__x()) + ", ") + _local1.p1.__get__y()) + ")");
}
var bChanged = true;
}
Symbol 1072 MovieClip [__Packages.smashing.CollisionResult] Frame 0
class smashing.CollisionResult
{
function CollisionResult (pHit, pNormal, nDist) {
var _local1 = this;
_local1.hit = pHit;
_local1.normal = pNormal;
_local1.distSqu = nDist;
}
function toString() {
var _local1 = this;
return((((("[CollisionResult], " + _local1.hit) + ", ") + _local1.normal) + ", ") + _local1.distSqu);
}
}
Symbol 1073 MovieClip [__Packages.Square3D] Frame 0
class Square3D
{
var p, normal, color;
function Square3D (loc) {
var _local1 = this;
_local1.location = loc;
_local1.color = 0;
_local1.p = new smashing.FastPoint3D(0, 0, 0);
_local1.s0 = new smashing.FastPoint3D(0, 0, 0);
_local1.s1 = new smashing.FastPoint3D(0, 0, 0);
_local1.s2 = new smashing.FastPoint3D(0, 0, 0);
}
function render() {
var _local1 = this;
var _local2 = smashing.Viewport.getFocal(_local1.p0);
var lp1 = smashing.Viewport.getFocal(_local1.p1);
var lp2 = smashing.Viewport.getFocal(_local1.p2);
var _local3 = smashing.Viewport.getFocal(_local1.p3);
_local1.location.moveTo(_local2.x, _local2.y);
_local1.location.beginFill(_local1.color);
_local1.location.lineTo(lp1.x, lp1.y);
_local1.location.lineTo(lp2.x, lp2.y);
_local1.location.lineTo(_local3.x, _local3.y);
_local1.location.lineTo(_local2.x, _local2.y);
_local1.location.endFill();
return(_local2);
}
function getNormal() {
var _local1 = this;
_local1.normal = _local1.s0.cross(_local1.s1);
_local1.normal.normalize();
}
function getLighting() {
var _local2 = smashing.Viewport.light.subtractPoint(p);
_local2.normalize();
var _local1 = _local2.dot(normal) * smashing.Viewport.variance;
var _local3 = (_local1 + (_local1 << 8)) + (_local1 << 16);
color = color + _local3;
}
function setColor(r, g, b) {
var _local2 = this;
var _local3 = smashing.Viewport.light.subtractPoint(_local2.p);
_local3.normalize();
var d = _local3.dot(_local2.normal);
var _local1 = _local3.dot(_local2.normal) * smashing.Viewport.variance;
r = r + _local1;
g = g + _local1;
b = b + _local1;
_local2.color = ((r << 16) + (g << 8)) + b;
}
function init() {
var _local1 = this;
_local1.p0 = _local1.p.copy();
_local1.p1 = _local1.p.addPoint(_local1.s0);
_local1.p2 = _local1.p.addPoint(_local1.s1);
_local1.p3 = _local1.p.addPoint(_local1.s2);
_local1.getNormal();
}
function toString() {
var _local1 = this;
return(((((("[Square3D:" + _local1.p.x) + ", ") + _local1.p.y) + ", ") + _local1.p.z) + "]");
}
}
Symbol 1074 MovieClip [__Packages.Player] Frame 0
class Player extends smashing.Renderable
{
var aBG, sState, gfx, nScore;
function Player () {
var _local1 = this;
super();
_local1.m = new smashing.Point(1, 0);
_local1.z = 1;
_local1.m.__set__length(_local1.speed);
_local1.update = _local1.updateBlank;
_local1._visible = false;
_local1.nFPS = 0.0769230769230769;
}
function get midTrick() {
return(bTrick);
}
function get lastTrick() {
return(sLastTrick);
}
function get midAir() {
return(bAir);
}
function get accSpeed() {
return(cSpeed);
}
function get direction() {
return(dir);
}
function get launched() {
return(bLaunched);
}
function get handplanted() {
return(bHandplanted);
}
function setRamp(oRamp) {
var _local1 = this;
_local1.ramp = oRamp;
_local1.pLast = new smashing.Point(0, 0);
_local1.pCurr = new smashing.Point(0, 0);
}
function setBG(oBG) {
aBG = oBG;
}
function updateBlank(nElapsed) {
}
function updateOnRamp(nElapsed) {
var _local1 = this;
_local1.pCurr = _local1.ramp.findPos(_local1.cDist);
_local1.x = _local1.pCurr.x;
_local1.y = _local1.pCurr.y;
var pTrav = (new smashing.Point(_local1.pCurr.__get__x() - _local1.pLast.__get__x(), _local1.pCurr.__get__y() - _local1.pLast.__get__y()));
var _local2 = pTrav.cross();
_local2.normalize();
var _local3 = (Math.acos(smashing.Phys.__get__up().dot(_local2)) / Math.PI) * 180;
if (_local2.x < 0) {
_local3 = Math.abs(_local3 - 360);
}
if (_local1.dir == -1) {
_local3 = _local3 - 180;
}
_local1._rotation = _local3;
var distInc = ((_local1.rampSpeed * nElapsed) * _local1.dir);
if (_local1.bCollectSpeed) {
_local1.cSpeed = _local1.cSpeed + Math.abs(distInc);
_local1.speedRatio = _local1.cSpeed / _local1.ramp.__get__totalDist();
_local1.setState("crouch");
} else {
_local1.setState("stand");
}
_local1.cDist = _local1.cDist + distInc;
if (_local1.cDist > _local1.ramp.__get__totalDist()) {
_local1.gotoAir();
} else if (_local1.cDist < 0) {
_local1.gotoAir();
}
_local1.pLast = _local1.pCurr;
_local1.pLastNorm = _local2;
}
function updateOnRampHandplant(nElapsed) {
var _local1 = this;
_local1.pCurr = _local1.ramp.findPos(_local1.cDist);
_local1.x = _local1.pCurr.x;
_local1.y = _local1.pCurr.y;
var pTrav = (new smashing.Point(_local1.pCurr.__get__x() - _local1.pLast.__get__x(), _local1.pCurr.__get__y() - _local1.pLast.__get__y()));
var _local2 = pTrav.cross();
_local2.normalize();
var _local3 = (Math.acos(smashing.Phys.__get__up().dot(_local2)) / Math.PI) * 180;
if (_local2.x < 0) {
_local3 = Math.abs(_local3 - 360);
}
if (_local1.dir == -1) {
_local3 = _local3 - 180;
}
_local1._rotation = _local3;
var distInc = (((_local1.rampSpeed * 1.5) * nElapsed) * _local1.dir);
_local1.cDist = _local1.cDist + distInc;
_local1.speedRatio = 1;
if (_local1.cDist > _local1.ramp.__get__totalDist()) {
_local1.gotoAirDouble();
} else if (_local1.cDist < 0) {
_local1.gotoAirDouble();
}
_local1.pLast = _local1.pCurr;
_local1.pLastNorm = _local2;
}
function updateInAir(nElapsed) {
var _local1 = this;
if (_local1.__get__midTrick() == true) {
_local1.animateTrick();
if (_local1.bFinalizeTrick == false) {
if (_local1.cTrickTime <= _local1.nTrickTime) {
_local1.cTrickTime = _local1.cTrickTime + nElapsed;
} else {
_local1.bFinalizeTrick = true;
_local1.oWorld.onStartTrick(_local1.sLastTrick);
}
}
}
var g = (smashing.Phys.gr * nElapsed);
var _local3 = _local1.m;
_local3.y = _local3.y + g;
_local1.y = _local1.y + (_local3.y * nElapsed);
if (_local1.__get__midTrick() == true) {
if (_local1.dir == 1) {
_local1.gotoAndStop("left");
} else {
_local1.gotoAndStop("right");
}
} else {
var bLast = (_local1.nLastY < 0);
var bThis = (_local1.m.__get__y() < 0);
if (_local1.sState != "turn") {
if (bLast != bThis) {
_local1.setState("turn");
} else if (_local1.dir == 1) {
if (_local1.m.__get__y() > 0) {
_local1.gotoAndStop("right");
} else {
_local1.gotoAndStop("left");
}
} else if (_local1.m.__get__y() > 0) {
_local1.gotoAndStop("left");
} else {
_local1.gotoAndStop("right");
}
}
}
_local1.nLastY = _local1.m.y;
if (_local1.y > _local1.ramp.__get__top()) {
_local1.gotoRamp();
}
_local1.ramp.changed = true;
var _local2 = 0;
while (_local2 < _local1.aBG.length) {
_local1.aBG[_local2].changed = true;
_local2++;
}
}
function updateWipeout(nElapsed) {
var _local1 = this;
_local1.pCurr = _local1.ramp.findPos(_local1.cDist);
_local1.x = _local1.pCurr.x;
_local1.y = _local1.pCurr.y;
var pTrav = (new smashing.Point(_local1.pCurr.__get__x() - _local1.pLast.__get__x(), _local1.pCurr.__get__y() - _local1.pLast.__get__y()));
var _local2 = pTrav.cross();
_local2.normalize();
var _local3 = (Math.acos(smashing.Phys.__get__up().dot(_local2)) / Math.PI) * 180;
if (_local2.x < 0) {
_local3 = Math.abs(_local3 - 360);
}
if (_local1.dir == -1) {
_local3 = _local3 - 180;
}
_local1._rotation = _local3;
_local1.pLast = _local1.pCurr;
_local1.pLastNorm = _local2;
var distInc = ((_local1.nWipeSpeed * nElapsed) * _local1.dir);
_local1.cDist = _local1.cDist + distInc;
_local1.nWipeSpeed = _local1.nWipeSpeed - smashing.Phys.drag(_local1.nWipeSpeed, nElapsed);
if (_local1.nWipeSpeed < 20) {
_local1.endWipeout();
}
}
function startSpeed() {
var _local1 = this;
_local1.bSpace = true;
if (_local1.bCollectable == true) {
_local1.bCollectable = false;
_local1.bCollectSpeed = true;
}
}
function stopSpeed() {
bSpace = false;
bCollectSpeed = false;
}
function gotoAir() {
var _local1 = this;
_local1.oWorld.onAir();
_local1.nAirTime = 0;
_local1.bAir = true;
if (_local1.bHandplant) {
_local1.gotoHandplant();
} else {
_local1.bCollectable = false;
var _local3 = _local1.cSpeed / _local1.ramp.__get__totalDist();
var _local2 = _local1.speed * (_local3 * _local3);
if (_local2 < _local1.bottomSpeed) {
_local2 = _local1.bottomSpeed;
}
var m = _local1.m;
m.x = 0;
m.y = -_local2;
_local1.update = _local1.updateInAir;
_local1.dir = _local1.dir * -1;
_local1.nLastY = -1;
if (_local1.dir == 1) {
_local1.cDist = 0;
} else {
_local1.cDist = _local1.ramp.totalDist;
}
if (_local1.y > _local1.ramp.__get__top()) {
_local1.y = _local1.ramp.top;
}
_local1.clearTicks();
_local1.setState("stand");
_local1.oWorld.onFinalAir();
}
}
function gotoAirDouble() {
var _local1 = this;
_local1.oWorld.onAir();
_local1.nAirTime = 0;
_local1.bAir = true;
_local1.bCollectable = false;
_local1.bHandplanted = true;
var ratio = (_local1.cSpeed / _local1.ramp.__get__totalDist());
var _local2 = _local1.speed * 1.2;
if (_local2 < _local1.bottomSpeed) {
_local2 = _local1.bottomSpeed;
}
var _local3 = _local1.m;
_local3.x = 0;
_local3.y = -_local2;
_local1.update = _local1.updateInAir;
_local1.dir = _local1.dir * -1;
_local1.nLastY = -1;
if (_local1.dir == 1) {
_local1.cDist = 0;
_local1.gotoAndStop("left");
} else {
_local1.cDist = _local1.ramp.totalDist;
}
if (_local1.y > _local1.ramp.__get__top()) {
_local1.y = _local1.ramp.top;
}
_local1.clearTicks();
_local1.setState("stand");
_local1.oWorld.onFinalAir();
}
function gotoRamp(bFromReset) {
var _local1 = this;
_local1.bAir = false;
_local1.bCollectable = true;
_local1.bCollectSpeed = false;
_local1.bHandplanted = false;
_local1.bDisable = false;
_local1.cSpeed = 0;
_local1.speedRatio = 0;
_local1.pLast.__set__x(_local1.x);
_local1.pLast.__set__y(_local1.ramp.__get__top() - 5);
_local1.pLastNorm = new smashing.Point(_local1.dir, 0);
var _local3 = _local1.m;
_local3.length = _local1.speed;
var _local2;
if (bFromReset == true) {
_local1.update = _local1.updateOnRamp;
} else if (_local1.__get__midTrick() == true) {
_local1.wipeout();
_local2 = true;
} else {
_global.__main.mcRampSound.play();
_local1.update = _local1.updateOnRamp;
_local2 = false;
if (_local1.dir == 1) {
_local1.gotoAndStop("right");
} else {
_local1.gotoAndStop("left");
}
}
_local1.y = _local1.ramp.top;
_local1.oWorld.onRamp(_local2);
}
function gotoRampHandplant(bFromReset) {
var _local1 = this;
_local1.bAir = false;
_local1.bCollectable = true;
_local1.bCollectSpeed = false;
_local1.bDisable = false;
_local1.cSpeed = 0;
_local1.speedRatio = 0;
_local1.pLast.__set__x(_local1.x);
_local1.pLast.__set__y(_local1.ramp.__get__top() - 5);
_local1.pLastNorm = new smashing.Point(_local1.dir, 0);
var _local2 = _local1.m;
_local2.length = _local1.speed;
if (bFromReset == true) {
_local1.update = _local1.updateOnRampHandplant;
} else if (_local1.__get__midTrick() == true) {
_local1.wipeout();
} else {
_global.__main.mcRampSound.play();
_local1.update = _local1.updateOnRampHandplant;
_local1.oWorld.gainTricks();
}
_local1.y = _local1.ramp.top;
_local1.oWorld.onRamp();
}
function gotoHandplant() {
var _local1 = this;
_local1.update = _local1.updateBlank();
_local1.bAir = false;
_local1.dir = _local1.dir * -1;
_local1.setState("handplant");
_local1.oWorld.onStartTrick("handplant");
var _local3 = ((_local1.dir == 1) ? 0 : (_local1.ramp.__get__totalDist()));
var _local2 = _local1.ramp.findPos(_local3);
_local1.x = _local2.x;
_local1.y = _local2.y;
}
function endHandPlant() {
var _local1 = this;
_local1.setState("stand");
if (_local1.dir == 1) {
_local1.gotoAndStop("right");
} else {
_local1.gotoAndStop("left");
}
_local1.oWorld.onEndTrick("handplant");
_local1.gotoRampHandplant();
}
function wipeout() {
var _local1 = this;
_local1.oWorld.onWipeout();
_local1.nWipeSpeed = _local1.speed;
_local1.endTrick();
_local1.setState("wipeout");
if (_local1.dir == 1) {
_local1.ramp.skateClatterLeft._visible = true;
_local1.ramp.skateClatterLeft.play();
} else {
_local1.ramp.skateClatterRight._visible = true;
_local1.ramp.skateClatterRight.play();
}
_local1.update = _local1.updateWipeout;
}
function endWipeout() {
var _local1 = this;
_local1.ramp.skateClatterLeft._visible = false;
_local1.ramp.skateClatterLeft.gotoAndStop(1);
_local1.ramp.skateClatterRight._visible = false;
_local1.ramp.skateClatterRight.gotoAndStop(1);
_local1.oWorld.onEndWipeout();
}
function showTicks() {
}
function clearTicks() {
}
function reset() {
var _local1 = this;
_local1._visible = false;
_local1.gotoAndStop("right");
_local1.cDist = 0;
_local1.cSpeed = 0;
_local1.speedRatio = 0;
_local1.bCollectable = false;
_local1.bTrick = false;
_local1.cTrickTime = 0;
_local1.cTricks = 0;
_local1.bTrick = false;
_local1.bFinalizeTrick = false;
_local1.setState("stand");
_local1.clearTicks();
_local1.pLast = _local1.ramp.findPos(_local1.cDist);
_local1.x = _local1.pLast.x;
_local1.y = _local1.pLast.y;
_local1._rotation = 90;
_local1.ramp.skateClatterRight.skateClatter._visible = false;
_local1.ramp.skateClatterRight.skateClatter.gotoAndStop(1);
_local1.ramp.skateClatterLeft.skateClatter._visible = false;
_local1.ramp.skateClatterLeft.skateClatter.gotoAndStop(1);
_local1.update = _local1.updateBlank;
_local1.bLaunched = false;
_local1.oWorld.resetPlayer();
}
function launch() {
var _local1 = this;
_local1.dir = 1;
_local1._rotation = 90;
_local1._visible = true;
var _local2 = _local1.ramp.findPos(_local1.cDist);
_local1.x = _local2.x;
_local1.y = _local2.y;
_local1.gotoRamp(true);
_local1.bLaunched = true;
smashing.Viewport.render(_local1);
}
function setState(sState) {
this.sState = sState;
gfx.gotoAndStop(sState);
}
function endTrick() {
var _local1 = this;
_local1.cTrickTime = 0;
_local1.cTricks = 0;
_local1.sCurrTrick = "";
_local1.bTrick = false;
_local1.bFinalizeTrick = false;
_local1.setState("stand");
_local1.oWorld.onEndTrick(_local1.sLastTrick);
}
function doTrick(sTrick) {
var _local1 = this;
var _local2 = sTrick;
if (_local1.bDisable == true) {
return(false);
}
if (_local1.bAir == true) {
if (_local1.cTricks < 2) {
if (_local1.cTrickTime <= _local1.nTrickTime) {
if (_local1.dir == 1) {
_local1.gotoAndStop("left");
} else {
_local1.gotoAndStop("right");
}
_local1.sLastTrick = _local2;
_local1.bTrick = true;
_local1.setState(_local2);
if (_local2 != _local1.sCurrTrick) {
_local1.sCurrTrick = _local2;
_local1.nTrickStartTime = getTimer();
}
return(true);
}
return(false);
}
return(false);
}
return(false);
}
function handplant() {
bHandplant = true;
}
function unHandplant() {
bHandplant = false;
}
function pause() {
gfx.gfx.stop();
}
function unpause() {
gfx.gfx.play();
}
function addScore(nValue) {
nScore = nScore + nValue;
}
function setScore(nValue) {
nScore = nValue;
}
function playBonus(combo) {
var _local1 = this;
var _local3 = combo;
var _local2;
var pointBonus;
if (_local1.__get__direction() == 1) {
_local2 = _local1.ramp.bonusaniLeft;
} else {
_local2 = _local1.ramp.bonusaniRight;
}
if (_local3 == 4) {
_local2.gotoAndPlay("fourTrick");
_local1.addScore(_local1.fourTrick);
} else if (_local3 == 3) {
_local2.gotoAndPlay("threeTrick");
_local1.addScore(_local1.threeTrick);
} else {
_local2.gotoAndPlay("dragonCombo");
_local1.addScore(_local3);
}
}
function animateTrick() {
var _local3 = this;
var currTime = ((getTimer() - _local3.nTrickStartTime) / 1000);
var _local2 = _local3.gfx.gfx._totalframes;
var trickTime = (_local2 * _local3.nFPS);
var _local1 = currTime / trickTime;
if (_local1 > 1) {
_local1 = 1;
}
_local3.gfx.gfx.gotoAndStop(Math.ceil(_local2 * _local1));
}
var speed = 530;
var rampSpeed = 400;
var bottomSpeed = 60;
var cDist = 0;
var dir = 1;
var yMoveMod = 1;
var xMoveMod = 0;
var bCollectSpeed = false;
var bCollectable = true;
var bSpace = false;
var cSpeed = 0;
var speedRatio = 0;
var nAirTime = 0;
var nWipeSpeed = 0;
var bTrick = false;
var sLastTrick = "";
var bAir = false;
var bLaunched = false;
var threeTrick = 200;
var fourTrick = 300;
var cTricks = 0;
var cTrickTime = 0;
var nTrickTime = 0.15;
var bFinalizeTrick = false;
var bHandplant = false;
var bHandplanted = false;
var nLastY = -1;
var bDisable = false;
var n360 = 0;
var sCurrTrick = "";
}
Symbol 1075 MovieClip [__Packages.smashing.Phys] Frame 0
class smashing.Phys
{
static var pUp;
function Phys () {
}
static function drag(f, t) {
return(f * Math.pow(t, fr));
}
static function bounce(v, n) {
var _local3 = v;
var _local2 = _local3.reverse();
var _local1 = n.multiply(n.dot(_local2));
_local3.__set__x((_local1.x * bf) + (_local1.x - _local2.x));
_local3.__set__y((_local1.y * bf) + (_local1.y - _local2.y));
}
static function get up() {
return(((pUp == undefined) ? ((pUp = new smashing.Point(0, -1))) : (pUp)));
}
static var gr = 200;
static var fr = 0.8;
static var bf = 0.7;
static var height = 370;
static var width = 600;
static var TWOPI = (Math.PI*2);
}
Symbol 1076 MovieClip [__Packages.TrickCard] Frame 0
class TrickCard extends MovieClip
{
var _visible;
function TrickCard () {
super();
_visible = false;
}
function setTrick(sTrick, nScore, n360) {
var _local2 = this;
_local2._visible = true;
_local2.gotoAndStop(sTrick);
if (nScore == -1) {
i = 0;
while (i < 4) {
_local2["score" + i]._visible = false;
i++;
}
} else {
var _local1 = String(nScore);
var _local3 = 4 - _local1.length;
var i = 0;
while (i < _local3) {
_local1 = "0" + _local1;
i++;
}
i = 0;
while (i < 4) {
_local2["score" + i].gotoAndStop(Number(_local1.charAt(i)) + 1);
i++;
}
}
_local2.startTime = getTimer();
_local2.onEnterFrame = _local2.update;
_local2.nOption = n360;
}
function update() {
var _local1 = this;
var _local2 = (getTimer() - _local1.startTime) / 1000;
if (_local2 >= _local1.nDuration) {
_local1.gotoAndStop("blank");
_local1.onEnterFrame = null;
}
}
var nDuration = 1;
var nOption = 0;
}
Symbol 1077 MovieClip [__Packages.smashing.Menu] Frame 0
class smashing.Menu extends MovieClip
{
static var target;
var _quality, gotoAndPlay, gotoAndStop;
function Menu () {
super();
target = this;
}
function onShow() {
_quality = "high";
_global.oMusic.stopMusic();
_global.__main.oBase.pause();
}
function onResume() {
var _local1 = _global;
_quality = _local1.sLowEnd;
_local1.oMusic.playMusic();
_local1.__main.oBase.play();
}
function show(sFrame) {
onShow();
gotoAndPlay(sFrame);
}
function resume() {
onResume();
gotoAndStop("blank");
}
function playAgain() {
}
static function watchProp(o, sProp, sType) {
var _local1 = o;
var _local2 = sProp;
switch (sType) {
case "text" :
_local1.watch(_local2, watchText);
return;
case "frameMeter" :
_local1.watch(_local2, watchFrameMeter);
return;
case "pegboard" :
_local1.watch(_local2, watchPegboard);
return;
case "signboard" :
_local1.watch(_local2, watchSignboard);
return;
case "singleDigit" :
_local1.watch(_local2, watchSingleDigit);
}
}
static function watchText(prop, oldVal, newVal) {
target[prop.toString()] = newVal;
return(newVal);
}
static function watchFrameMeter(prop, oldVal, newVal) {
var _local2 = target[prop.toString()];
var _local1 = Math.ceil(newVal * _local2._totalframes);
if (_local1 == 0) {
_local1 = 1;
}
_local2.gotoAndStop(_local1);
return(newVal);
}
static function watchPegboard(prop, oldVal, newVal) {
var _local1 = target[prop.toString()];
_local1.pegs = newVal;
return(newVal);
}
static function watchSignboard(prop, oldVal, newVal) {
//var _local2 = this;
var limit = 1;
var _local1 = target[prop.toString()];
_local1.gotoAndStop(newVal);
_local1.startTime = getTimer();
_local1.limit = limit;
_local1.onEnterFrame = function () {
var _local1 = this;
var _local2 = (getTimer() - _local1.startTime) / 1000;
if (_local2 >= _local1.limit) {
_local1._visible = false;
delete _local1.onEnterFrame;
}
};
return(newVal);
}
static function watchSingleDigit(prop, oldVal, newVal) {
var _local2 = newVal;
var _local1 = target[prop.toString()];
_local1.gotoAndStop(_local2 + 1);
target[prop + "cache"] = _local2 + 1;
return(_local2);
}
var bEnabled = true;
}
Symbol 1078 MovieClip [__Packages.smashing.KeyGrabber] Frame 0
class smashing.KeyGrabber
{
var oRecv;
function KeyGrabber () {
}
function setWorld(recv) {
oRecv = recv;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.oRecv) {
var _local2 = ((Key.isDown(38) + (Key.isDown(40) << 1)) + (Key.isDown(37) << 2)) + (Key.isDown(39) << 3);
switch (_local2) {
case 5 :
_local1.oRecv.onUpLeft();
break;
case 9 :
_local1.oRecv.onUpRight();
break;
case 1 :
_local1.oRecv.onUp();
break;
case 6 :
_local1.oRecv.onDownLeft();
break;
case 10 :
_local1.oRecv.onDownRight();
break;
case 2 :
_local1.oRecv.onDown();
break;
case 4 :
_local1.oRecv.onLeft();
break;
case 8 :
_local1.oRecv.onRight();
}
if (Key.isDown(90)) {
_local1.oRecv.onShift();
} else {
_local1.oRecv.onUnshift();
}
}
}
}
Symbol 1079 MovieClip [__Packages.smashing.KeyGrabbable] Frame 0
interface smashing.KeyGrabbable{}
Symbol 1080 MovieClip [__Packages.RampJumpWorld] Frame 0
class RampJumpWorld
{
var player, ramp;
function RampJumpWorld (mcLoc) {
var _local1 = this;
_local1.location = mcLoc;
_local1.ramp = _local1.location.mcRamp;
_local1.ramp.oWorld = _local1;
_local1.ramp.mcLaunchCPU._visible = false;
_local1.mcLaunch = _local1.ramp.mcLaunchPlayer;
_local1.player = _local1.location.mcPlayer;
_local1.player.setRamp(_local1.ramp);
_local1.player.oWorld = _local1;
_local1.aBG = [];
_local1.aBG[0] = _local1.location.backCrowd;
_local1.aBG[1] = _local1.location.buildings;
_local1.player.setBG(_local1.aBG);
smashing.Menu.watchProp(_local1.player, "speedRatio", "frameMeter");
smashing.Menu.watchProp(_local1, "timeRatio", "frameMeter");
smashing.Menu.watchProp(_local1, "cTimeRounded", "text");
smashing.Menu.watchProp(_local1, "nScore", "text");
smashing.Menu.watchProp(_local1, "tricksLanded", "text");
_local1.tricksLanded = 0;
_local1.nRound = 0;
_local1.aScores = [];
_local1.oKeySub = new smashing.KeySub(_local1, 32, "startSpeed", "stopSpeed");
_local1.moveView = _local1.moveViewRamp;
}
function onStartTrick(sTrick) {
var _local1 = this;
var multiplier = (_local1.aJumpScore.length + 1);
var _local3 = ((_local1.player.__get__handplanted() == true) ? 0.5 : 1);
var _local2;
switch (sTrick) {
case "indyGrab" :
_local2 = (196 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "ollie360" :
_local2 = (64 * multiplier) * _local3;
_local1.n360++;
break;
case "varialFlip" :
_local2 = (256 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "mutegrab" :
_local2 = (324 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "varial360" :
_local2 = (289 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "spinHook" :
_local2 = (324 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "flare" :
_local2 = (676 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "superman" :
_local2 = (529 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "handplant" :
_local2 = 20;
_local1.n360 = 0;
}
smashing.Menu.target.mcTrick.setTrick(sTrick, _local2, 360 * _local1.n360);
}
function onEndTrick(sTrick) {
var _local1 = this;
var _local3 = _local1.aJumpScore.length + 1;
var _local2 = ((_local1.player.__get__handplanted() == true) ? 0.5 : 1);
switch (sTrick) {
case "indyGrab" :
_local1.aJumpScore.push(196 * _local3) * _local2;
return;
case "ollie360" :
_local1.aJumpScore.push(64 * _local3) * _local2;
return;
case "varialFlip" :
_local1.aJumpScore.push(256 * _local3) * _local2;
return;
case "mutegrab" :
_local1.aJumpScore.push(324 * _local3) * _local2;
return;
case "varial360" :
_local1.aJumpScore.push(289 * _local3) * _local2;
return;
case "spinHook" :
_local1.aJumpScore.push(324 * _local3) * _local2;
return;
case "flare" :
_local1.aJumpScore.push(676 * _local3) * _local2;
return;
case "superman" :
_local1.aJumpScore.push(529 * _local3) * _local2;
return;
case "handplant" :
_local1.nScore = _local1.nScore + 20;
}
}
function onLaunch() {
player.launch();
bEnabled = true;
}
function onReenter() {
}
function onAir() {
var _local1 = this;
_local1.aJumpScore = [];
_local1.moveView = _local1.moveViewAir;
}
function onFinalAir() {
}
function onWipeout() {
}
function onEndWipeout() {
var _local1 = this;
_local1.player.reset();
_local1.mcLaunch._visible = true;
_local1.mcLaunch.gotoAndStop("launch");
}
function onRamp(bWipe) {
var _local2 = this;
_local2.n360 = 0;
if (bWipe != undefined) {
if (bWipe == false) {
var _local1 = 0;
while (_local1 < _local2.aJumpScore.length) {
_local2.nScore = _local2.nScore + _local2.aJumpScore[_local1];
_local1++;
}
_local2.tricksLanded = _local2.tricksLanded + _local2.aJumpScore.length;
}
}
_local2.moveView = _local2.moveViewRamp;
}
function onEnter() {
var _local2 = this;
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
}
function onExit() {
}
function onPause() {
if (player.__get__midTrick() == true) {
player.pause();
}
}
function onPlay() {
if (player.__get__midTrick() == true) {
player.unpause();
}
}
function onUp() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("mutegrab");
}
}
}
function onDown() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("varialFlip");
}
}
}
function onLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("varial360");
}
}
}
function onRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("indyGrab");
}
}
}
function onUpLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("flare");
}
}
}
function onUpRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("spinHook");
}
}
}
function onDownLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("ollie360");
}
}
}
function onDownRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("superman");
}
}
}
function onShift() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.handplant();
}
}
}
function onUnshift() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.unHandplant();
}
}
}
function update(nElapsed) {
var _local2 = this;
_local2.cTime = _local2.cTime + nElapsed;
_local2.timeRatio = _local2.cTime / _local2.nTime;
_local2.cTimeRounded = Math.floor(_local2.nTime - _local2.cTime);
_local2.cTimeRounded = ((_local2.cTimeRounded < 0) ? 0 : (_local2.cTimeRounded));
_local2.player.update(nElapsed);
_local2.moveView();
_local2.player.render();
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
updateAfterEvent();
}
function moveViewRamp() {
smashing.Viewport.x = smashing.Viewport.centerX;
smashing.Viewport.y = smashing.Viewport.centerY;
smashing.Viewport.z = 0;
}
function moveViewAir() {
var _local1 = ramp.__get__top() - player.y;
smashing.Viewport.y = smashing.Viewport.startY - _local1;
smashing.Viewport.z = 0;
}
function startSpeed() {
if (_global.__main.oBase.playing) {
player.startSpeed();
}
}
function stopSpeed() {
if (_global.__main.oBase.playing) {
player.stopSpeed();
}
}
function stopRound() {
var _local2 = this;
_local2.ramp.skateClatterLeft._visible = false;
_local2.ramp.skateClatterRight._visible = false;
var nav = _global.__main.mcNav;
_local2.aScores.push(_local2.nScore);
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.aScores.length) {
_local3 = _local3 + _local2.aScores[_local1];
_local1++;
}
nav.mcComplete.nTotal = _local3;
nav.mcComplete.nRound = _local2.nScore;
_local2.player.reset();
_global.oMusic.stopMusic();
if (_local2.nRound >= 3) {
_global.__main.nRound1 = _local2.aScores[0];
_global.__main.nRound2 = _local2.aScores[1];
_global.__main.nRound3 = _local2.aScores[2];
_global.__main.nTotalScore = (_local2.aScores[0] + _local2.aScores[1]) + _local2.aScores[2];
_global.__main.gotoAndStop("endGame");
smashing.Viewport.reset();
} else {
_global.__main.oBase.pause();
nav.mcComplete._visible = true;
}
}
function startRound() {
var _local1 = this;
_local1.bTime = true;
_local1.cTime = 0;
_local1.nRound++;
_local1.nScore = 0;
_global.oMusic.playMusic();
_local1.mcLaunch.gotoAndStop("launch");
}
function getReady() {
resetView();
}
function resetView() {
var _local2 = this;
_local2.moveView = _local2.moveViewRamp;
_local2.player._visible = false;
_local2.mcLaunch._visible = true;
smashing.Viewport.reset();
_local2.player.render();
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
}
function tooLate() {
var _local1 = this;
if (_local1.player.__get__direction() == -1) {
_local1.ramp.mcTooLateLeft.play();
} else {
_local1.ramp.mcTooLateRight.play();
}
}
var nTime = 60;
var cTime = 0;
var cTimeRounded = 0;
var timeRatio = 0;
var cScores = 0;
var bEnabled = false;
var bTime = false;
var n360 = 0;
}
Symbol 1081 MovieClip [__Packages.smashing.KeySub] Frame 0
class smashing.KeySub
{
function KeySub (o, code, downmeth, upmeth) {
var _local1 = this;
_local1.oLooking = o;
_local1.nCode = code;
_local1.sDownMeth = downmeth;
_local1.sUpMeth = upmeth;
Key.addListener(_local1);
}
function onKeyDown() {
var _local1 = this;
if (_local1.bPressed == false) {
if (Key.getCode() == _local1.nCode) {
_local1.bPressed = true;
_local1.oLooking[_local1.sDownMeth]();
}
}
}
function onKeyUp() {
var _local1 = this;
if (!Key.isDown(_local1.nCode)) {
_local1.bPressed = false;
_local1.oLooking[_local1.sUpMeth]();
}
}
var bPressed = false;
}
Symbol 1082 MovieClip [__Packages.RampTutorWorld] Frame 0
class RampTutorWorld
{
var endTrick, updatePlayer, reenter, finalAirCheck, wipeout, endWipeout, player, ramp, aTrickReq, playerCPU, cTrick;
function RampTutorWorld (mcLoc) {
var _local1 = this;
_local1.location = mcLoc;
_local1.ramp = _local1.location.mcRamp;
_local1.ramp.oWorld = _local1;
_local1.player = _local1.location.mcPlayer;
_local1.player.setRamp(_local1.ramp);
_local1.player.oWorld = _local1;
_local1.playerCPU = _local1.location.mcPlayerCPU;
_local1.playerCPU.setRamp(_local1.ramp);
_local1.playerCPU.oWorld = _local1;
smashing.Menu.watchProp(_local1.player, "speedRatio", "frameMeter");
smashing.Menu.watchProp(_local1.playerCPU, "speedRatio", "frameMeter");
smashing.Menu.watchProp(_local1, "nScore", "text");
smashing.Menu.watchProp(_local1, "cTries", "singleDigit");
smashing.Menu.watchProp(_local1, "tricksLanded", "text");
_local1.tricksLanded = 0;
_local1.nScore = 0;
_local1.aBG = [];
_local1.aBG[0] = _local1.location.backCrowd;
_local1.aBG[1] = _local1.location.buildings;
_local1.player.setBG(_local1.aBG);
_local1.oKeySub = new smashing.KeySub(_local1, 32, "startSpeed", "stopSpeed");
_local1.moveView = _local1.moveViewRamp;
TrickCombo.init();
}
function onStartTrick(sTrick) {
var _local1 = this;
var _local2 = sTrick;
_local1.startTrick(_local2);
if (_local2 == "ollie360") {
_local1.n360++;
} else {
_local1.n360 = 0;
}
smashing.Menu.target.mcTrick.setTrick(_local2, -1, _local1.n360 * 360);
}
function onEndTrick(sTrick) {
endTrick(sTrick);
}
function onLaunch() {
updatePlayer.launch();
}
function onReenter() {
reenter();
}
function onAir() {
var _local1 = this;
_local1.moveView = _local1.moveViewAir;
_local1.airCheck();
}
function onFinalAir() {
finalAirCheck();
}
function onWipeout() {
wipeout();
}
function onEndWipeout() {
endWipeout();
}
function onRamp(bWipe) {
var _local1 = this;
_local1.n360 = 0;
_local1.moveView = _local1.moveViewRamp;
_local1.rampCheck();
}
function onEnter() {
var _local2 = this;
_local2.ramp.render();
_local2.ramp2.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
}
function onExit() {
}
function onPause() {
if (player.__get__midTrick() == true) {
player.pause();
}
}
function onPlay() {
if (player.__get__midTrick() == true) {
player.unpause();
}
}
function onUp() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("mutegrab");
}
}
}
function onDown() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("varialFlip");
}
}
}
function onLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("varial360");
}
}
}
function onRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("indyGrab");
}
}
}
function onUpLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("flare");
}
}
}
function onUpRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("spinHook");
}
}
}
function onDownLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("ollie360");
}
}
}
function onDownRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("superman");
}
}
}
function onShift() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.handplant();
}
}
}
function onUnshift() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.unHandplant();
}
}
}
function update(nElapsed) {
var _local2 = this;
_local2.nRunTime = _local2.nRunTime + nElapsed;
_local2.updateCurrent(nElapsed);
_local2.updatePlayer.render();
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
updateAfterEvent();
}
function moveViewRamp(x, y) {
smashing.Viewport.x = smashing.Viewport.centerX;
smashing.Viewport.y = smashing.Viewport.centerY;
smashing.Viewport.z = 0;
}
function moveViewAir(x, y) {
var _local1 = ramp.__get__top() - y;
smashing.Viewport.y = smashing.Viewport.startY - _local1;
}
function startSpeed() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.startSpeed();
}
}
}
function stopSpeed() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.stopSpeed();
}
}
}
function tooLate() {
var _local1 = this;
if (_local1.player.__get__direction() == -1) {
_local1.ramp.mcTooLateLeft.play();
} else {
_local1.ramp.mcTooLateRight.play();
}
}
function startRound() {
var _local1 = this;
_local1.nTrickReq = 0;
_local1.aTrickReq = [];
_global.__main.oBase.play();
_global.oMusic.playMusic();
_local1.startRun();
}
function startRun() {
var _local1 = this;
_local1.cTries = _local1.nTries;
_local1.nTrickReq++;
_local1.tricksLanded = _local1.nTrickReq;
if ((_local1.nTrickReq % 3) == 1) {
_local1.aTrickReq.push(new TrickCombo());
} else {
_local1.aTrickReq[_local1.aTrickReq.length - 1].addTrick();
}
_local1.switchToCPU();
_local1.ramp.mcLaunchCPU.gotoAndStop("launch");
_local1.nTrick = _local1.aTrickReq.length;
}
function endRun() {
var _local1 = _global;
var _local2 = this;
_local1.oMusic.stopMusic();
_local1.__main.nTotalScore = _local2.nScore;
var _local3 = Math.floor(_local2.nRunTime);
var minutes = Math.floor(_local3 / 60);
var seconds = (_local3 % 60);
_local1.__main.runTime = (minutes + ":") + seconds;
_local1.__main.maxCombos = _local2.nTrickReq;
_local1.__main.numRuns = _local2.nRuns;
_local1.__main.gotoAndStop("endGame");
}
function getTrickCombo(nTricks) {
aTrickReq.push(new TrickCombo(nTricks));
}
function updatePlayerMove(nElapsed) {
var _local1 = this;
_local1.player.update(nElapsed);
_local1.moveView(_local1.player.x, _local1.player.y);
}
function updateCPU(nElapsed) {
var _local1 = this;
_local1.playerCPU.update(nElapsed);
_local1.moveView(_local1.playerCPU.x, _local1.playerCPU.y);
}
function endTrickCPU(sTrick) {
var _local1 = this;
var _local2 = sTrick;
_local2 = _local1.aTrickReq[_local1.cTrick].getTrick();
if (_local2 != undefined) {
_local1.playerCPU.doTrick(_local2);
} else {
_local1.cTrick++;
if (_local1.cTrick >= _local1.aTrickReq.length) {
_local1.returnCPU();
}
}
}
function startTrickCPU(sTrick) {
}
function rampCheckCPU() {
playerCPU.startSpeed();
}
function airCheckCPU() {
playerCPU.stopSpeed();
}
function finalAirCheckCPU() {
var _local1 = this;
if (_local1.cTrick < _local1.nTrick) {
_local1.playerCPU.doTrick(_local1.aTrickReq[_local1.cTrick].getTrick());
}
}
function reenterCPU() {
flipPlayer();
}
function endWipeoutCPU() {
var _local1 = this;
_local1.updatePlayer.reset();
_local1.switchToCPU();
_local1.ramp.mcLaunchPlayer._visible = true;
_local1.ramp.mcLaunchPlayer.gotoAndStop("launch");
}
function endTrickPlayer(sTrick) {
aTrickReq[cTrick].doTrick(sTrick);
}
function startTrickPlayer(sTrick) {
}
function rampCheckPlayer() {
var _local1 = this;
if (_local1.aTrickReq[_local1.cTrick].started == true) {
if (_local1.aTrickReq[_local1.cTrick].success == true) {
_local1.cTrick++;
if (_local1.cTrick >= _local1.aTrickReq.length) {
_local1.returnPlayer();
}
} else {
_local1.returnPlayerFail();
}
}
}
function airCheckPlayer() {
}
function finalAirCheckPlayer() {
}
function rampCheckReturn() {
}
function airCheckReturn() {
}
function endWipeoutPlayer() {
var _local1 = this;
_local1.cTries--;
if (_local1.cTries <= 0) {
_local1.endRun();
} else {
_local1.updatePlayer.reset();
_local1.switchToPlayer();
_local1.ramp.mcLaunchPlayer._visible = true;
_local1.ramp.mcLaunchPlayer.gotoAndStop("launch");
}
}
function reenterPlayer() {
var _local1 = this;
_local1.nScore = _local1.nScore + (_local1.nTrickValue * _local1.nTrickReq);
_local1.startRun();
}
function reenterPlayerFail() {
var _local1 = this;
_local1.cTries--;
if (_local1.cTries <= 0) {
_local1.endRun();
} else {
_local1.switchToCPU();
_local1.ramp.mcLaunchCPU.gotoAndStop("launch");
}
}
function finalAirCheckReturn() {
var _local1 = this;
if (_local1.updatePlayer.dir == 1) {
_local1.updatePlayer.reset();
_local1.updatePlayer = null;
_local1.updateCurrent = null;
if (_local1.bCPU == true) {
_local1.ramp.mcLaunchCPU._visible = true;
_local1.ramp.mcLaunchCPU.gotoAndStop("reenter");
} else {
_local1.ramp.mcLaunchPlayer._visible = true;
_local1.ramp.mcLaunchPlayer.gotoAndStop("reenter");
}
}
}
function finalAirCheckReturnFail() {
var _local1 = this;
if (_local1.updatePlayer.dir == 1) {
_local1.updatePlayer.reset();
_local1.updatePlayer = null;
_local1.updateCurrent = null;
_local1.ramp.mcLaunchPlayer._visible = true;
_local1.ramp.mcLaunchPlayer.gotoAndStop("reenter");
}
}
function switchToCPU() {
var _local1 = this;
_local1.updateCurrent = _local1.updateCPU;
_local1.updatePlayer = _local1.playerCPU;
_local1.endTrick = _local1.endTrickCPU;
_local1.startTrick = _local1.startTrickCPU;
_local1.rampCheck = _local1.rampCheckCPU;
_local1.airCheck = _local1.airCheckCPU;
_local1.finalAirCheck = _local1.finalAirCheckCPU;
_local1.reenter = _local1.reenterCPU;
_local1.endWipeout = _local1.endWipeoutCPU;
_local1.bCPU = true;
_local1.bEnabled = false;
_local1.cTrick = 0;
_local1.moveView = _local1.moveViewRamp;
}
function switchToPlayer() {
var _local1 = this;
_local1.nRuns++;
_local1.updateCurrent = _local1.updatePlayerMove;
_local1.updatePlayer = _local1.player;
_local1.endTrick = _local1.endTrickPlayer;
_local1.startTrick = _local1.startTrickPlayer;
_local1.rampCheck = _local1.rampCheckPlayer;
_local1.airCheck = _local1.airCheckPlayer;
_local1.finalAirCheck = _local1.finalAirCheckPlayer;
_local1.endWipeout = _local1.endWipeoutPlayer;
_local1.bCPU = false;
_local1.bEnabled = true;
_local1.cTrick = 0;
var _local2 = 0;
while (_local2 < _local1.aTrickReq.length) {
_local1.aTrickReq[_local2].reset();
_local2++;
}
_local1.moveView = _local1.moveViewRamp;
}
function flipPlayer() {
var _local1 = this;
if (_local1.bCPU) {
_local1.switchToPlayer();
_local1.ramp.mcLaunchPlayer._visible = true;
_local1.ramp.mcLaunchPlayer.gotoAndStop("launch");
} else {
_local1.switchToCPU();
_local1.ramp.mcLaunchCPU._visible = true;
_local1.ramp.mcLaunchCPU.gotoAndStop("launch");
}
}
function returnCPU() {
var _local1 = this;
_local1.rampCheck = _local1.rampCheckReturn;
_local1.airCheck = _local1.airCheckReturn;
_local1.finalAirCheck = _local1.finalAirCheckReturn;
_local1.reenter = _local1.reenterCPU;
}
function returnPlayerFail() {
var _local1 = this;
smashing.Menu.target.mcTrick.setTrick("trickMissed", -1);
_local1.bEnabled = false;
_local1.rampCheck = _local1.rampCheckReturn;
_local1.airCheck = _local1.airCheckReturn;
_local1.finalAirCheck = _local1.finalAirCheckReturnFail;
_local1.reenter = _local1.reenterPlayerFail;
}
function returnPlayer() {
var _local1 = this;
_local1.bEnabled = false;
_local1.rampCheck = _local1.rampCheckReturn;
_local1.airCheck = _local1.airCheckReturn;
_local1.finalAirCheck = _local1.finalAirCheckReturn;
_local1.reenter = _local1.reenterPlayer;
}
var bEnabled = false;
var nTrickValue = 200;
var nTries = 3;
var nRunTime = 0;
var nRuns = 0;
var n360 = 0;
}
Symbol 1083 MovieClip [__Packages.RampRender] Frame 0
class RampRender
{
function RampRender (loc) {
var _local1 = this;
var _local2 = loc;
_local1.location = _local2;
_local1.aSquares = [];
_local1.aSquares.push(Ramp.getLeftTop(_local2));
_local1.aSquares.push(Ramp.getRightTop(_local2));
_local1.aSquares.push(Ramp.getLeftVert(_local2));
Ramp.addLeftCurve(_local1.aSquares, _local2);
_local1.aSquares.push(Ramp.getBottom(_local2));
Ramp.addRightCurve(_local1.aSquares, _local2);
_local1.aSquares.push(Ramp.getRightVert(_local2));
_local1.normal = new smashing.FastPoint3D(0, 0, -1);
var l = smashing.Viewport.light.subtractPoint(new smashing.FastPoint3D(280, 180, -100));
l.normalize();
var d = l.dot(_local1.normal);
var _local3 = l.dot(_local1.normal) * smashing.Viewport.variance;
_local1.color = (((230 + _local3) << 16) + ((182 + _local3) << 8)) + (134 + _local3);
_local1.pL = _local1.aSquares[0].p;
_local1.pR = _local1.aSquares[1].p3;
_local1.pLL = new smashing.FastPoint3D(_local1.pL.x, _local1.pL.y + _local1.height, Ramp.rampDepthStart);
_local1.pLR = new smashing.FastPoint3D(_local1.pR.x, _local1.pR.y + _local1.height, Ramp.rampDepthStart);
}
function render() {
var _local2 = this;
_local2.location.clear();
_local2.location.lineStyle(0, 0);
var l = _local2.aSquares.length;
var aFront = [];
var t0 = _local2.aSquares[0].render();
var t1 = _local2.aSquares[1].render();
var _local1 = 2;
while (_local1 < l) {
aFront.push(_local2.aSquares[_local1].render());
_local1++;
}
aFront.splice(0, 0, t0);
aFront.push(t1);
aFront.push(smashing.Viewport.getFocal(_local2.pR));
aFront.push(smashing.Viewport.getFocal(_local2.pLR));
aFront.push(smashing.Viewport.getFocal(_local2.pLL));
l = aFront.length;
var _local3 = aFront[0];
_local2.location.moveTo(_local3.x, _local3.y);
_local2.location.beginFill(_local2.color);
_local1 = 1;
while (_local1 < l) {
_local3 = aFront[_local1];
_local2.location.lineTo(_local3.x, _local3.y);
_local1++;
}
_local2.location.endFill();
}
var height = 300;
}
Symbol 1084 MovieClip [__Packages.TrickCombo] Frame 0
class TrickCombo
{
static var aShort, aMedium, aLong, aAll;
var aTricks;
function TrickCombo () {
aTricks = [];
pushShort();
}
static function init() {
aShort = ["indyGrab", "ollie360"];
aMedium = ["varialFlip", "mutegrab", "varial360", "spinHook"];
aLong = ["flare", "superman"];
aAll = aShort.concat(aMedium.concat(aLong));
}
function get success() {
if (cPlayer == aTricks.length) {
return(true);
}
return(false);
}
function get started() {
return(bStarted);
}
function addTrick() {
var _local1 = this;
if (_local1.aTricks.length == 1) {
_local1.pushMedium();
} else if (_local1.aTricks.length == 2) {
_local1.pushLong();
}
}
function getTrick() {
return(aTricks[cCPU++]);
}
function doTrick(sTrick) {
var _local1 = this;
_local1.bStarted = true;
if (_local1.cPlayer != -1) {
if (sTrick == _local1.aTricks[_local1.cPlayer]) {
_local1.cPlayer++;
} else {
_local1.cPlayer = -1;
}
}
}
function reset() {
var _local1 = this;
_local1.cPlayer = 0;
_local1.cCPU = 0;
_local1.bStarted = false;
}
function pushShort() {
aTricks.push(aShort[Math.floor(Math.random() * aShort.length)]);
}
function pushMedium() {
aTricks.push(aMedium[Math.floor(Math.random() * aMedium.length)]);
}
function pushLong() {
aTricks.push(aLong[Math.floor(Math.random() * aLong.length)]);
}
function toString() {
return(((("[TrickCombo:" + aTricks) + ", started:") + bStarted) + "]");
}
var cCPU = 0;
var cPlayer = 0;
var bStarted = false;
}
Symbol 1085 MovieClip [__Packages.FreeWorld] Frame 0
class FreeWorld
{
var player, ramp;
function FreeWorld (mcLoc) {
var _local1 = this;
_local1.location = mcLoc;
_local1.ramp = _local1.location.mcRamp;
_local1.ramp.oWorld = _local1;
_local1.ramp.mcLaunchCPU._visible = false;
_local1.mcLaunch = _local1.ramp.mcLaunchPlayer;
_local1.player = _local1.location.mcPlayer;
_local1.player.setRamp(_local1.ramp);
_local1.player.oWorld = _local1;
_local1.aBG = [];
_local1.aBG[0] = _local1.location.backCrowd;
_local1.aBG[1] = _local1.location.buildings;
_local1.player.setBG(_local1.aBG);
smashing.Menu.watchProp(_local1.player, "speedRatio", "frameMeter");
smashing.Menu.watchProp(_local1, "nScore", "text");
smashing.Menu.watchProp(_local1, "tricksLanded", "text");
_local1.tricksLanded = 0;
_local1.nScore = 0;
_local1.oKeySub = new smashing.KeySub(_local1, 32, "startSpeed", "stopSpeed");
_local1.moveView = _local1.moveViewRamp;
}
function onStartTrick(sTrick) {
var _local1 = this;
var multiplier = (_local1.aJumpScore.length + 1);
var _local3 = ((_local1.player.__get__handplanted() == true) ? 0.5 : 1);
var _local2;
switch (sTrick) {
case "indyGrab" :
_local2 = (196 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "ollie360" :
_local2 = (64 * multiplier) * _local3;
_local1.n360++;
break;
case "varialFlip" :
_local2 = (256 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "mutegrab" :
_local2 = (324 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "varial360" :
_local2 = (289 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "spinHook" :
_local2 = (324 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "flare" :
_local2 = (676 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "superman" :
_local2 = (529 * multiplier) * _local3;
_local1.n360 = 0;
break;
case "handplant" :
_local2 = 20;
_local1.n360 = 0;
}
smashing.Menu.target.mcTrick.setTrick(sTrick, _local2, 360 * _local1.n360);
}
function onEndTrick(sTrick) {
var _local1 = this;
var _local3 = _local1.aJumpScore.length + 1;
var _local2 = ((_local1.player.__get__handplanted() == true) ? 0.5 : 1);
switch (sTrick) {
case "indyGrab" :
_local1.aJumpScore.push(196 * _local3) * _local2;
return;
case "ollie360" :
_local1.aJumpScore.push(64 * _local3) * _local2;
return;
case "varialFlip" :
_local1.aJumpScore.push(256 * _local3) * _local2;
return;
case "mutegrab" :
_local1.aJumpScore.push(324 * _local3) * _local2;
return;
case "varial360" :
_local1.aJumpScore.push(289 * _local3) * _local2;
return;
case "spinHook" :
_local1.aJumpScore.push(324 * _local3) * _local2;
return;
case "flare" :
_local1.aJumpScore.push(676 * _local3) * _local2;
return;
case "superman" :
_local1.aJumpScore.push(529 * _local3) * _local2;
return;
case "handplant" :
_local1.nScore = _local1.nScore + 20;
}
}
function onLaunch() {
player.launch();
bEnabled = true;
}
function onReenter() {
}
function onAir() {
var _local1 = this;
_local1.aJumpScore = [];
_local1.moveView = _local1.moveViewAir;
}
function onFinalAir() {
}
function onWipeout() {
}
function onEndWipeout() {
var _local1 = this;
_local1.player.reset();
_local1.mcLaunch._visible = true;
_local1.mcLaunch.gotoAndStop("launch");
}
function onRamp(bWipe) {
var _local2 = this;
_local2.n360 = 0;
var _local3 = 0;
if (bWipe != undefined) {
if (bWipe == false) {
var _local1 = 0;
while (_local1 < _local2.aJumpScore.length) {
_local3 = _local3 + _local2.aJumpScore[_local1];
_local1++;
}
}
}
if (_local3 != 0) {
_local2.nScore = _local3;
_local2.tricksLanded = _local2.aJumpScore.length;
}
_local2.moveView = _local2.moveViewRamp;
}
function onEnter() {
var _local2 = this;
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
}
function onExit() {
}
function onPause() {
if (player.__get__midTrick() == true) {
player.pause();
}
}
function onPlay() {
if (player.__get__midTrick() == true) {
player.unpause();
}
}
function onUp() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("mutegrab");
}
}
}
function onDown() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("varialFlip");
}
}
}
function onLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("varial360");
}
}
}
function onRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("indyGrab");
}
}
}
function onUpLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("flare");
}
}
}
function onUpRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("spinHook");
}
}
}
function onDownLeft() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("ollie360");
}
}
}
function onDownRight() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.doTrick("superman");
}
}
}
function onShift() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.handplant();
}
}
}
function onUnshift() {
if (_global.__main.oBase.playing) {
if (bEnabled == true) {
player.unHandplant();
}
}
}
function update(nElapsed) {
var _local2 = this;
_local2.player.update(nElapsed);
_local2.moveView();
_local2.player.render();
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
updateAfterEvent();
}
function moveViewRamp() {
smashing.Viewport.x = smashing.Viewport.centerX;
smashing.Viewport.y = smashing.Viewport.centerY;
smashing.Viewport.z = 0;
}
function moveViewAir() {
var _local1 = ramp.__get__top() - player.y;
smashing.Viewport.y = smashing.Viewport.startY - _local1;
smashing.Viewport.z = 0;
}
function startSpeed() {
if (_global.__main.oBase.playing) {
player.startSpeed();
}
}
function stopSpeed() {
if (_global.__main.oBase.playing) {
player.stopSpeed();
}
}
function stopRound() {
var _local2 = this;
var nav = _global.__main.mcNav;
_local2.aScores.push(_local2.nScore);
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.aScores.length) {
_local3 = _local3 + _local2.aScores[_local1];
_local1++;
}
nav.mcComplete.nTotal = _local3;
nav.mcComplete.nRound = _local2.nScore;
_local2.player.reset();
if (_local2.nRound >= 3) {
_global.__main.nRound1 = _local2.aScores[0];
_global.__main.nRound2 = _local2.aScores[1];
_global.__main.nRound3 = _local2.aScores[2];
_global.__main.nTotalScore = (_local2.aScores[0] + _local2.aScores[1]) + _local2.aScores[2];
_global.__main.mcMusic.oSound.stop();
_global.__main.gotoAndStop("endGame");
smashing.Viewport.reset();
} else {
_global.__main.oBase.pause();
nav.mcComplete._visible = true;
}
}
function startRound() {
var _local1 = this;
_local1.bTime = true;
_local1.cTime = 0;
_local1.nRound++;
_local1.nScore = 0;
_global.oMusic.playMusic();
_local1.mcLaunch.gotoAndStop("launch");
}
function getReady() {
resetView();
}
function resetView() {
var _local2 = this;
_local2.moveView = _local2.moveViewRamp;
_local2.player._visible = false;
_local2.mcLaunch._visible = true;
smashing.Viewport.reset();
_local2.player.render();
_local2.ramp.render();
var _local1 = 0;
while (_local1 < _local2.aBG.length) {
_local2.aBG[_local1].render();
_local1++;
}
}
function tooLate() {
var _local1 = this;
if (_local1.player.__get__direction() == -1) {
_local1.ramp.mcTooLateLeft.play();
} else {
_local1.ramp.mcTooLateRight.play();
}
}
var nTime = 60;
var cTime = 0;
var cTimeRounded = 0;
var timeRatio = 0;
var cScores = 0;
var bEnabled = false;
var bTime = false;
var n360 = 0;
}
Symbol 4 MovieClip Frame 1
stop();
Symbol 4 MovieClip Frame 2
stop();
Symbol 97 MovieClip Frame 22
stop();
Symbol 105 MovieClip Frame 1
Symbol 105 MovieClip Frame 4
stop();
Symbol 107 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
Symbol 110 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
Symbol 117 MovieClip [EmailSymbol] Frame 2
send_btn.onRelease = function () {
halfpipe.myEmail.setFromName_txt(firstname_txt.text);
halfpipe.myEmail.setToName_txt(friendname_txt.text);
halfpipe.myEmail.setToEmail_txt(email_txt.text);
if (halfpipe.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/halfpipe/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 117 MovieClip [EmailSymbol] Frame 3
function waitTime() {
this.gotoAndStop("empty");
clearInterval(waitInt);
}
waitInt = setInterval(this, "waitTime", 5000);
ftEmail.track();
Symbol 131 MovieClip Frame 1
stop();
Symbol 135 Button
on (release) {
gotoAndPlay ("game");
}
Symbol 137 Button
on (release) {
gotoAndPlay ("tutorial");
}
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 2
stop();
Symbol 152 MovieClip Frame 1
function setEnabled(b) {
enabled = (b == undefined) || (b);
if (enabled) {
gotoAndStop ("_up");
} else {
gotoAndStop ("_disabled");
}
}
stop();
Instance of Symbol 6 MovieClip "mcHitArea" in Symbol 152 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 204 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 1
function select() {
var _local2 = this;
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onRelease;
var _local1 = 0;
while (_local1 < _local2.aBoards.length) {
if (thia.aBoards[_local1].nBoard != _local2.nBoard) {
_local2.aBoards[_local1].deselect();
}
_local1++;
}
selected_mc._visible = true;
selected_mc.gotoAndStop(Number(_local2.nBoard) + 1);
outline_mc._visible = true;
recordScratch.gotoAndStop(2);
outline_mc._visible = true;
_local2._xscale = (_local2._yscale = 100);
_global.nBoard = _local2.nBoard;
_local2.gotoAndStop("selected");
}
function deselect() {
var _local1 = this;
selected_mc._visible = false;
selected_mc.gotoAndStop(1);
outline_mc._visible = false;
outline_mc.gotoAndStop(1);
_local1._xscale = (_local1._yscale = 80);
_local1.gotoAndStop("blank");
}
stop();
this.nBoard = Number(this._name.charAt(5));
this.mcBoard.gotoAndStop(this.nBoard);
this.onRollOver = function () {
recordScratch.gotoAndStop(2);
outline_mc._visible = true;
this._xscale = (this._yscale = 100);
};
this.onRollOut = function () {
selected_mc._visible = false;
selected_mc.gotoAndStop(1);
recordScratch.gotoAndStop(1);
outline_mc._visible = false;
this._xscale = (this._yscale = 80);
};
this.onRelease = function () {
this.select();
};
Symbol 208 MovieClip Frame 6
stop();
Symbol 212 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 2
stop();
Symbol 214 Button
on (release) {
this.gotoAndStop("gameType");
}
Symbol 217 MovieClip Frame 7
stop();
Symbol 238 MovieClip Frame 1
function select() {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.aMatch.length) {
if (aMatch[_local1]._name != _local2._name) {
_local2.aMatch[_local1].deselect();
}
_local1++;
}
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onRelease;
_local2.gotoAndStop("on");
}
function deselect() {
var _local1 = this;
_local1.gotoAndStop("off");
_local1.onRollOver = function () {
this.gotoAndStop("over");
};
_local1.onRollOut = function () {
this.gotoAndStop("off");
};
_local1.onRelease = function () {
this.select();
_global.sType = "free";
};
}
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
this.onRelease = function () {
this.select();
_global.sType = "free";
};
Symbol 244 MovieClip Frame 1
function select() {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.aMatch.length) {
if (aMatch[_local1]._name != _local2._name) {
_local2.aMatch[_local1].deselect();
}
_local1++;
}
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onRelease;
_local2.gotoAndStop("on");
}
function deselect() {
var _local1 = this;
_local1.gotoAndStop("off");
_local1.onRollOver = function () {
this.gotoAndStop("over");
};
_local1.onRollOut = function () {
this.gotoAndStop("off");
};
_local1.onRelease = function () {
this.select();
_global.sType = "match";
};
}
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
this.onRelease = function () {
this.select();
_global.sType = "match";
};
Symbol 244 MovieClip Frame 5
ani2.gotoAndPlay(8);
Symbol 251 MovieClip Frame 1
hourHand_mc.onEnterFrame = function () {
this._rotation = this._rotation + 10;
};
Symbol 254 MovieClip Frame 1
function select() {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.aMatch.length) {
if (aMatch[_local1]._name != _local2._name) {
_local2.aMatch[_local1].deselect();
}
_local1++;
}
delete _local2.onRollOver;
delete _local2.onRollOut;
delete _local2.onRelease;
_local2.gotoAndStop("on");
}
function deselect() {
var _local1 = this;
_local1.gotoAndStop("off");
_local1.onRollOver = function () {
this.gotoAndStop("over");
};
_local1.onRollOut = function () {
this.gotoAndStop("off");
};
_local1.onRelease = function () {
this.select();
_global.sType = "timed";
};
}
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
this.onRelease = function () {
this.select();
_global.sType = "timed";
};
Symbol 270 MovieClip Frame 1
stop();
Symbol 270 MovieClip Frame 2
stop();
Symbol 279 MovieClip Frame 1
Symbol 279 MovieClip Frame 2
boombox_base.speakers.gotoAndStop("on");
Symbol 281 MovieClip [btn_track01] Frame 1
#initclip 74
Object.registerClass("btn_track01", MusicButton);
#endinitclip
stop();
Instance of Symbol 66 MovieClip in Symbol 281 MovieClip [btn_track01] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 285 MovieClip [btn_track02] Frame 1
#initclip 72
Object.registerClass("btn_track02", MusicButton);
#endinitclip
stop();
Instance of Symbol 66 MovieClip "loading" in Symbol 285 MovieClip [btn_track02] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 289 MovieClip [btn_track03] Frame 1
#initclip 73
Object.registerClass("btn_track03", MusicButton);
#endinitclip
stop();
Instance of Symbol 66 MovieClip "loading" in Symbol 289 MovieClip [btn_track03] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 290 Button
on (release) {
stopAllSounds();
this.gotoAndStop("help");
}
Symbol 354 Button
on (release) {
nextFrame();
}
Symbol 359 Button
on (release) {
prevFrame();
}
Symbol 360 Button
on (release) {
nextFrame();
}
Symbol 426 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 2
stop();
Symbol 426 MovieClip Frame 3
stop();
Symbol 431 Button
on (release) {
this.gotoAndPlay(_global.sType);
}
Symbol 435 MovieClip [bg_buildings] Frame 1
#initclip 82
Object.registerClass("bg_buildings", BG);
#endinitclip
Symbol 438 MovieClip [mcBackCrowd] Frame 1
#initclip 75
Object.registerClass("mcBackCrowd", BG);
#endinitclip
Symbol 462 MovieClip Frame 1
stop();
Instance of Symbol 439 MovieClip in Symbol 462 MovieClip Frame 1
onClipEvent (load) {
if (this._parent._parent._parent._parent.bCPUBoard == true) {
this._parent.gotoAndStop(5);
} else {
this._parent.gotoAndStop(_global.nBoard);
}
}
Symbol 468 MovieClip Frame 1
stop();
Symbol 468 MovieClip Frame 21
stop();
Symbol 476 MovieClip Frame 1
stop();
Symbol 477 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 521 MovieClip Frame 7
this._parent._parent.oWorld.onLaunch();
this._parent._visible = false;
this._parent.gotoAndStop("stand");
Symbol 548 MovieClip Frame 7
this._parent._parent.oWorld.onReenter();
this._parent.gotoAndStop("stand");
Symbol 549 MovieClip Frame 1
stop();
this.bCPUBoard = true;
Symbol 570 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 7
this._parent._parent.oWorld.onLaunch();
this._parent._visible = false;
this._parent.gotoAndStop("stand");
Symbol 591 MovieClip Frame 7
this._parent._parent.oWorld.onReenter();
this._parent.gotoAndStop("stand");
Symbol 592 MovieClip Frame 1
stop();
Symbol 593 MovieClip [mcRamp] Frame 1
#initclip 76
Object.registerClass("mcRamp", Ramp);
#endinitclip
stop();
Instance of Symbol 468 MovieClip "skateClatterRight" in Symbol 593 MovieClip [mcRamp] Frame 1
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 468 MovieClip "skateClatterLeft" in Symbol 593 MovieClip [mcRamp] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 593 MovieClip [mcRamp] Frame 9
stop();
Symbol 596 MovieClip Frame 4
stop();
Symbol 617 MovieClip Frame 5
stop();
Symbol 623 MovieClip Frame 18
this._parent._parent.endHandplant();
Symbol 634 MovieClip Frame 16
this._parent._parent.endTrick();
Symbol 635 MovieClip Frame 14
this._parent._parent.endTrick();
Symbol 636 MovieClip Frame 8
this._parent._parent.endTrick();
Symbol 639 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 642 MovieClip Frame 17
this._parent._parent.endTrick();
Symbol 664 MovieClip Frame 26
this._parent._parent.endTrick();
Symbol 670 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 678 MovieClip Frame 23
this._parent._parent.endTrick();
Symbol 679 MovieClip Frame 1
stop();
Symbol 681 MovieClip Frame 4
stop();
Symbol 682 MovieClip Frame 5
stop();
Symbol 683 MovieClip Frame 18
this._parent._parent.endHandplant();
Symbol 684 MovieClip Frame 16
this._parent._parent.endTrick();
Symbol 685 MovieClip Frame 14
this._parent._parent.endTrick();
Symbol 686 MovieClip Frame 8
this._parent._parent.endTrick();
Symbol 687 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 688 MovieClip Frame 17
this._parent._parent.endTrick();
Symbol 699 MovieClip Frame 26
this._parent._parent.endTrick();
Symbol 702 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 703 MovieClip Frame 23
this._parent._parent.endTrick();
Symbol 704 MovieClip Frame 1
stop();
Symbol 705 MovieClip [mcPlayerTrixie] Frame 1
#initclip 77
Object.registerClass("mcPlayerTrixie", Player);
#endinitclip
stop();
this.bCPUBoard = true;
Symbol 708 MovieClip Frame 4
stop();
Symbol 711 MovieClip Frame 5
stop();
Symbol 716 MovieClip Frame 18
this._parent._parent.endHandplant();
Symbol 719 MovieClip Frame 16
this._parent._parent.endTrick();
Symbol 720 MovieClip Frame 14
this._parent._parent.endTrick();
Symbol 721 MovieClip Frame 8
this._parent._parent.endTrick();
Symbol 724 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 725 MovieClip Frame 17
this._parent._parent.endTrick();
Symbol 734 MovieClip Frame 26
this._parent._parent.endTrick();
Symbol 735 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 738 MovieClip Frame 23
this._parent._parent.endTrick();
Symbol 739 MovieClip Frame 1
stop();
Symbol 741 MovieClip Frame 4
stop();
Symbol 742 MovieClip Frame 5
stop();
Symbol 743 MovieClip Frame 18
this._parent._parent.endHandplant();
Symbol 744 MovieClip Frame 16
this._parent._parent.endTrick();
Symbol 745 MovieClip Frame 14
this._parent._parent.endTrick();
Symbol 746 MovieClip Frame 8
this._parent._parent.endTrick();
Symbol 747 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 748 MovieClip Frame 17
this._parent._parent.endTrick();
Symbol 753 MovieClip Frame 26
this._parent._parent.endTrick();
Symbol 754 MovieClip Frame 18
this._parent._parent.endTrick();
Symbol 755 MovieClip Frame 23
this._parent._parent.endTrick();
Symbol 756 MovieClip Frame 1
stop();
Symbol 757 MovieClip [mcPlayerCPU] Frame 1
#initclip 78
Object.registerClass("mcPlayerCPU", Player);
#endinitclip
stop();
Symbol 771 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 2
stop();
Symbol 781 Button
on (release) {
if (this._parent.oBase.playing) {
this.show("help");
}
}
Symbol 784 Button
on (release) {
_global.__main.oBase.pause();
_global.oMusic.stopMusic();
_global.__main.gotoAndStop("welcome");
}
Symbol 787 MovieClip Frame 1
stop();
Symbol 818 MovieClip Frame 1
stop();
Symbol 825 MovieClip Frame 1
stop();
Symbol 841 MovieClip Frame 1
_global.oMusic.stopMusic();
Symbol 841 MovieClip Frame 26
stop();
this._parent._parent._parent.oMain.stopRound();
Symbol 842 MovieClip Frame 1
stop();
Symbol 894 MovieClip [mcTrickInfoPopup] Frame 1
#initclip 79
Object.registerClass("mcTrickInfoPopup", TrickCard);
#endinitclip
stop();
Instance of Symbol 425 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 2
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 854 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 10
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 320 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 18
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 862 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 25
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 866 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 30
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 323 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 38
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 881 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 46
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 320 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 53
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Instance of Symbol 326 MovieClip "mcKeyPress" in Symbol 894 MovieClip [mcTrickInfoPopup] Frame 60
onClipEvent (load) {
if (_global.sType != "match") {
this._visible = false;
}
}
Symbol 906 MovieClip Frame 1
stop();
Symbol 906 MovieClip Frame 2
this._parent._parent.oMain.getReady();
Symbol 906 MovieClip Frame 63
this._parent._parent.oBase.play();
this._parent._parent.oMain.startRound();
Symbol 924 Button
on (release) {
this._visible = false;
this._parent.mcReadyGo.play();
}
Symbol 935 Button
on (release) {
this.resume();
}
Symbol 936 MovieClip [mcNav] Frame 1
#initclip 80
Object.registerClass("mcNav", smashing.Menu);
#endinitclip
stop();
inter = 0;
Instance of Symbol 759 MovieClip "mcTimerBG" in Symbol 936 MovieClip [mcNav] Frame 1
onClipEvent (load) {
if (_global.sType != "timed") {
this._visible = false;
}
}
Instance of Symbol 771 MovieClip in Symbol 936 MovieClip [mcNav] Frame 1
onClipEvent (load) {
if (_global.sType != "match") {
this.gotoAndStop(2);
this._parent.speedRatio._x = this._parent.speedRatio._x + 39;
this._parent.cTries._visible = false;
}
}
Instance of Symbol 818 MovieClip "cTries" in Symbol 936 MovieClip [mcNav] Frame 1
onClipEvent (load) {
this.gotoAndStop(this._parent[this._name + "cache"]);
}
Instance of Symbol 825 MovieClip in Symbol 936 MovieClip [mcNav] Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.sType);
}
Instance of Symbol 842 MovieClip "timeRatio" in Symbol 936 MovieClip [mcNav] Frame 1
onClipEvent (load) {
if (_global.sType != "timed") {
this._visible = false;
this._parent.txtTimer._visible = false;
}
}
Instance of Symbol 934 MovieClip "mcComplete" in Symbol 936 MovieClip [mcNav] Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 936 MovieClip [mcNav] Frame 6
stop();
Symbol 938 MovieClip [KeyGrabber] Frame 1
#initclip 81
Object.registerClass("KeyGrabber", smashing.KeyGrabber);
#endinitclip
Symbol 942 MovieClip Frame 1
stop();
Symbol 952 MovieClip Frame 1
stop();
Instance of Symbol 952 MovieClip in Symbol 953 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_global.sType);
}
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 2
stop();
Symbol 975 MovieClip Frame 1
stop();
Symbol 975 MovieClip Frame 6
stop();
Symbol 985 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
Symbol 998 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};
Symbol 1014 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop("over");
};
this.onRollOut = function () {
this.gotoAndStop("off");
};