Frame 1
var ExpressInstall = function () {
this.needsUpdate = ((_root.MMplayerType == undefined) ? false : true);
};
ExpressInstall.prototype = {init:function () {
if (this.needsUpdate) {
this.loadUpdater();
return(true);
}
return(false);
}, loadUpdater:function () {
System.security.allowDomain("fpdownload.macromedia.com");
this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
var _self = this;
this.updater.installStatus = _self.onInstallStatus;
this.hold = this.updater.createEmptyMovieClip("hold", 1);
this.updater.onEnterFrame = function () {
if (typeof(this.hold.startUpdate) == "function") {
_self.initUpdater();
this.onEnterFrame = null;
}
};
var _local3 = Math.random();
this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?" + _local3);
}, initUpdater:function () {
this.hold.redirectURL = _root.MMredirectURL;
this.hold.MMplayerType = _root.MMplayerType;
this.hold.MMdoctitle = _root.MMdoctitle;
this.hold.startUpdate();
}, onInstallStatus:function (msg) {
if (msg == "Download.Complete") {
} else if (msg == "Download.Cancelled") {
getURL ("not_installed.php");
} else if (msg == "Download.Failed") {
getURL ("not_installed.php");
}
}};
var ExpressInstall = new ExpressInstall();
if (ExpressInstall.needsUpdate) {
ExpressInstall.init();
stop();
}
Frame 3
stop();
_quality = "best";
if (_root.phpPath) {
_global.phpPath = _root.phpPath;
} else {
_global.phpPath = "http://www.pepsiworld.com/amfphp/gateway.php";
}
_global.swfPath = "";
if (_root.skin != undefined) {
_global.origin = _root.skin;
} else {
_global.origin = "pepsi";
}
if (_root.tracking == "on") {
_global.tracker = function (tag) {
flash.external.ExternalInterface.call(tag);
};
}
Frame 18
stop();
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/landing.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Frame 29
stop();
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/instructions.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Frame 39
stop();
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/high_scores.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Frame 45
stop();
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/start.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Frame 46
prevFrame();
Symbol 6 MovieClip Frame 1
this.onEnterFrame = function () {
var _local2 = _parent.getBytesLoaded() / _parent.getBytesTotal();
Percent_txt.text = String(Math.round(_local2 * 100)) + "%";
if (_local2 >= 0.99) {
_parent.play();
}
};
Symbol 11 MovieClip [RemotingClasses] Frame 1
#initclip 44
Object.registerClass("RemotingClasses", mx.remoting.ApiClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 374 MovieClip [__Packages.NewMath] Frame 0
class NewMath
{
function NewMath () {
}
static function d2r(angle, adjust) {
if (adjust && (angle < 0)) {
angle = 360 + angle;
}
if (adjust && (angle >= 360)) {
angle = angle - 360;
}
return(angle * (Math.PI/180));
}
static function r2d(angle, adjust) {
angle = angle * 57.2957795130823;
if (adjust && (angle < 0)) {
angle = 360 + angle;
}
if (adjust && (angle >= 360)) {
angle = angle - 360;
}
return(angle);
}
static function getDistance(x1, x2, y1, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
static function getClipDistance(clip1, clip2) {
return(Math.sqrt(((clip2._x - clip1._x) * (clip2._x - clip1._x)) + ((clip2._y - clip1._y) * (clip2._y - clip1._y))));
}
static function getAngleOfClips(clip1, clip2) {
return(Math.atan2(clip1._y - clip2._y, clip1._x - clip2._x));
}
static function getRandomRange(min, max) {
return(Math.floor((Math.random() * ((max - min) + 1)) + min));
}
static function getAverage(values) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < values.length) {
_local3 = _local3 + values[_local1];
_local1++;
}
_local3 = _local3 / values.length;
return(_local3);
}
static function getMedian(values) {
values.sort();
return(values[Math.floor(values.length / 2)]);
}
static function getMode(values) {
values.sort();
var _local2 = [];
var _local4 = values[0];
_local2.push(0);
var _local1 = 1;
while (_local1 < values.length) {
if (_local4 != values[_local1]) {
_local2.push(_local1 - _local2[_local2.length]);
_local4 = values[_local1];
}
_local1++;
}
return(undefined);
}
function sortModes(a, b) {
return(undefined);
}
}
Symbol 375 MovieClip [__Packages.BoardingBallingScene] Frame 0
class BoardingBallingScene extends MovieClip
{
var startX, _x, startY, _y, game_mc, _parent, onEnterFrame, getBounds, _width, _name, removeMovieClip;
function BoardingBallingScene () {
super();
startX = _x;
startY = _y;
game_mc = _parent;
onEnterFrame = gameScript;
}
function reset() {
_x = startX;
_y = startY;
}
function gameScript() {
_x = _x - game_mc.speed;
if (!triggeredNext) {
if (_x < game_mc.player_mc._x) {
var _local2 = getBounds(_parent);
var _local3 = _local2.xMax - _x;
game_mc.addScene(_x + _local3, _y);
triggeredNext = true;
}
}
if (((_x + _width) + 200) < 0) {
remove();
}
}
function remove() {
delete game_mc.sceneList[_name];
removeMovieClip();
}
var triggeredNext = false;
}
Symbol 376 MovieClip [__Packages.BoardingBallingProjectile] Frame 0
class BoardingBallingProjectile extends MovieClip
{
var game_mc, _parent, onEnterFrame, stop, _x, _y, gotoAndPlay, _name;
function BoardingBallingProjectile () {
super();
game_mc = _parent;
onEnterFrame = gameScript;
(stop());// not popped
}
function gameScript() {
var _local4 = Math.cos(angle) * speed;
var _local3 = Math.sin(angle) * speed;
_x = _x - (_local4 + game_mc.speed);
_y = _y - _local3;
if (_y < limit) {
remove();
}
for (var _local2 in game_mc.targetList) {
if (game_mc.targetList[_local2].trigger.hitTest(this)) {
game_mc.targetList[_local2].hit();
remove(true);
}
}
}
function remove(addHit) {
if (addHit) {
game_mc.hitCount++;
} else {
game_mc.hitCount = 0;
}
(gotoAndPlay("explode"));// not popped
delete game_mc.projectileList[_name];
delete onEnterFrame;
}
var angle = (Math.PI/2);
var speed = 8;
var limit = 225;
}
Symbol 377 MovieClip [__Packages.BoardingBallingTarget] Frame 0
class BoardingBallingTarget extends MovieClip
{
var game_mc, _parent, gotoAndStop, _totalframes, onEnterFrame, hitTest, locTrigger, _x, _width, animation, _name, pointIndicator, points, soundName, removeMovieClip;
function BoardingBallingTarget () {
super();
game_mc = _parent;
(gotoAndStop(random(_totalframes) + 1));// not popped
onEnterFrame = gameScript;
for (var _local4 in game_mc.sceneList) {
if (hitTest(game_mc.sceneList[_local4])) {
for (var _local3 in game_mc.sceneList[_local4]) {
if (game_mc.sceneList[_local4][_local3].locTrigger) {
if (locTrigger.hitTest(game_mc.sceneList[_local4][_local3])) {
_x = (game_mc.sceneList[_local4][_local3]._x + game_mc.sceneList[_local4]._x) + 75;
}
}
}
break;
}
}
for (var _local4 in game_mc.obstacleList) {
if (hitTest(game_mc.obstacleList[_local4])) {
_x = _x + 200;
}
}
for (var _local4 in game_mc.trickList) {
if (hitTest(game_mc.trickList[_local4])) {
_x = _x + 200;
}
}
}
function gameScript() {
_x = _x - (game_mc.speed + speed);
if (((_x + _width) + 200) < 0) {
remove();
}
for (var _local2 in game_mc.obstacleList) {
if (hitTest(game_mc.obstacleList[_local2])) {
speed = 0;
animation.stop();
}
}
for (var _local2 in game_mc.trickList) {
if (hitTest(game_mc.trickList[_local2])) {
speed = 0;
animation.stop();
}
}
}
function hit() {
delete game_mc.targetList[_name];
pointIndicator.play();
game_mc.score = game_mc.score + points;
game_mc.sound_mc.startSound(soundName + (random(sounds) + 1), false, 50);
}
function remove() {
delete game_mc.targetList[_name];
removeMovieClip();
}
var speed = 0;
var sounds = 1;
}
Symbol 378 MovieClip [__Packages.BoardingBallingTrick] Frame 0
class BoardingBallingTrick extends MovieClip
{
var game_mc, _parent, gotoAndStop, _totalframes, onEnterFrame, _x, _width, pointIndicator, points, _name, removeMovieClip;
function BoardingBallingTrick () {
super();
game_mc = _parent;
(gotoAndStop(random(_totalframes) + 1));// not popped
onEnterFrame = gameScript;
}
function gameScript() {
_x = _x - game_mc.speed;
if (((_x + _width) + 200) < 0) {
remove();
}
}
function hit() {
pointIndicator.play();
game_mc.score = game_mc.score + points;
game_mc.sound_mc.startSound("jumpvoice" + (random(4) + 1), false, 25);
}
function remove() {
delete game_mc.trickList[_name];
removeMovieClip();
}
}
Symbol 379 MovieClip [__Packages.BoardingBallingObstacle] Frame 0
class BoardingBallingObstacle extends MovieClip
{
var game_mc, _parent, gotoAndStop, _totalframes, onEnterFrame, _x, _width, _name, removeMovieClip;
function BoardingBallingObstacle () {
super();
game_mc = _parent;
(gotoAndStop(random(_totalframes) + 1));// not popped
onEnterFrame = gameScript;
}
function gameScript() {
_x = _x - game_mc.speed;
if (((_x + _width) + 200) < 0) {
remove();
}
}
function deactivate() {
delete game_mc.obstacleList[_name];
}
function remove() {
deactivate();
removeMovieClip();
}
}
Symbol 380 MovieClip [__Packages.BoardingBallingBonus] Frame 0
class BoardingBallingBonus extends BoardingBallingTarget
{
var game_mc, hitTest, _x, _name, pointIndicator, points;
function BoardingBallingBonus () {
super();
for (var _local3 in game_mc.targetList) {
if ((this != game_mc.targetList[_local3]) && (hitTest(game_mc.targetList[_local3]))) {
_x = _x + 100;
}
}
}
function hit() {
delete game_mc.targetList[_name];
pointIndicator.play();
game_mc.score = game_mc.score + points;
}
}
Symbol 381 MovieClip [__Packages.SoundController] Frame 0
class SoundController extends MovieClip
{
var stop, soundList, rate, createEmptyMovieClip, getNextHighestDepth, _vol, ref, _parent, onEnterFrame, stopAfterFade, removeMovieClip, _dir, _rate;
function SoundController () {
super();
(stop());// not popped
trace("SoundController Object: " + this);
soundList = {};
setFadeRate(2);
}
function setFadeRate(rt) {
if ((rt != undefined) && (rt != 0)) {
rate = Math.abs(rt);
}
}
function startSound(snd, loop, vol, fade, target, callback) {
if (soundList[snd]) {
if ((soundList[snd].position / soundList[snd].duration) < 1) {
return(undefined);
}
}
trace("STARTING SOUND: " + snd);
if (target) {
soundList[snd] = new Sound(target);
} else {
var _local3 = createEmptyMovieClip(snd + "clip", getNextHighestDepth());
soundList[snd] = new Sound(_local3);
_local3.ref = soundList[snd];
}
soundList[snd].attachSound(snd);
if (vol == undefined) {
vol = 100;
} else if (fade) {
soundList[snd].setVolume(0);
_local3._vol = vol;
_local3._dir = 0;
_local3.onEnterFrame = fadeIn;
} else {
soundList[snd].setVolume(vol);
}
if (loop) {
soundList[snd].onSoundComplete = function () {
this.start();
};
}
if (callback) {
soundList[snd].onSoundComplete = callback;
}
soundList[snd].start();
}
function stopSound(snd, fade) {
if (fade) {
trace("FADING OUT SOUND " + snd);
this[snd + "clip"].onEnterFrame = fadeOut;
this[snd + "clip"].stopAfterFade = true;
} else {
trace("STOPPING SOUND " + snd);
soundList[snd].stop();
this[snd + "clip"].removeMovieClip();
}
}
function stopAll() {
for (var _local2 in soundList) {
stopSound(_local2);
}
}
function fadeIn() {
if (ref.getVolume() < _vol) {
ref.setVolume(ref.getVolume() + _parent.rate);
} else {
ref.setVolume(_vol);
delete onEnterFrame;
}
}
function fadeOut() {
if (ref.getVolume() > 0) {
ref.setVolume(ref.getVolume() - _parent.rate);
} else {
ref.setVolume(0);
if (stopAfterFade) {
ref.stop();
removeMovieClip();
} else {
delete onEnterFrame;
}
}
}
function fadeTo(snd, vol, rt) {
if ((rt == undefined) || (rt == 0)) {
rt = rate;
} else {
rt = Math.abs(rt);
}
trace((((("FADE SOUND " + snd) + " TO LEVEL ") + vol) + " AT A RATE OF ") + rate);
var _local5;
if (soundList[snd].getVolume() == vol) {
return(undefined);
}
if (soundList[snd].getVolume() < vol) {
trace("SOUND IS QUIETER THAN IT SHOULD BE");
_local5 = 1;
} else if (soundList[snd].getVolume() > vol) {
trace("SOUND IS LOUDER THAN IT SHOULD BE");
_local5 = -1;
}
this[snd + "clip"]._rate = rt;
this[snd + "clip"]._dir = _local5;
this[snd + "clip"]._vol = vol;
this[snd + "clip"].onEnterFrame = fadeToLevel;
}
function fadeToLevel() {
if ((ref.getVolume() < _vol) && (_dir == 1)) {
ref.setVolume(ref.getVolume() + _rate);
} else if ((ref.getVolume() <= _vol) && (_dir == -1)) {
ref.setVolume(_vol);
delete onEnterFrame;
} else if ((ref.getVolume() > _vol) && (_dir == -1)) {
ref.setVolume(ref.getVolume() - _rate);
} else if ((ref.getVolume() >= _vol) && (_dir == 1)) {
ref.setVolume(_vol);
delete onEnterFrame;
}
}
}
Symbol 31 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder
{
}
Symbol 28 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 30 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 29 MovieClip [__Packages.mx.rpc.Fault] Frame 0
class mx.rpc.Fault extends Object
{
var __faultcode, __faultstring, __detail, __type, __description;
function Fault (code, msg, detail, type) {
super();
__faultcode = code;
__faultstring = msg;
__detail = detail;
__type = type;
}
function get faultcode() {
return(__faultcode);
}
function get faultstring() {
return(__faultstring);
}
function get detail() {
return(__detail);
}
function get description() {
if (__description == null) {
if (__faultstring.indexOf(":") > -1) {
__description = __faultstring.substring(__faultstring.indexOf(":") + 1);
var _local2 = 0;
while (__description.indexOf(" ", _local2) == _local2) {
_local2++;
}
if (_local2 > 0) {
__description = __description.substring(_local2);
}
} else {
__description = __faultstring;
}
}
return(__description);
}
function get type() {
return(__type);
}
}
Symbol 35 MovieClip [__Packages.mx.rpc.RelayResponder] Frame 0
class mx.rpc.RelayResponder extends Object implements mx.rpc.Responder
{
var __obj, __onFault, __onResult;
function RelayResponder (resp, resultFunc, faultFunc) {
super();
__obj = resp;
__onFault = faultFunc;
__onResult = resultFunc;
}
function onFault(fault) {
__obj[__onFault](fault);
}
function onResult(result) {
__obj[__onResult](result);
}
}
Symbol 20 MovieClip [__Packages.mx.remoting.NetServiceProxy] Frame 0
class mx.remoting.NetServiceProxy extends Object
{
var nc, serviceName, client;
function NetServiceProxy (netC, servName, cli) {
super();
if (netC != null) {
nc = netC;
serviceName = servName;
client = cli;
}
_allowRes = true;
}
function _setParentService(service) {
nc = service.nc;
client = service.client;
}
function __resolve(methodName) {
if (_allowRes) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new mx.remoting.NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
mx.remoting.NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, and no responder was given in call to " + methodName);
arguments.unshift(new mx.remoting.NetServiceProxyResponder(this, methodName));
}
if (typeof(this.serviceName) == "function") {
this.serviceName = this.servicename;
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
}
return(null);
}
static function registerNetServiceProxy() {
Object.registerClass("NetServiceProxy", mx.remoting.NetServiceProxy);
return(true);
}
static var init = registerNetServiceProxy();
var _allowRes = false;
}
Symbol 18 MovieClip [__Packages.mx.remoting.Connection] Frame 0
class mx.remoting.Connection extends NetConnection
{
var uri, __urlSuffix, __originalUrl;
function Connection () {
super();
}
function getService(serviceName, client) {
var _local2 = new mx.remoting.NetServiceProxy(this, serviceName, client);
return(_local2);
}
function setCredentials(userId, password) {
addHeader("Credentials", false, {userid:userId, password:password});
}
function clone() {
var _local2 = new mx.remoting.Connection();
_local2.connect(uri);
return(_local2);
}
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) {
__urlSuffix = urlSuffix;
if (__originalUrl == null) {
__originalUrl = uri;
}
var _local2 = __originalUrl + urlSuffix;
connect(_local2);
}
function ReplaceGatewayUrl(newUrl) {
connect(newUrl);
}
function RequestPersistentHeader(info) {
addHeader(info.name, info.mustUnderstand, info.data);
}
static var version = "1.2.0.124";
}
Symbol 21 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 = service.client;
if ((result instanceof mx.remoting.NetServiceProxy) || (result instanceof mx.remoting.RecordSet)) {
result._setParentService(service);
}
var _local4 = methodName + "_Result";
if (typeof(_local2[_local4]) == "function") {
_local2[_local4].apply(_local2, [result]);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 1, (_local4 + " was received from server: ") + result);
}
}
function onStatus(result) {
var _local4 = service.client;
var _local6 = methodName + "_Status";
if (typeof(_local4[_local6]) == "function") {
_local4[_local6].apply(_local4, [result]);
} else if (typeof(_local4.onStatus) == "function") {
_local4.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: <") + result.level) + "> ") + result.description);
}
}
}
Symbol 13 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData
{
}
Symbol 12 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange
{
}
Symbol 14 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList extends mx.data.PageableData
{
}
Symbol 19 MovieClip [__Packages.mx.remoting.RecordSet] Frame 0
class mx.remoting.RecordSet extends Object implements mx.data.PageableList
{
var _items, uniqueID, mTitles, serverInfo, serverinfo, mRecordsAvailable, mRecordSetID, serviceName, mTotalCount, mDeliveryMode, mAllNotified, mOutstandingRecordCount, dispatchEvent, mPageSize, mNumPrefetchPages, mRecordSetService, gateway_conn, logger, mDataFetcher;
function RecordSet (columnNames) {
super();
mx.events.EventDispatcher.initialize(this);
_items = new Array();
uniqueID = 0;
if (mTitles != null) {
return;
}
if (serverInfo == null) {
if (serverinfo != null) {
serverInfo = serverinfo;
}
}
if (serverInfo == null) {
mTitles = columnNames;
return;
}
if (serverInfo.version != 1) {
mx.remoting.NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
return;
}
mTitles = serverInfo.columnNames;
mRecordsAvailable = 0;
setData(((serverInfo.cursor == null) ? 0 : (serverInfo.cursor - 1)), serverInfo.initialData);
if (serverInfo.initialData.length != serverInfo.totalCount) {
mRecordSetID = serverInfo.id;
if (mRecordSetID != null) {
serviceName = ((serverInfo.serviceName == null) ? "RecordSet" : (serverInfo.serviceName));
mTotalCount = serverInfo.totalCount;
mDeliveryMode = "ondemand";
mAllNotified = false;
mOutstandingRecordCount = 0;
} else {
mx.remoting.NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
serverInfo = null;
}
function addItem(item) {
addItemAt(length, item);
}
function addItemAt(index, item) {
var _local3 = true;
if ((index < length) && (index >= 0)) {
items.splice(index, 0, item);
} else if (index == length) {
items[index] = item;
} else {
_local3 = false;
mx.remoting.NetServices.trace("Cannot add an item outside the bounds of the RecordSet");
return(undefined);
}
if (_local3) {
item.__ID__ = uniqueID++;
}
updateViews("addItems", index, index);
}
function addEventListener(event, listener) {
}
function clear() {
if (checkLocal()) {
return(undefined);
}
var _local2 = items.length;
items.splice(0);
uniqueID = 0;
updateViews("removeItems", 0, _local2);
}
function contains(itmToCheck) {
if (isObjectEmpty(itmToCheck)) {
return(false);
}
var _local5;
var _local4;
var _local2 = 0;
while (_local2 < items.length) {
_local5 = items[_local2];
_local4 = true;
for (var _local6 in itmToCheck) {
if (itmToCheck[_local6] != _local5[_local6]) {
_local4 = false;
break;
}
}
if (_local4) {
return(true);
}
_local2++;
}
return(false);
}
function getColumnNames() {
return(mTitles);
}
function get columnNames() {
return(getColumnNames());
}
function getLocalLength() {
return(items.length);
}
function getLength() {
if (mRecordSetID != null) {
return(mTotalCount);
}
return(items.length);
}
function getIterator() {
var _local2 = new mx.remoting.RecordSetIterator(this);
return(_local2);
}
function get length() {
return(getLength());
}
function getItemAt(index) {
if ((index < 0) || (index >= length)) {
return(null);
}
if (mRecordSetID == null) {
return(items[index]);
}
requestRecord(index);
var _local3 = items[index];
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()) {
return(undefined);
}
var _local4 = new mx.remoting.RecordSet(mTitles);
var _local5 = length;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = getItemAt(_local3);
if (((_local2 != null) && (_local2 != 1)) && (filterFunction(_local2, context))) {
_local4.addItem(_local2);
}
_local3++;
}
return(_local4);
}
function sortItems(compareFunc, optionFlags) {
if (checkLocal()) {
return(undefined);
}
items.sort(compareFunc, optionFlags);
updateViews("sort");
}
function sortItemsBy(fieldNames, order, optionFlags) {
if (checkLocal()) {
return(undefined);
}
if (typeof(order) == "string") {
items.sortOn(fieldNames);
if (order.toUpperCase() == "DESC") {
items.reverse();
}
} else {
items.sortOn(fieldNames, optionFlags);
}
updateViews("sort");
}
function sort(compareFunc) {
if (checkLocal()) {
return(undefined);
}
items.sort(compareFunc);
updateViews("sort");
}
function isEmpty() {
return(items.length == 0);
}
function isLocal() {
return(mRecordSetID == null);
}
function isFullyPopulated() {
return(isLocal());
}
function getRemoteLength() {
if (isLocal()) {
return(mRecordsAvailable);
}
return(mTotalCount);
}
function getNumberAvailable() {
if (isLocal()) {
return(getLength());
}
return(mRecordsAvailable);
}
function replaceItemAt(index, item) {
if ((index >= 0) && (index <= length)) {
var _local3 = getItemID(index);
items[index] = item;
items[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
}
function removeAll() {
clear();
}
function removeItemAt(index) {
var _local3 = _items[index];
_items.splice(index, 1);
var _local5 = [_items[index]];
var _local4 = [getItemID(index)];
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:index, removedItems:_local5, removedIDs:_local4});
return(_local3);
}
function removeEventListener(event, listener) {
}
function requestRange(range) {
var _local2 = range.getStart();
var _local3 = range.getEnd();
return(internalRequestRange(_local2, _local3));
}
function setDeliveryMode(mode, pagesize, numPrefetchPages) {
mDeliveryMode = mode.toLowerCase();
stopFetchAll();
if ((pagesize == null) || (pagesize <= 0)) {
pagesize = 25;
}
switch (mDeliveryMode) {
case "ondemand" :
break;
case "page" :
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
mPageSize = pagesize;
mNumPrefetchPages = numPrefetchPages;
break;
case "fetchall" :
stopFetchAll();
startFetchAll(pagesize);
break;
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) {
if (checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= getLength())) {
return(undefined);
}
items[index][fieldName] = value;
updateViews("updateItems", index, index);
}
function isObjectEmpty(objToCheck) {
var _local1 = true;
for (var _local3 in objToCheck) {
_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 _local4 = new Object();
var _local5 = anArray.length;
var _local3;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = mTitles[_local2];
if (_local3 == null) {
_local3 = ("column" + _local2) + 1;
}
_local4[_local3] = anArray[_local2];
_local2++;
}
return(_local4);
}
function checkLocal() {
if (isLocal()) {
return(false);
}
mx.remoting.NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(true);
}
function getRecordSetService() {
if (mRecordSetService == null) {
if (gateway_conn == null) {
gateway_conn = mx.remoting.NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
gateway_conn = gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
gateway_conn.setupRecordSet();
gateway_conn.setDebugId("RecordSet " + mRecordSetID);
}
mRecordSetService = gateway_conn.getService(serviceName, this);
if (mRecordSetService == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
mRecordSetService = null;
}
}
return(mRecordSetService);
}
function internalRequestRange(index, lastIndex) {
var _local6 = -1;
if (index < 0) {
index = 0;
}
if (lastIndex >= getRemoteLength()) {
lastIndex = getRemoteLength() - 1;
}
var _local3;
var _local4;
while (index <= lastIndex) {
while ((index <= lastIndex) && (items[index] != null)) {
index++;
}
_local3 = index;
while ((index <= lastIndex) && (items[index] == null)) {
mOutstandingRecordCount++;
items[index] = 1;
index++;
}
_local4 = index - 1;
if (_local3 <= _local4) {
logger.logInfo((((" Fetching records from index [" + _local3) + "] to index [") + _local4) + "]");
getRecordSetService().getRecords(mRecordSetID, _local3 + 1, (_local4 - _local3) + 1);
_local6 = _local4;
updateViews("fetchRows", _local3, _local4);
}
}
return(_local6);
}
function removeItems(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = items.splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function getRecords_Result(info) {
setData(info.Cursor - 1, info.Page);
mOutstandingRecordCount = mOutstandingRecordCount - info.Page.length;
updateViews("updateItems", info.Cursor - 1, ((info.Cursor - 1) + info.Page.length) - 1);
if ((mRecordsAvailable == mTotalCount) && (!mAllNotified)) {
updateViews("allRows");
mRecordSetService.release();
mAllNotified = true;
mRecordSetID = null;
mRecordSetService = null;
}
}
function release_Result() {
}
function requestOneRecord(index) {
if (items[index] == null) {
if (mDeliveryMode == "ondemand") {
logger.logInfo((" INFO: Fetching Record [" + index) + "]");
}
getRecordSetService().getRecords(mRecordSetID, index + 1, 1);
mOutstandingRecordCount++;
items[index] = 1;
updateViews("fetchRows", index, index);
}
}
function requestRecord(index) {
if (mDeliveryMode != "page") {
requestOneRecord(index);
} else {
var _local2 = int(index / mPageSize) * mPageSize;
var _local3 = (_local2 + (mPageSize * (mNumPrefetchPages + 1))) - 1;
internalRequestRange(_local2, _local3);
}
}
function _setParentService(service) {
gateway_conn = service.nc;
}
function setData(start, dataArray) {
var _local5 = dataArray.length;
var _local3;
var _local4;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = _local2 + start;
_local4 = items[_local3];
if ((_local4 != null) && (_local4 != 1)) {
mx.remoting.NetServices.trace("RecordSet", "warning", 106, "Already got record # " + _local3);
} else {
mRecordsAvailable = mRecordsAvailable + 1;
}
items[_local3] = arrayToObject(dataArray[_local2]);
items[_local3].__ID__ = uniqueID++;
_local2++;
}
}
function startFetchAll(pagesize) {
if (mDataFetcher != null) {
mDataFetcher.disable();
}
mDataFetcher = new mx.remoting.RsDataFetcher(this, 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 16 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
if (level <= this.level) {
if (level == DEBUG) {
onLog((((getDateString() + " [DEBUG] ") + name) + ": ") + msg);
} else {
onLog((((getDateString() + " [INFO] ") + name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
trace(message);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 15 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 17 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) {
logger = infoLogger;
if (url == undefined) {
url = gatewayUrl;
if (url == undefined) {
url = defaultGatewayUrl;
}
}
if (url == undefined) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is undefined");
logger.logInfo(("NetServices: createGatewayConnection - gateway url <" + url) + "> is undefined", mx.services.Log.DEBUG);
return(null);
}
var _local2 = new mx.remoting.Connection();
_local2.connect(url);
__sharedConnections[url] = _local2;
return(_local2);
}
static function getConnection(uri) {
return(__sharedConnections[uri]);
}
static function getHostUrl() {
if (!isHttpUrl(_root._url)) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
return(_root._url.substring(0, _local2));
}
static function isHttpUrl(url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
static function getHttpUrl(url) {
if (!isHttpUrl(url)) {
url = getHostUrl() + url;
}
return(url);
}
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 22 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator
{
}
Symbol 23 MovieClip [__Packages.mx.remoting.RecordSetIterator] Frame 0
class mx.remoting.RecordSetIterator implements mx.utils.Iterator
{
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 25 MovieClip [__Packages.mx.remoting.RsDataFetcher] Frame 0
class mx.remoting.RsDataFetcher extends Object
{
var mRecordSet, mIncrement, mNextRecord, mEnabled, mHighestRequested;
function RsDataFetcher (pgRS, increment) {
super();
mRecordSet = pgRS;
mRecordSet.addEventListener("modelChanged", this);
mIncrement = increment;
mNextRecord = 0;
mEnabled = true;
doNext();
}
function disable() {
mEnabled = false;
}
function doNext() {
if (mEnabled) {
while (true) {
if (mNextRecord >= mRecordSet.getRemoteLength()) {
return(undefined);
}
var _local2 = new mx.remoting.RsDataRange(mNextRecord, (mNextRecord + mIncrement) - 1);
mHighestRequested = mRecordSet.requestRange(_local2);
mNextRecord = mNextRecord + mIncrement;
if (mHighestRequested > 0) {
return(undefined);
}
}
}
}
function modelChanged(eventObj) {
if (((eventObj.eventName == "updateItems") && (eventObj.firstItem <= mHighestRequested)) && (eventObj.lastItem >= mHighestRequested)) {
doNext();
}
if (eventObj.eventName == "allRows") {
disable();
}
}
}
Symbol 24 MovieClip [__Packages.mx.remoting.RsDataRange] Frame 0
class mx.remoting.RsDataRange extends Object implements mx.data.DataRange
{
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 27 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) {
result.serviceName = result.serviceName;
if (result != null) {
if (result instanceof mx.remoting.NetServiceProxy) {
var _local4 = new mx.remoting.Service(null, null, result.serviceName, __service.__get__connection(), __service.__get__responder());
result = _local4;
} else if (result instanceof mx.remoting.RecordSet) {
var _local3 = new mx.remoting.NetServiceProxy(__service.__get__connection());
result._setParentService(_local3);
result.logger = __service.log;
}
}
if (__responder != null) {
__responder.onResult(new mx.rpc.ResultEvent(result));
}
if (__service.log != null) {
__service.log.logInfo((((__service.__get__name() + ".") + __methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(result));
}
}
function onStatus(status) {
if (__responder != null) {
__responder.onFault(new mx.rpc.FaultEvent(new mx.rpc.Fault(status.code, status.description, status.details, status.type)));
}
if (__service.log != null) {
__service.log.logDebug("Service invocation failed.");
__service.log.logDebug((((__service.__get__name() + ".") + __methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(status));
}
}
function get methodName() {
return(__methodName);
}
static var inited = mx.remoting.NetServiceProxy.registerNetServiceProxy();
}
Symbol 32 MovieClip [__Packages.mx.remoting.Service] Frame 0
class mx.remoting.Service extends Object
{
var log, __conn, __serviceName, __responder;
function Service (gatewayURI, logger, serviceName, conn, resp) {
super();
log = logger;
log.logInfo("Creating Service for " + serviceName, mx.services.Log.VERBOSE);
if ((gatewayURI == "") && (conn == null)) {
gatewayURI = mx.remoting.NetServices.gatewayUrl;
}
gatewayURI = mx.remoting.NetServices.getHttpUrl(gatewayURI);
if (conn == null) {
conn = mx.remoting.NetServices.getConnection(gatewayURI);
if (conn == null) {
log.logInfo("Creating gateway connection for " + gatewayURI, mx.services.Log.VERBOSE);
conn = mx.remoting.NetServices.createGatewayConnection(gatewayURI, logger);
}
}
__conn = conn;
conn.updateConfig();
_allowRes = true;
__serviceName = serviceName;
__responder = resp;
log.logInfo("Successfully created Service", mx.services.Log.VERBOSE);
}
function get connection() {
return(__conn);
}
function __resolve(methodName) {
if (_allowRes) {
var _local2 = __makeOpFunc(methodName);
this[methodName] = _local2;
return(_local2);
}
return(null);
}
function __makeOpFunc(name) {
var op = (new mx.remoting.Operation(name, this));
var _local3 = function () {
op.invoke(arguments);
return(op.send());
};
_local3.send = function () {
return(op.createThenSend());
};
_local3.setResponder = function (resp) {
op.responder = resp;
};
_local3.getRequest = function () {
return(op.request);
};
_local3.setRequest = function (val) {
op.request = val;
};
_local3.addProperty("request", _local3.getRequest, _local3.setRequest);
_local3.operation = op;
return(_local3);
}
function get name() {
return(__serviceName);
}
function get responder() {
return(__responder);
}
static var version = "1.2.0.124";
var _allowRes = false;
}
Symbol 33 MovieClip [__Packages.mx.remoting.Operation] Frame 0
class mx.remoting.Operation
{
var __service, __responder, __methodName, __invokationName, __request, __arguments;
function Operation (methodName, parent) {
__service = parent;
__responder = parent.responder;
__methodName = methodName;
__invokationName = (__service.__get__name() + ".") + methodName;
__request = new Object();
__arguments = new Array();
}
function createThenSend(Void) {
createArguments();
return(send());
}
function send(Void) {
__service.log.logInfo((("Invoking " + __methodName) + " on ") + __service.__get__name());
var _local3 = new mx.remoting.PendingCall(__service, __methodName);
_local3.__set__responder(__responder);
var _local2 = null;
if (__arguments == null) {
_local2 = new Array();
} else {
_local2 = __arguments.concat();
}
__invokationName = (__service.__get__name() + ".") + __methodName;
_local2.unshift(__invokationName, _local3);
__service.__get__connection().call.apply(__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() {
if (__request != null) {
__arguments = new Array();
for (var _local2 in __request) {
if (_local2 != "arguments") {
__arguments.unshift(__request[_local2]);
}
}
}
}
}
Symbol 34 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 _local3 = new mx.data.binding.ObjectDumper();
if (maxLineLength == undefined) {
maxLineLength = 100;
}
if (indent == undefined) {
indent = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local8 = 0;
while (_local8 < inProgress.length) {
if (inProgress[_local8] == obj) {
return("***");
}
_local8++;
}
inProgress.push(obj);
indent++;
var _local16 = typeof(obj);
var _local5;
if ((obj instanceof XMLNode) && (showXMLstructures != true)) {
_local5 = obj.toString();
} else if (obj instanceof Date) {
_local5 = obj.toString();
} else if (_local16 == "object") {
var _local4 = new Array();
if (obj instanceof Array) {
_local5 = "[";
var _local15 = 0;
while (_local15 < obj.length) {
_local4.push(_local15);
_local15++;
}
} else {
_local5 = "{";
for (var _local15 in obj) {
_local4.push(_local15);
}
_local4.sort();
}
var _local9 = "";
var _local3 = 0;
while (_local3 < _local4.length) {
var _local6 = obj[_local4[_local3]];
var _local7 = true;
if (typeof(_local6) == "function") {
_local7 = showFunctions == true;
}
if (typeof(_local6) == "undefined") {
_local7 = showUndefined == true;
}
if (_local7) {
_local5 = _local5 + _local9;
if (!(obj instanceof Array)) {
_local5 = _local5 + (_local4[_local3] + ": ");
}
_local5 = _local5 + realToString(_local6, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
_local9 = ", `";
}
_local3++;
}
if (obj instanceof Array) {
_local5 = _local5 + "]";
} else {
_local5 = _local5 + "}";
}
} else if (_local16 == "function") {
_local5 = "function";
} else if (_local16 == "string") {
_local5 = ("\"" + obj) + "\"";
} else {
_local5 = String(obj);
}
if (_local5 == "undefined") {
_local5 = "-";
}
inProgress.pop();
return(replaceAll(_local5, "`", ((_local5.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var _local4 = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
_local4 = _local4 + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(_local4);
}
function doIndent(indent) {
var _local2 = "";
var _local1 = 0;
while (_local1 < indent) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 382 MovieClip [__Packages.CRMHighScoreBoard] Frame 0
class CRMHighScoreBoard extends MovieClip
{
var stop, leaderboard, scores1, scores2, nextFrame, Column1_txt, Column2_txt;
function CRMHighScoreBoard () {
super();
(stop());// not popped
leaderboard = new mx.remoting.Service(_global.phpPath, null, "RegGame", null, null);
loadScores();
}
function loadScores() {
if (_global.origin == "pepsi") {
var _local4 = "crm_holiday_2006_xtras";
} else {
var _local4 = "crm_holiday_2006_dew";
}
var _local3 = leaderboard.getGameTopScorerList(_local4);
_local3.__set__responder(new mx.rpc.RelayResponder(this, "getGameScore_Result", "getGameScore_Fault"));
}
function getOverall() {
loadScores();
}
function getThisWeek() {
if (_global.origin == "pepsi") {
var _local4 = "crm_holiday_2006_xtras";
} else {
var _local4 = "crm_holiday_2006_dew";
}
var _local3 = leaderboard.getGameTopScorerList(_local4, 10, 7);
_local3.__set__responder(new mx.rpc.RelayResponder(this, "getGameScore_Result", "getGameScore_Fault"));
}
function createScoreTable(arr) {
scores1 = (scores2 = "");
var _local4 = "<font color=\"#00A0C6\">";
var _local5 = "<font color=\"#91EAF9\">";
var _local3 = 0;
while (_local3 < 5) {
if (arr[_local3].RANK) {
var _local6 = "0" + String(arr[_local3].RANK);
scores1 = scores1 + (((((((((((((_local4 + _local6.substring(_local6.length - 2)) + "</font>") + _local5) + ".<font> ") + _local4) + arr[_local3].PLAYER) + "</font>") + _local5) + " -</font> ") + _local4) + formatScore(arr[_local3].SCORE)) + "</font>") + newline);
} else {
break;
}
_local3++;
}
_local3 = 5;
while (_local3 < 10) {
if (arr[_local3].RANK) {
var _local6 = "0" + String(arr[_local3].RANK);
scores2 = scores2 + (((((((((((((_local4 + _local6.substring(_local6.length - 2)) + "</font>") + _local5) + ".<font> ") + _local4) + arr[_local3].PLAYER) + "</font>") + _local5) + " -</font> ") + _local4) + formatScore(arr[_local3].SCORE)) + "</font>") + newline);
} else {
break;
}
_local3++;
}
(nextFrame());// not popped
Column1_txt.htmlText = scores1;
Column2_txt.htmlText = scores2;
}
function formatScore(num) {
var _local2 = String(num);
var _local1 = _local2.length - 3;
while (_local1 > 0) {
_local2 = (_local2.substring(0, _local1) + "<font color=\"#91EAF9\">,</font>") + _local2.substring(_local1);
_local1 = _local1 - 3;
}
return(_local2);
}
function getGameScore_Result(r) {
if (r.__get__result().ERROR == 0) {
createScoreTable(r.__get__result().RESPONSE_DATA.LEADERBOARD);
} else {
displayError();
}
}
function getGameScore_Fault(f) {
displayError();
}
function displayError() {
(nextFrame());// not popped
Column1_txt.text = "Sorry, there was a problem accessing the scores.";
Column2_txt.text = "Please try again later.";
}
}
Symbol 383 MovieClip [__Packages.BoardingBallingGame] Frame 0
class BoardingBallingGame extends MovieClip
{
var _rotation, score_mc, _parent, lives_mc, messages_mc, sound_mc, startX, _x, startY, _y, objectInterval, targetInterval, bonusInterval, livesLeft, lives, projectileList, trickList, targetList, obstacleList, sceneList, _score, onEnterFrame, objectIntervalID, targetIntervalID, bonusIntervalID, player_mc, attachMovie, npcLoc;
function BoardingBallingGame () {
super();
init();
_rotation = -45;
score_mc = _parent.score_mc;
lives_mc = _parent.lives_mc;
messages_mc = _parent.messages_mc;
sound_mc = _parent.sound_mc;
startX = _x;
startY = _y;
}
function init() {
objectInterval = 4000;
targetInterval = 3000;
bonusInterval = 60000;
score = (0);
hitCount = (0);
livesLeft = lives;
projectileList = new Object();
trickList = new Object();
targetList = new Object();
obstacleList = new Object();
sceneList = new Object();
}
function set score(scr) {
_score = scr;
score_mc.setScore(scr);
//return(score);
}
function get score() {
return(_score);
}
function set hitCount(hit) {
_hitCount = hit;
if (hitCount == 3) {
messages_mc.gotoAndStop("3inarow");
_hitCount = 0;
}
//return(hitCount);
}
function get hitCount() {
return(_hitCount);
}
function startGame() {
onEnterFrame = increaseSpeed;
objectIntervalID = setInterval(this, "addNPC", objectInterval);
targetIntervalID = setInterval(this, "addTarget", targetInterval);
bonusIntervalID = setInterval(this, "addBonus", bonusInterval);
sound_mc.startSound("windsound", true, 100, true);
}
function reset() {
gameOver = false;
player_mc.reset();
score_mc.reset();
lives_mc.reset();
init();
_x = startX;
_y = startY;
}
function playerFall() {
onEnterFrame = decreaseSpeed;
loseLife();
clearInterval(objectIntervalID);
clearInterval(targetIntervalID);
clearInterval(bonusIntervalID);
}
function quit() {
clearInterval(objectIntervalID);
clearInterval(targetIntervalID);
clearInterval(bonusIntervalID);
}
function onUnload() {
clearInterval(objectIntervalID);
clearInterval(targetIntervalID);
clearInterval(bonusIntervalID);
}
function increaseSpeed() {
speed = speed + acceleration;
if (speed > maxspeed) {
speed = maxspeed;
}
}
function decreaseSpeed() {
speed = speed - (acceleration / 2);
if (speed < 0) {
stopMoving();
}
}
function stopMoving() {
speed = 0;
delete onEnterFrame;
}
function loseLife() {
livesLeft--;
if (livesLeft <= 0) {
endGame();
}
lives_mc.loseLife();
}
function endGame() {
onEnterFrame = decreaseSpeed;
messages_mc.gotoAndPlay("end");
gameOver = true;
}
function addScene(x, y) {
var _local3 = random(totalscenes) + 1;
depthID++;
var _local2 = attachMovie("scene" + String(_local3), "scene" + String(depthID), depthID, {_x:x, _y:y});
sceneList["scene" + String(depthID)] = _local2;
player_mc.setDepthTo(mx.managers.DepthManager.kTop);
}
function addProjectile(x, y) {
depthID++;
var _local2 = attachMovie("snowball", "proj" + String(depthID), depthID, {_x:x, _y:y, _xscale:75, _yscale:75});
projectileList["proj" + String(depthID)] = _local2;
}
function addNPC() {
clearInterval(objectIntervalID);
var _local2 = Math.ceil(Math.random() * 3);
switch (_local2) {
case 1 :
addObstacle();
break;
case 2 :
addTrick();
break;
case 3 :
addObstacle();
break;
}
objectInterval = objectInterval - 2;
objectIntervalID = setInterval(this, "addNPC", objectInterval);
}
function addObstacle() {
depthID++;
var _local2 = attachMovie("obstacles", "obstacle" + depthID, depthID, {_x:npcLoc._x, _y:npcLoc._y});
obstacleList["obstacle" + String(depthID)] = _local2;
}
function addTarget() {
clearInterval(targetIntervalID);
depthID++;
var _local2 = attachMovie("targets", "target" + depthID, depthID, {_x:npcLoc._x, _y:npcLoc._y, _xscale:75, _yscale:75});
targetList["target" + String(depthID)] = _local2;
targetInterval = targetInterval - 2;
targetIntervalID = setInterval(this, "addTarget", targetInterval);
}
function addTrick() {
depthID++;
var _local2 = attachMovie("tricks", "trick" + depthID, depthID, {_x:npcLoc._x, _y:npcLoc._y});
trickList["trick" + String(depthID)] = _local2;
}
function addBonus() {
depthID++;
var _local2 = attachMovie("bonus", "target" + depthID, depthID, {_x:npcLoc._x, _y:npcLoc._y, _xscale:75, _yscale:75});
targetList["target" + String(depthID)] = _local2;
}
var speed = 0;
var maxspeed = 9;
var acceleration = 0.3;
var totalscenes = 3;
var depthID = 1;
var _hitCount = 0;
var gameOver = false;
var objectIntervalLimit = 2000;
var targetIntervalLimit = 1500;
var bonusIntervalLimit = 60000;
}
Symbol 384 MovieClip [__Packages.mx.managers.DepthManager] Frame 0
class mx.managers.DepthManager
{
var _childCounter, createClassObject, createObject, _parent, swapDepths, _topmost, getDepth;
function DepthManager () {
MovieClip.prototype.createClassChildAtDepth = createClassChildAtDepth;
MovieClip.prototype.createChildAtDepth = createChildAtDepth;
MovieClip.prototype.setDepthTo = setDepthTo;
MovieClip.prototype.setDepthAbove = setDepthAbove;
MovieClip.prototype.setDepthBelow = setDepthBelow;
MovieClip.prototype.findNextAvailableDepth = findNextAvailableDepth;
MovieClip.prototype.shuffleDepths = shuffleDepths;
MovieClip.prototype.getDepthByFlag = getDepthByFlag;
MovieClip.prototype.buildDepthTable = buildDepthTable;
_global.ASSetPropFlags(MovieClip.prototype, "createClassChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "createChildAtDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthTo", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthAbove", 1);
_global.ASSetPropFlags(MovieClip.prototype, "setDepthBelow", 1);
_global.ASSetPropFlags(MovieClip.prototype, "findNextAvailableDepth", 1);
_global.ASSetPropFlags(MovieClip.prototype, "shuffleDepths", 1);
_global.ASSetPropFlags(MovieClip.prototype, "getDepthByFlag", 1);
_global.ASSetPropFlags(MovieClip.prototype, "buildDepthTable", 1);
}
static function sortFunction(a, b) {
if (a.getDepth() > b.getDepth()) {
return(1);
}
return(-1);
}
static function test(depth) {
if (depth == reservedDepth) {
return(false);
}
return(true);
}
static function createClassObjectAtDepth(className, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createClassChildAtDepth(className, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createClassChildAtDepth(className, kTop, initObj);
break;
}
return(_local1);
}
static function createObjectAtDepth(linkageName, depthSpace, initObj) {
var _local1;
switch (depthSpace) {
case kCursor :
_local1 = holder.createChildAtDepth(linkageName, kTopmost, initObj);
break;
case kTooltip :
_local1 = holder.createChildAtDepth(linkageName, kTop, initObj);
break;
}
return(_local1);
}
function createClassChildAtDepth(className, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createClassObject(className, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function createChildAtDepth(linkageName, depthFlag, initObj) {
if (_childCounter == undefined) {
_childCounter = 0;
}
var _local3 = buildDepthTable();
var _local2 = getDepthByFlag(depthFlag, _local3);
var _local5 = "down";
if (depthFlag == kBottom) {
_local5 = "up";
}
var _local6;
if (_local3[_local2] != undefined) {
_local6 = _local2;
_local2 = findNextAvailableDepth(_local2, _local3, _local5);
}
var _local4 = createObject(linkageName, "depthChild" + (_childCounter++), _local2, initObj);
if (_local6 != undefined) {
_local3[_local2] = _local4;
shuffleDepths(_local4, _local6, _local3, _local5);
}
if (depthFlag == kTopmost) {
_local4._topmost = true;
}
return(_local4);
}
function setDepthTo(depthFlag) {
var _local2 = _parent.buildDepthTable();
var _local3 = _parent.getDepthByFlag(depthFlag, _local2);
if (_local2[_local3] != undefined) {
shuffleDepths(MovieClip(this), _local3, _local2, undefined);
} else {
swapDepths(_local3);
}
if (depthFlag == kTopmost) {
_topmost = true;
} else {
delete _topmost;
}
}
function setDepthAbove(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local2 = targetInstance.getDepth() + 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local2] != undefined) && (getDepth() < _local2)) {
_local2 = _local2 - 1;
}
if (_local2 > highestDepth) {
_local2 = highestDepth;
}
if (_local2 == highestDepth) {
_parent.shuffleDepths(this, _local2, _local3, "down");
} else if (_local3[_local2] != undefined) {
_parent.shuffleDepths(this, _local2, _local3, undefined);
} else {
swapDepths(_local2);
}
}
function setDepthBelow(targetInstance) {
if (targetInstance._parent != _parent) {
return(undefined);
}
var _local6 = targetInstance.getDepth() - 1;
var _local3 = _parent.buildDepthTable();
if ((_local3[_local6] != undefined) && (getDepth() > _local6)) {
_local6 = _local6 + 1;
}
var _local4 = lowestDepth + numberOfAuthortimeLayers;
var _local5;
for (_local5 in _local3) {
var _local2 = _local3[_local5];
if (_local2._parent != undefined) {
_local4 = Math.min(_local4, _local2.getDepth());
}
}
if (_local6 < _local4) {
_local6 = _local4;
}
if (_local6 == _local4) {
_parent.shuffleDepths(this, _local6, _local3, "up");
} else if (_local3[_local6] != undefined) {
_parent.shuffleDepths(this, _local6, _local3, undefined);
} else {
swapDepths(_local6);
}
}
function findNextAvailableDepth(targetDepth, depthTable, direction) {
var _local5 = lowestDepth + numberOfAuthortimeLayers;
if (targetDepth < _local5) {
targetDepth = _local5;
}
if (depthTable[targetDepth] == undefined) {
return(targetDepth);
}
var _local1 = targetDepth;
var _local2 = targetDepth;
if (direction == "down") {
while (depthTable[_local2] != undefined) {
_local2--;
}
return(_local2);
}
while (depthTable[_local1] != undefined) {
_local1++;
}
return(_local1);
}
function shuffleDepths(subject, targetDepth, depthTable, direction) {
var _local9 = lowestDepth + numberOfAuthortimeLayers;
var _local8 = _local9;
var _local5;
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local9 = Math.min(_local9, _local7.getDepth());
}
}
if (direction == undefined) {
if (subject.getDepth() > targetDepth) {
direction = "up";
} else {
direction = "down";
}
}
var _local1 = new Array();
for (_local5 in depthTable) {
var _local7 = depthTable[_local5];
if (_local7._parent != undefined) {
_local1.push(_local7);
}
}
_local1.sort(sortFunction);
if (direction == "up") {
var _local3;
var _local11;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.pop();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
_local11 = subject.getDepth();
_local3 = _local1.pop();
var _local4 = _local3.getDepth();
if (_local11 > (_local4 + 1)) {
if (_local4 >= 0) {
subject.swapDepths(_local4 + 1);
} else if ((_local11 > _local8) && (_local4 < _local8)) {
subject.swapDepths(_local8);
}
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
} else if (direction == "down") {
var _local3;
do {
if (_local1.length <= 0) {
break;
}
_local3 = _local1.shift();
} while (_local3 != subject);
do {
if (_local1.length <= 0) {
break;
}
var _local11 = _local3.getDepth();
_local3 = _local1.shift();
var _local4 = _local3.getDepth();
if ((_local11 < (_local4 - 1)) && (_local4 > 0)) {
subject.swapDepths(_local4 - 1);
}
subject.swapDepths(_local3);
} while (_local4 != targetDepth);
}
}
function getDepthByFlag(depthFlag, depthTable) {
var _local2 = 0;
if ((depthFlag == kTop) || (depthFlag == kNotopmost)) {
var _local5 = 0;
var _local7 = false;
var _local8;
for (_local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
if (!_local9._topmost) {
_local2 = Math.max(_local2, _local9.getDepth());
} else if (!_local7) {
_local5 = _local9.getDepth();
_local7 = true;
} else {
_local5 = Math.min(_local5, _local9.getDepth());
}
}
}
}
_local2 = _local2 + 20;
if (_local7) {
if (_local2 >= _local5) {
_local2 = _local5 - 1;
}
}
} else if (depthFlag == kBottom) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.min(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 - 20;
} else if (depthFlag == kTopmost) {
for (var _local8 in depthTable) {
var _local9 = depthTable[_local8];
var _local3 = typeof(_local9);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local9.__getTextFormat != undefined))) {
if (_local9.getDepth() <= highestDepth) {
_local2 = Math.max(_local2, _local9.getDepth());
}
}
}
_local2 = _local2 + 100;
}
if (_local2 >= highestDepth) {
_local2 = highestDepth;
}
var _local6 = lowestDepth + numberOfAuthortimeLayers;
for (var _local9 in depthTable) {
var _local4 = depthTable[_local9];
if (_local4._parent != undefined) {
_local6 = Math.min(_local6, _local4.getDepth());
}
}
if (_local2 <= _local6) {
_local2 = _local6;
}
return(_local2);
}
function buildDepthTable(Void) {
var _local5 = new Array();
var _local4;
for (_local4 in this) {
var _local2 = this[_local4];
var _local3 = typeof(_local2);
if ((_local3 == "movieclip") || ((_local3 == "object") && (_local2.__getTextFormat != undefined))) {
if (_local2._parent == this) {
_local5[_local2.getDepth()] = _local2;
}
}
}
return(_local5);
}
static var reservedDepth = 1048575;
static var highestDepth = 1048574;
static var lowestDepth = -16383;
static var numberOfAuthortimeLayers = 383;
static var kCursor = 101;
static var kTooltip = 102;
static var kTop = 201;
static var kBottom = 202;
static var kTopmost = 203;
static var kNotopmost = 204;
static var holder = _root.createEmptyMovieClip("reserved", reservedDepth);
static var __depthManager = new mx.managers.DepthManager();
}
Symbol 385 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.126";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 386 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 387 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 388 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 389 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 390 MovieClip [__Packages.BoardingBallingPlayer] Frame 0
class BoardingBallingPlayer extends MovieClip
{
var stop, game_mc, _parent, startX, _x, startY, _y, gotoAndStop, onEnterFrame, torso_mc, trigger_board, trigger_body, trigger, gotoAndPlay, yMin, yMax;
function BoardingBallingPlayer () {
super();
(stop());// not popped
game_mc = _parent;
init();
}
function init() {
startX = _x;
startY = _y;
initializeGameScript();
Key.addListener(this);
}
function reset() {
(gotoAndStop(1));// not popped
_x = startX;
_y = startY;
initializeGameScript();
Key.addListener(this);
}
function initializeGameScript() {
onEnterFrame = function () {
this.listenForKeys();
this.hitDetect();
};
}
function loseLife() {
game_mc.loseLife();
}
function listenForKeys() {
if (Key.isDown(37)) {
if (prevDir != "left") {
prevDir = "left";
game_mc.sound_mc.startSound("snowboard_crunch", false, 25);
}
move(-1);
var _local2 = torso_mc._currentframe;
(gotoAndStop("left"));// not popped
if (_local2 > 1) {
torso_mc.gotoAndPlay(_local2);
}
} else if (Key.isDown(39)) {
if (prevDir != "right") {
prevDir = "right";
game_mc.sound_mc.startSound("snowboard_crunch", false, 25);
}
move(1);
var _local2 = torso_mc._currentframe;
(gotoAndStop("right"));// not popped
if (_local2 > 1) {
torso_mc.gotoAndPlay(_local2);
}
} else {
prevDir = "";
var _local2 = torso_mc._currentframe;
(gotoAndStop("still"));// not popped
if (_local2 > 1) {
torso_mc.gotoAndPlay(_local2);
}
}
}
function hitDetect() {
for (var _local2 in game_mc.trickList) {
if (trigger_board.hitTest(game_mc.trickList[_local2].trigger)) {
game_mc.trickList[_local2].hit();
jump();
}
}
for (var _local2 in game_mc.obstacleList) {
if (trigger_board.hitTest(game_mc.obstacleList[_local2].trigger)) {
game_mc.obstacleList[_local2].deactivate();
game_mc.playerFall();
fall();
}
}
for (var _local2 in game_mc.targetList) {
if (trigger_body.hitTest(game_mc.targetList[_local2].trigger)) {
game_mc.playerFall();
game_mc.targetList[_local2].speed = 0;
game_mc.targetList[_local2].animation.stop();
fall();
break;
}
if (trigger_body.hitTest(game_mc.targetList[_local2].firetrigger)) {
game_mc.playerFall();
game_mc.targetList[_local2].speed = 0;
game_mc.targetList[_local2].animation.stop();
fall();
}
}
}
function onKeyDown() {
switch (Key.getCode()) {
case 32 :
if (torso_mc._currentframe == 1) {
torso_mc.gotoAndPlay("throw");
}
break;
default :
}
}
function fireProjectile() {
game_mc.addProjectile(_x + trigger._x, _y + trigger._y);
}
function jump() {
delete onEnterFrame;
(gotoAndPlay("jump"));// not popped
}
function fall() {
game_mc.sound_mc.startSound("squash", false, 25);
delete onEnterFrame;
(gotoAndPlay("fall"));// not popped
}
function move(dir) {
var _local4 = dir * (Math.cos(angle) * slidespeed);
var _local3 = dir * (Math.sin(angle) * slidespeed);
var _local5 = _x + _local4;
var _local2 = _y + _local3;
if ((_local2 > yMin) && (_local2 < yMax)) {
_x = _local5;
_y = _local2;
}
}
var angle = (Math.PI/4);
var slidespeed = 5;
var prevDir = "";
}
Symbol 7 MovieClip [__Packages.mx.remoting.ApiClasses] Frame 0
class mx.remoting.ApiClasses extends MovieClip
{
function ApiClasses () {
super();
}
}
Symbol 26 MovieClip [__Packages.mx.remoting.DataGlue] Frame 0
class mx.remoting.DataGlue extends Object
{
var __dataProv, __labelStr, __dataStr, formatFunction;
function DataGlue (dp) {
super();
__dataProv = dp;
}
function get dataProvider() {
return(__dataProv);
}
function get labelString() {
return(__labelStr);
}
function set labelString(val) {
__labelStr = val;
//return(labelString);
}
function get dataString() {
return(__dataStr);
}
function set dataString(val) {
__dataStr = val;
//return(dataString);
}
static function bindFormatStrings(dataConsumer, dp, labelStr, dataStr) {
var _local1 = new mx.remoting.DataGlue(dp);
_local1.__set__labelString(labelStr);
_local1.__set__dataString(dataStr);
_local1.getItemAt = mx.remoting.DataGlue.prototype.getItemAt_FormatString;
dataConsumer.dataProvider = _local1;
}
static function bindFormatFunction(dataConsumer, dp, formatFunc) {
var _local1 = new mx.remoting.DataGlue(dp);
_local1.formatFunction = formatFunc;
_local1.getItemAt = mx.remoting.DataGlue.prototype.getItemAt_FormatFunction;
dataConsumer.setDataProvider(_local1);
}
function addEventListener(eventName, listener) {
dataProvider.addEventListener(eventName, listener);
}
function get length() {
return(getLength());
}
function getLength() {
return(dataProvider.length);
}
function format(formatString, item) {
var _local3 = formatString.split("#");
var result = "";
var tlen = _local3.length;
var _local2;
var _local1 = 0;
while (_local1 < tlen) {
result = result + _local3[_local1];
_local2 = _local3[_local1 + 1];
if (_local2 != undefined) {
result = result + item[_local2];
}
_local1 = _local1 + 2;
}
return(result);
}
function getItemAt_FormatString(index) {
var _local2 = this;
var _local1 = _local2.dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return({label:_local2.format(_local2.__get__labelString(), _local1), data:((_local2.__get__dataString() == null) ? (_local1) : (_local2.format(_local2.__get__dataString(), _local1)))});
}
function getItemAt_FormatFunction(index) {
var _local1 = dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return(formatFunction(_local1));
}
function getItemID(index) {
return(dataProvider.getItemID(index));
}
function addItemAt(index, value) {
dataProvider.addItemAt(index, value);
}
function addItem(value) {
dataProvider.addItem(value);
}
function removeItemAt(index) {
dataProvider.removeItemAt(index);
}
function removeAll() {
dataProvider.removeAll();
}
function replaceItemAt(index, itemObj) {
dataProvider.replaceItemAt(index, itemObj);
}
function sortItemsBy(fieldNames, optionFlags) {
dataProvider.sortItemsBy(fieldNames, optionFlags);
}
function sortItems(compareFunc, optionFlags) {
dataProvider.sortItems(compareFunc, optionFlags);
}
static var version = "1.2.0.124";
}
Symbol 36 MovieClip [__Packages.mx.rpc.DefaultResponder] Frame 0
class mx.rpc.DefaultResponder
{
var __target;
function DefaultResponder (t) {
target = (t);
}
function get target() {
return(__target);
}
function set target(t) {
__target = t;
//return(target);
}
function onResult(event) {
trace("RPC Result: " + event.__get__result());
}
function onFault(event) {
trace("RPC Fault: " + event.fault.faultstring);
}
}
Symbol 47 MovieClip Frame 1
gotoAndStop(_global.origin);
Symbol 61 Button
on (press, keyPress "<Space>") {
_parent.gotoAndPlay("game");
}
Symbol 63 Button
on (press) {
_parent.gotoAndPlay("instructions");
}
Symbol 64 Button
on (press) {
_parent.gotoAndPlay("highscores");
}
Symbol 67 MovieClip Frame 60
stop();
Symbol 71 MovieClip [m: music container] Frame 1
#initclip 53
Object.registerClass("m: music container", SoundController);
#endinitclip
function startLoop() {
startSound("music_loop", true, 30);
}
startSound("music_intro", false, 100, false, null, startLoop);
Symbol 78 MovieClip Frame 1
_visible = false;
var locTrigger = true;
Symbol 79 MovieClip [scene2] Frame 1
#initclip 45
Object.registerClass("scene2", BoardingBallingScene);
#endinitclip
Symbol 86 MovieClip [scene3] Frame 1
#initclip 46
Object.registerClass("scene3", BoardingBallingScene);
#endinitclip
Symbol 91 MovieClip [scene1] Frame 1
#initclip 47
Object.registerClass("scene1", BoardingBallingScene);
#endinitclip
Symbol 92 MovieClip [snowball] Frame 1
#initclip 48
Object.registerClass("snowball", BoardingBallingProjectile);
#endinitclip
Symbol 92 MovieClip [snowball] Frame 10
this.removeMovieClip();
Symbol 96 MovieClip Frame 1
var ran = (Math.random() * 100);
Symbol 96 MovieClip Frame 12
if (ran >= 70) {
gotoAndPlay (26);
}
Symbol 96 MovieClip Frame 24
gotoAndPlay (1);
Symbol 98 MovieClip Frame 1
_visible = false;
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
var points = ("+" + _parent.points);
Symbol 131 MovieClip Frame 1
Symbol 133 MovieClip Frame 1
_visible = false;
startX = _x;
startY = _y;
this.onEnterFrame = function () {
if (_parent.kid.snowball == undefined) {
_x = startX;
_y = startY;
} else {
var _local2 = _parent.kid._rotation;
_local2 = NewMath.d2r(_local2);
var _local3 = NewMath.getDistance(_parent.kid.snowball._x, 0, _parent.kid.snowball._y, 0);
_x = (_parent.kid._x + (Math.sin(_local2) * _local3));
_y = (_parent.kid._y + (Math.cos(_local2) * _local3));
}
};
Symbol 137 MovieClip [targets] Frame 1
#initclip 49
Object.registerClass("targets", BoardingBallingTarget);
#endinitclip
var points = 50;
var soundName = "oldlady";
var sounds = 2;
Symbol 137 MovieClip [targets] Frame 2
var points = 25;
var soundName = "snowman";
var sounds = 2;
Symbol 137 MovieClip [targets] Frame 3
var points = 150;
var soundName = "shoveler";
var sounds = 1;
Symbol 137 MovieClip [targets] Frame 4
var points = 100;
var speed = 1.5;
var soundName = "hey_guy";
var sounds = 1;
Symbol 137 MovieClip [targets] Frame 5
var points = 150;
var soundName = "thrower";
var sounds = 1;
Symbol 137 MovieClip [targets] Frame 6
var points = 150;
var soundName = "thrower";
var sounds = 1;
Symbol 137 MovieClip [targets] Frame 7
var points = 100;
var speed = -2;
var soundName = "hey_girl";
var sounds = 2;
Symbol 144 MovieClip [tricks] Frame 1
#initclip 50
Object.registerClass("tricks", BoardingBallingTrick);
#endinitclip
var points = 50;
Symbol 144 MovieClip [tricks] Frame 2
var points = 50;
Symbol 144 MovieClip [tricks] Frame 3
var points = 50;
Symbol 144 MovieClip [tricks] Frame 4
var points = 25;
Symbol 149 MovieClip Frame 1
gotoAndStop(random(_totalframes) + 1);
Symbol 154 MovieClip [obstacles] Frame 1
#initclip 51
Object.registerClass("obstacles", BoardingBallingObstacle);
#endinitclip
Symbol 156 MovieClip [bonus] Frame 1
#initclip 52
Object.registerClass("bonus", BoardingBallingBonus);
#endinitclip
var points = 500;
Symbol 163 Button
on (press) {
_parent.gotoAndPlay("main");
}
Symbol 186 Button
on (press) {
getThisWeek();
}
Symbol 188 Button
on (press) {
getOverall();
}
Symbol 189 MovieClip [m: high score table] Frame 1
#initclip 54
Object.registerClass("m: high score table", CRMHighScoreBoard);
#endinitclip
Symbol 191 Button
on (press) {
nextFrame();
}
Symbol 196 Button
on (press) {
_parent.prevFrame();
}
Symbol 212 Button
on (press) {
_parent.prevFrame();
}
Symbol 213 MovieClip Frame 1
function JSalert(alert) {
getURL (("javascript:alert('" + alert) + "');");
}
function submitViral() {
if (checkFields()) {
submit_btn.enabled = false;
var _local2 = viral.send(refCode, to_name.text, to_email.text, from_name.text, from_email.text);
_local2.__set__responder(new mx.rpc.RelayResponder(this, "send_Result", "send_Fault"));
} else {
JSalert("Please fill out all of the fields to continue.");
}
}
function checkFields() {
var _local1 = 0;
if ((((from_name.text != "") && (from_email.text != "")) && (to_name.text != "")) && (to_email.text != "")) {
_local1++;
}
if ((((from_name.text != from_name.defaultText) && (from_email.text != from_email.defaultText)) && (to_name.text != to_name.defaultText)) && (to_email.text != to_email.defaultText)) {
_local1++;
}
if (_local1 == 2) {
return(true);
}
return(false);
}
function send_Result(r) {
if (r.__get__result().ERROR == 0) {
nextFrame();
} else {
switch (r.__get__result().RESPONSE_CD) {
case -57 :
JSalert("Please use a valid email addresses.");
break;
case -58 :
JSalert("Please use a valid email addresses.");
break;
case -82 :
JSalert("Please use two different email addresses.");
break;
default :
JSalert("Sorry, we are experiencing technical difficulties. Please try again later.");
}
submit_btn.enabled = true;
}
}
stop();
var viral = (new mx.remoting.Service(phpPath, null, "StandardEmail", null, null));
if (_global.origin == "pepsi") {
var refCode = "crm_holiday_2006_xtras";
} else {
var refCode = "crm_holiday_2006_dew";
}
from_name.tabIndex = 1;
from_email.tabIndex = 2;
to_name.tabIndex = 3;
to_email.tabIndex = 4;
TextField.prototype.onSetFocus = function () {
if (this.defaultText == undefined) {
this.defaultText = this.text;
}
if (this.text == this.defaultText) {
this.text = "";
}
};
TextField.prototype.onKillFocus = function () {
if (this.text == "") {
this.text = this.defaultText;
}
};
from_email.onSetFocus = null;
from_email.defaultText = null;
var joinPath;
var updatePath;
submit_btn.onPress = function () {
submitViral();
};
Symbol 214 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 8
_parent.fireProjectile();
Symbol 229 MovieClip Frame 16
gotoAndStop (1);
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 8
_parent.fireProjectile();
Symbol 239 MovieClip Frame 16
gotoAndStop (1);
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 8
_parent.fireProjectile();
Symbol 247 MovieClip Frame 16
gotoAndStop (1);
Symbol 272 MovieClip [m: player] Frame 1
#initclip 58
Object.registerClass("m: player", BoardingBallingPlayer);
#endinitclip
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 1
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 236 MovieClip in Symbol 272 MovieClip [m: player] Frame 2
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 244 MovieClip in Symbol 272 MovieClip [m: player] Frame 3
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 4
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 256 MovieClip in Symbol 272 MovieClip [m: player] Frame 8
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Symbol 272 MovieClip [m: player] Frame 40
initializeGameScript();
gotoAndStop (1);
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 41
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 266 MovieClip in Symbol 272 MovieClip [m: player] Frame 43
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 271 MovieClip in Symbol 272 MovieClip [m: player] Frame 56
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 118
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 123
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 128
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 133
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Instance of Symbol 220 MovieClip in Symbol 272 MovieClip [m: player] Frame 138
onClipEvent (load) {
gotoAndStop(_global.origin);
}
Symbol 272 MovieClip [m: player] Frame 140
if (!_parent.gameOver) {
initializeGameScript();
_parent.startGame();
gotoAndStop (1);
} else {
stop();
}
Symbol 273 MovieClip [m: game level] Frame 1
#initclip 55
Object.registerClass("m: game level", BoardingBallingGame);
#endinitclip
Instance of Symbol 272 MovieClip [m: player] "player_mc" in Symbol 273 MovieClip [m: game level] Frame 1
//component parameters
onClipEvent (construct) {
yMin = 360;
yMax = 600;
}
Symbol 284 MovieClip Frame 90
_parent._parent.game_mc.score = _parent._parent.game_mc.score + 1000;
_parent.gotoAndStop("idle");
Symbol 291 Button
on (press) {
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/restart.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
_parent.game_mc.reset();
gotoAndPlay ("start");
}
Symbol 293 Button
on (press) {
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/send_to_friend.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
gotoAndPlay ("viral");
}
Symbol 297 Button
on (press) {
getURL ("https://account.pepsiworld.com/join/?skn=1000&ctc=709", "_blank");
}
Symbol 299 Button
on (press) {
getURL ("https://account.pepsiworld.com/join/?skn=1001&ctc=710", "_blank");
}
Symbol 300 MovieClip Frame 1
if (_root.email == undefined) {
gotoAndStop(_global.origin);
} else {
stop();
}
Symbol 301 Button
on (press) {
_parent.gotoAndPlay("nohighscore");
}
Symbol 313 Button
on (press) {
_parent.gotoAndPlay("nohighscore");
}
Symbol 315 Button
on (press) {
getURL (joinPath, "_blank");
gotoAndStop (1);
}
Symbol 318 Button
on (press) {
_parent._parent.gotoAndPlay("nohighscore");
}
Symbol 319 MovieClip [m: high score table - mini] Frame 1
#initclip 56
Object.registerClass("m: high score table - mini", CRMHighScoreBoard);
#endinitclip
Symbol 322 MovieClip Frame 1
function JSalert(alert) {
flash.external.ExternalInterface.call(("javascript:alert('" + alert) + "');");
}
function submitScore() {
if (((First_Initial.text != undefined) && (Last_Initial.text != undefined)) && (Email_Address.text != undefined)) {
submit_btn.enabled = false;
var _local2 = leaderboard.getGameUserId(refCode, Email_Address.text);
_local2.__set__responder(new mx.rpc.RelayResponder(this, "getGameUserId_Result", "getGameUserId_Fault"));
} else {
JSalert("Please fill out all of the fields to continue.");
}
}
function getGameUserId_Result(r) {
if (r.__get__result().ERROR == 0) {
if (r.__get__result().RESPONSE_CD == 1) {
gameUserID = r.__get__result().RESPONSE_DATA.GAME_USER_ID;
displayName = r.__get__result().RESPONSE_DATA.DISPLAY_NAME;
var _local3 = leaderboard.saveGameScore(refCode, displayName, score, gameUserID);
_local3.__set__responder(new mx.rpc.RelayResponder(this, "saveGameScore_Result", "saveGameScore_Fault"));
} else if (r.__get__result().RESPONSE_CD == -1) {
joinPath = r.__get__result().RESPONSE_DATA.JOIN_PATH;
updatePath = r.__get__result().RESPONSE_DATA.UPDATE_PATH;
gotoAndStop ("not_registered");
}
}
}
function saveGameScore_Result(r) {
if (r.__get__result().ERROR == 0) {
gotoAndStop ("leaderboard");
}
}
stop();
var leaderboard = (new mx.remoting.Service(phpPath, null, "RegGame", null, null));
if (_global.origin == "pepsi") {
var refCode = "crm_holiday_2006_xtras";
} else {
var refCode = "crm_holiday_2006_dew";
}
First_Initial.tabIndex = 1;
Last_Initial.tabIndex = 2;
Email_Address.tabIndex = 3;
First_Initial.restrict = "A-Z a-z";
Last_Initial.restrict = "A-Z a-z";
var score = _parent._parent.game_mc.score;
var gameUserID;
var displayName;
var joinPath;
var updatePath;
submit_btn.onPress = function () {
submitScore();
};
Symbol 322 MovieClip Frame 2
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/register.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Symbol 332 Button
on (press) {
_parent.gotoAndPlay("nohighscore");
}
Symbol 333 MovieClip Frame 1
function JSalert(alert) {
getURL (("javascript:alert('" + alert) + "');");
}
function submitViral() {
if (checkFields()) {
submit_btn.enabled = false;
var _local2 = viral.send(refCode, to_name.text, to_email.text, from_name.text, from_email.text);
_local2.__set__responder(new mx.rpc.RelayResponder(this, "send_Result", "send_Fault"));
} else {
JSalert("Please fill out all of the fields to continue.");
}
}
function checkFields() {
var _local1 = 0;
if ((((from_name.text != "") && (from_email.text != "")) && (to_name.text != "")) && (to_email.text != "")) {
_local1++;
}
if ((((from_name.text != from_name.defaultText) && (from_email.text != from_email.defaultText)) && (to_name.text != to_name.defaultText)) && (to_email.text != to_email.defaultText)) {
_local1++;
}
if (_local1 == 2) {
return(true);
}
return(false);
}
function send_Result(r) {
if (r.__get__result().ERROR == 0) {
nextFrame();
} else {
switch (r.__get__result().RESPONSE_CD) {
case -57 :
JSalert("Please use a valid email addresses.");
break;
case -58 :
JSalert("Please use a valid email addresses.");
break;
case -82 :
JSalert("Please use two different email addresses.");
break;
default :
JSalert("Sorry, we are experiencing technical difficulties. Please try again later.");
}
submit_btn.enabled = true;
}
}
stop();
var viral = (new mx.remoting.Service(phpPath, null, "StandardEmail", null, null));
if (_global.origin == "pepsi") {
var refCode = "crm_holiday_2006_xtras";
} else {
var refCode = "crm_holiday_2006_dew";
}
from_name.tabIndex = 1;
from_email.tabIndex = 2;
to_name.tabIndex = 3;
to_email.tabIndex = 4;
TextField.prototype.onSetFocus = function () {
if (this.defaultText == undefined) {
this.defaultText = this.text;
}
if (this.text == this.defaultText) {
this.text = "";
}
};
TextField.prototype.onKillFocus = function () {
if (this.text == "") {
this.text = this.defaultText;
}
};
from_email.onSetFocus = null;
from_email.defaultText = null;
var joinPath;
var updatePath;
submit_btn.onPress = function () {
submitViral();
};
Symbol 334 MovieClip Frame 65
_parent.game_mc.startGame();
Symbol 334 MovieClip Frame 66
stop();
Symbol 334 MovieClip Frame 77
function getGameScore_Result(r) {
if (r.__get__result().ERROR == 0) {
checkHighScores(r.__get__result().RESPONSE_DATA.LEADERBOARD);
} else {
gotoAndPlay ("nohighscore");
}
}
function getGameScore_Fault(f) {
gotoAndPlay ("nohighscore");
}
function checkHighScores(arr) {
if ((_parent.game_mc.score > arr[arr.length - 1].SCORE) || (arr.length < 10)) {
gotoAndPlay ("highscore");
} else {
gotoAndPlay ("nohighscore");
}
}
var leaderboard = (new mx.remoting.Service(phpPath, null, "RegGame", null, null));
if (_global.origin == "pepsi") {
var refCode = "crm_holiday_2006_xtras";
} else {
var refCode = "crm_holiday_2006_dew";
}
var pc = leaderboard.getGameTopScorerList(refCode, 10, 7);
pc.__set__responder(new mx.rpc.RelayResponder(this, "getGameScore_Result", "getGameScore_Fault"));
Symbol 334 MovieClip Frame 82
stop();
Symbol 334 MovieClip Frame 89
stop();
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/game_over.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Symbol 334 MovieClip Frame 98
stop();
tracker("FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/got_high_score.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
Symbol 334 MovieClip Frame 108
stop();
Symbol 336 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 32
_visible = false;
Symbol 337 MovieClip Frame 1
function loseLife() {
this["life" + livesLeft].play();
if (livesLeft > 0) {
livesLeft--;
}
}
function reset() {
livesLeft = lives;
var _local2 = 1;
while (_local2 <= lives) {
this["life" + _local2]._visible = true;
_local2++;
}
}
var lives = 5;
var livesLeft = lives;
Symbol 340 MovieClip Frame 1
function setScore(amt) {
score = amt;
formatScore();
}
function formatScore() {
var _local2 = String(score);
var _local1 = _local2.length - 3;
while (_local1 > 0) {
_local2 = (_local2.substring(0, _local1) + "<font color=\"#AAAAAA\">,</font>") + _local2.substring(_local1);
_local1 = _local1 - 3;
}
Score_txt.htmlText = _local2;
}
function reset() {
score = 0;
formatScore();
}
var score = 0;
var Score_txt;
Symbol 358 MovieClip [SoundController] Frame 1
#initclip 57
Object.registerClass("SoundController", SoundController);
#endinitclip
stop();
Symbol 359 MovieClip Frame 1
Instance of Symbol 273 MovieClip [m: game level] "game_mc" in Symbol 359 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
lives = 5;
score_mc = "score_mc";
lives_mc = "lives_mc";
message_mc = "message_mc";
}
Symbol 364 Button
on (press) {
tracker("javascript:FlashTrack(\"DCS.dcsuri\",\"/snowboard_game/quit.php\",\"WT.CG_n\",\"Snowboard Game\",\"DCSext.Flash_action\",\"Movie Run\")");
game_mc.game_mc.quit();
gotoAndPlay ("main");
}
Symbol 369 MovieClip Frame 1
stop();
if (sound == undefined) {
var sound = new Sound();
this.onPress = function () {
if (_currentframe == 1) {
sound.setVolume(0);
nextFrame();
} else {
sound.setVolume(100);
prevFrame();
}
};
}