Frame 1
stop();
trackObj = new ViralTracker2(11, "http://stats.fishinabottle.com/scripts/stats2/get_viral_tracking.php", "");
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_quality = "HIGH";
_focusrect = false;
fscommand ("trapallkeys", "true");
var sysCheck = System.capabilities.os.indexOf("Mac");
if (sysCheck == 0) {
_global.isMac = true;
} else {
_global.isMac = false;
}
_global.masterVolume = new Sound();
restoreVolume = _global.masterVolume.getVolume();
var isHiscoreInitialised = false;
var hasSignedUp = false;
var seenTitles = false;
var percLoaded = 0;
loading.progressbar._xscale = 0;
onEnterFrame = function () {
if (getBytesTotal() > 0) {
percLoaded = percLoaded - ((percLoaded - ((getBytesLoaded() / getBytesTotal()) * 100)) * 0.2);
loading.progressbar._xscale = percLoaded;
if (percLoaded > 99) {
onEnterFrame = null;
trackObj.beginTracking(getBytesTotal());
gotoAndStop ("loaded");
}
}
};
Frame 2
if (false) {
}
Frame 7
var myAddress;
var tempArray;
var linkToAddress = "http://christmas.aol.co.uk/santa-ski-jump-game/article/20071011063709990004";
var properAddress = "http://d3400.u24.fishinabottle.com/index.php";
var allowScores;
var failures = 0;
hiScoresInst._visible = false;
hiScoresInst.onConfigure = function () {
myAddress = _url.substr(0, properAddress.length);
tempArray = myAddress.split("/");
myAddress = tempArray[2];
var tempArray = properAddress.split("/");
allowScores = false;
if (myAddress == tempArray[2]) {
allowScores = true;
}
gotoAndStop ("title");
};
hiScoresInst.onConfigureFail = function () {
failures++;
allowScores = false;
if (failures > 5) {
gotoAndStop ("title");
}
};
hiScoresInst.configure("http://service.fishinabottle.com/hiscores2/hiscores_general.php", 1, this, 15907383);
hiScoresInst.onHide = function () {
gotoAndStop ("title");
};
Frame 11
if (false) {
}
Frame 21
stop();
hiScoresInst._y = 4.8;
var musicLoop1 = new Sound(createEmptyMovieClip("loop1", 1001));
musicLoop1.attachSound("winterland-fun-loop01.wav");
var musicLoop2 = new Sound(createEmptyMovieClip("loop2", 1002));
musicLoop2.attachSound("winterland-fun-loop02.wav");
var musicLoop5 = new Sound(createEmptyMovieClip("loop5", 1005));
musicLoop5.attachSound("winterland-fun-loop05.wav");
musicLoop2.start();
musicLoop2.onSoundComplete = function () {
musicLoop1.start();
};
musicLoop1.onSoundComplete = function () {
musicLoop2.start();
};
InstructionsInst._visible = false;
sendToFriend._visible = false;
sendToMe._visible = false;
PlayButtonInst.onRelease = function () {
seenTitles = true;
trackObj.continueTracking("PL");
musicLoop1.stop();
musicLoop2.stop();
hiScoresInst._visible = false;
SoundInst.SFXUIClick.start();
gotoAndPlay ("game");
};
instructionsButt.onRelease = function () {
instructionsButt._visible = false;
highButt._visible = false;
friendButt._visible = false;
PlayButtonInst._visible = false;
InstructionsInst._visible = true;
};
highButt.onRelease = function () {
if (allowScores) {
trace("SHOW SCORES");
hiScoresInst.justView();
} else {
trace(("GET URL " + linkToAddress) + "?showscores");
if (_global.isMute()) {
getURL (linkToAddress + "?showscores&autoMute", "_blank");
} else {
getURL (linkToAddress + "?showscores", "_blank");
}
}
};
friendButt.onRelease = function () {
instructionsButt._visible = false;
highButt._visible = false;
friendButt._visible = false;
PlayButtonInst._visible = false;
sendToFriend.view();
};
if ((showScores == "yes") && (allowScores)) {
showScores = "no";
hiScoresInst.justView();
}
if ((addScore == "yes") && (allowScores)) {
addScore = "no";
hiScoresInst.submitScore(name, score, null, 0);
hiScoresInst._visible = true;
}
if ((seenTitles == true) && (hasSignedUp == false)) {
instructionsButt._visible = false;
highButt._visible = false;
friendButt._visible = false;
PlayButtonInst._visible = false;
sendToMe.view();
}
gift1.hitClip.onRelease = function () {
trackObj.continueTracking("CT");
getURL ("http://christmas.aol.co.uk", "_blank");
};
gift2.hitClip.onRelease = gift1.hitClip.onRelease;
_global.mute = function (enable) {
SFXUIClick.start();
if (enable) {
_global.masterVolume.setVolume(0);
} else {
_global.masterVolume.setVolume(restoreVolume);
}
};
_global.isMute = function () {
if (_global.masterVolume.getVolume() > 0) {
return(false);
}
return(true);
};
if (autoMute == "yes") {
_global.mute(true);
}
Frame 31
if (false) {
}
Frame 32
function displayScore() {
var _local1 = returnScore();
_local1 = hiScoresInst.addCommas(String(_local1));
scoreText1.text = _local1;
scoreText2.text = scoreText1.text;
}
function returnScore() {
var _local1;
jumpDistance = DistanceToString((mapX - SLOPE_END) / DISTANCE_RATIO);
_local1 = Number(Math.round(jumpDistance * 1000)) + Number(presentsCollected * 10000);
if (isNaN(_local1)) {
_local1 = "0";
}
return(_local1);
}
function CallBack(ID) {
if (!(ID === PARTICLES_STARS)) {
} else {
var _local2 = 0;
var _local1 = -50 - (Math.random() * ((-PlayerInst._height) + 100));
Stars.AddParticle(_local2, _local1, (-xSpeed) * 0.25, (-ySpeed) * 0.25, 10, -5, 12);
}
}
function DistanceToString(dist) {
r = "";
var _local3 = 10;
var _local2 = Math.floor(dist);
var _local1 = 0;
while (_local1 < 1) {
if (_local2 < _local3) {
r = r + "0";
}
_local3 = _local3 * 10;
_local1++;
}
r = r + (_local2 + ".");
_local2 = dist - Math.floor(dist);
_local2 = Math.floor(_local2 * 100);
_local3 = 10;
_local1 = 0;
while (_local1 < 1) {
if (_local2 < _local3) {
r = r + "0";
}
_local3 = _local3 * 10;
_local1++;
}
r = r + _local2;
return(r);
}
function startJump() {
SoundInst.SFXSlide.start();
xSpeed = 1;
ySpeed = 1;
yDir = 1.01;
windBarInst.Stop();
TimerInst.stop();
windEffect = windBarInst.getWindPower();
if (TimerInst.getTime() > TIME_LIMIT) {
windEffect = 0.2;
windBarInst.scalerInst._xscale = 80;
}
state = STATE_ONSLOPE;
}
function setBoost() {
jumpBoost = (mapX - JUMP_START) / (SLOPE_END - JUMP_START);
if (jumpBoost < 0) {
jumpBoost = 0;
}
}
function jumpLaunch() {
SoundInst.SFXLaunch.start();
xSpeed = xSpeed * (1 + (jumpBoost * 0.75));
ySpeed = ySpeed * (1 + (jumpBoost * 0.75));
if (jumpBoost > 0.8) {
PlayerInst.boostParticles.init("Star2", 20, 15, (-xSpeed) / 2, (-ySpeed) / 2);
PlayerInst.boostParticles.setScaling(0.85);
PlayerInst.boostParticles.setSpeedRandomness(0.5, 0.5);
PlayerInst.boostParticles.setRotation(3);
PlayerInst.boostParticles.setLifeRandomness(0.8);
PlayerInst.boostParticles.setRotationRandomness(1.5);
PlayerInst.boostParticles.setLifeRandomness(0.8);
PlayerInst.boostParticles.setSpawnArea(1, 100);
PlayerInst.boostParticles.start();
}
PlayerInst.SetAnimation(PlayerInst.ANIM_SANTA_SKIJUMP);
PlayerInst.SetLooped(false);
PlayerInst._rotation = 0;
angleControllerInst._visible = true;
angleControllerInst.Start();
state = STATE_JUMPING;
}
function StartEvent() {
state = STATE_SLOPETOP;
wait = getTimer();
windBarInst.Start();
TimerInst.start();
SoundInst.SFXGameLoop.start(0, 999);
QuitButtonInst.enabled = true;
}
function afterHighScore() {
gotoAndStop ("title");
}
function StopEvent() {
state = STATE_FINISHED;
musicLoop5.stop();
score = Number(returnScore());
if (allowScores) {
hiScoresInst.submit(score, afterHighScore, afterHighScore);
} else {
sendScoreInst.submit(score);
}
QuitButtonInst._visible = false;
QuitButtonInst.enabled = false;
}
function PauseEvent(pState) {
Paused = pState;
if (pState) {
windBarInst.Stop();
angleControllerInst.Stop();
PlayerInst.Stop();
TimerInst.stop();
} else {
if (state == STATE_SLOPETOP) {
TimerInst.start();
windBarInst.Start();
}
if (state == STATE_JUMPING) {
angleControllerInst.Start();
}
PlayerInst.Play();
}
}
function ResultsCallBack(score) {
gotoAndStop ("title");
}
stop();
musicLoop5.setVolume(75);
musicLoop5.start();
musicLoop5.onSoundComplete = function () {
musicLoop5.start();
};
var musicPausedAt = 0;
angleControllerInst._visible = false;
track0._visible = false;
hiScoresInst._y = 16.8;
var PARTICLES_SNOW = 1;
var PARTICLES_STARS = 2;
var MAX_YSPEED = 32;
var SLOPE_BASE = 310;
var SLOPE_CLEAR = 1200;
var FLOOR_HEIGHT = 220;
var LANDING_HEIGHT = -270;
var SLOPE_END = 860;
var JUMP_START = 660;
var DISTANCE_RATIO = 34.1;
var TIME_LIMIT = 500;
var mapY = -500;
var mapX = 0;
PlayerInst._x = 100;
PlayerInst._y = 250;
var xSpeed = 0;
var ySpeed = 0;
var windEffect = 0;
var dragEffect = 0;
var jumpedFlag = false;
var playerDown = 0;
var maxSpeed = 50;
var Paused = false;
var score = 0;
var presentsCollected = 0;
QuitButtonInst.enabled = false;
var STATE_PRERACE = 0;
var STATE_SLOPETOP = 1;
var STATE_ONSLOPE = 2;
var STATE_JUMPING = 3;
var STATE_LANDING = 4;
var STATE_MEASURE = 5;
var STATE_FINISHED = 6;
var state = STATE_PRERACE;
SkiJumpScroller.SetParallaxFactor(1);
SkiJumpBackScroller.SetParallaxFactor(0.9);
Scroller1.SetParallaxFactor(1);
Scroller2.SetParallaxFactor(0.5);
Scroller3.SetParallaxFactor(0.25);
ItemsScrollerInst.SetParallaxFactor(0.9);
SlopeClip = SkiJumpScroller.AddTile("Slope");
SkiJumpBackScroller.AddTile("SlopeBack");
ItemsScrollerInst.AddTile("Items0");
var i = 0;
while (i < 200) {
if (i < 25) {
Scroller3.AddTile("MountainBack");
}
if (i < 50) {
Scroller2.AddTile("MiddleTile1");
}
if (i < 100) {
Scroller1.AddTile("ForegroundTile1");
Scroller1.AddTile("ForegroundTile2");
}
ItemsScrollerInst.AddTile("Items1");
i++;
}
SkiJumpScroller.MoveTo(0);
SkiJumpBackScroller.MoveTo(0);
Scroller1.MoveTo(0);
Scroller2.MoveTo(0);
Scroller3.MoveTo(0);
ItemsScrollerInst.MoveTo(0);
SkiJumpScroller.MoveY(mapY);
SkiJumpBackScroller.MoveY(mapY);
Scroller1.MoveY(mapY);
Scroller2.MoveY(mapY);
Scroller3.MoveY(mapY);
ItemsScrollerInst.MoveY(mapY);
windBarInst.Stop();
TimerInst.reset();
TimerInst.stop();
TimerInst._visible = false;
PlayerInst.SetAnimation(PlayerInst.ANIM_SANTA_SKIIDLE);
PlayerInst.Play();
var n = 0;
while (n < 24) {
Stars.CreateParticle("Star2");
n++;
}
QuitButtonInst.onRelease = function () {
PlayerInst.boostParticles.stop();
_parent.SoundInst.SFXUIClick.start();
musicPausedAt = musicLoop5.position / 1000;
musicLoop5.stop();
PauseEvent(true);
QuitMessageInst._visible = true;
this.enabled = false;
};
QuitMessageInst.YesButtonInst.onRelease = function () {
Paused = false;
onEnterFrame = null;
gotoAndStop ("title");
SoundInst.SFXUIClick.start();
};
QuitMessageInst.NoButtonInst.onRelease = function () {
musicLoop5.start(musicPausedAt);
SoundInst.SFXUIClick.start();
PauseEvent(false);
QuitMessageInst._visible = false;
QuitButtonInst.enabled = true;
};
onEnterFrame = function () {
displayScore();
if (!Paused) {
Stars._x = PlayerInst._x;
Stars._y = PlayerInst._y;
StarParticles.Update();
SnowParticles.Update();
SkiJumpScroller.MoveTo(mapX);
SkiJumpBackScroller.MoveTo(mapX);
Scroller1.MoveTo(mapX);
Scroller2.MoveTo(mapX);
Scroller3.MoveTo(mapX);
ItemsScrollerInst.MoveTo(mapX);
SkiJumpScroller.MoveY(mapY);
SkiJumpBackScroller.MoveY(mapY);
Scroller1.MoveY(mapY);
Scroller2.MoveY(mapY);
Scroller3.MoveY(mapY);
ItemsScrollerInst.MoveY(mapY);
switch (state) {
case STATE_PRERACE :
break;
case STATE_SLOPETOP :
if (TimerInst.getTime() > TIME_LIMIT) {
startJump();
}
if (Key.isDown(32)) {
startJump();
}
break;
case STATE_ONSLOPE :
if (PlayerInst._x >= 275) {
mapX = mapX + xSpeed;
mapY = mapY + ySpeed;
xSpeed = xSpeed + 1;
ySpeed = ySpeed + yDir;
if (mapX > SLOPE_BASE) {
yDir = -2.6;
PlayerInst._rotation = PlayerInst._rotation - 3.5;
}
if (SlopeClip.EndMarkerInst.hitTest(PlayerInst._x, PlayerInst._y, false)) {
if (Key.isDown(32) && (jumpedFlag == false)) {
jumpedFlag = true;
setBoost();
}
}
if (SlopeClip.SlopeEnd.hitTest(PlayerInst._x, PlayerInst._y, false)) {
if (jumpedFlag == false) {
jumpBoost = 0;
}
jumpLaunch();
}
} else {
PlayerInst._x = PlayerInst._x + 4;
if (PlayerInst._x > 240) {
PlayerInst._y = PlayerInst._y + 2;
PlayerInst._rotation = PlayerInst._rotation + 5;
}
}
break;
case STATE_JUMPING :
if ((mapY >= (FLOOR_HEIGHT - 220)) && (mapX > SLOPE_CLEAR)) {
angleControllerInst._visible = false;
angleControllerInst.Stop();
PlayerInst.SetAnimation(PlayerInst.ANIM_SANTA_SKILAND);
PlayerInst.SetLooped(false);
PlayerInst._rotation = 0;
mapX = mapX + xSpeed;
mapY = mapY + ySpeed;
musicLoop5.stop();
trace(123);
SoundInst.SFXEnd.start();
SoundInst.SFXEnd.onSoundComplete = function () {
StopEvent();
state = STATE_FINISHED;
};
QuitButtonInst._visible = false;
state = STATE_LANDING;
} else {
if (mapY < -800) {
PlayerInst.boostParticles.stop();
}
dragEffect = angleControllerInst.getDrag();
PlayerInst._rotation = -10 + (angleControllerInst.getAngle() * 0.5);
mapX = mapX + xSpeed;
mapY = mapY + ySpeed;
if (ySpeed < MAX_YSPEED) {
ySpeed = ySpeed + playerDown;
playerDown = playerDown + 0.012;
playerDown = playerDown + (dragEffect * 0.01);
playerDown = playerDown - (windEffect * 0.01);
}
var _local1 = 0;
while (_local1 < ItemsScrollerInst.map.length) {
if (ItemsScrollerInst.map[_local1]._visible) {
for (obj in ItemsScrollerInst.map[_local1]) {
if (obj.charAt(0) == "p") {
if (ItemsScrollerInst.map[_local1][obj].hitTest(PlayerInst.hit)) {
presentsCollected++;
ItemsScrollerInst.map[_local1][obj].gotoAndPlay("hit");
ItemsScrollerInst.map[_local1][obj]._name = "hit" + ItemsScrollerInst.map[_local1][obj]._name;
}
} else if (obj.charAt(0) == "b") {
if (ItemsScrollerInst.map[_local1][obj].hitTest(PlayerInst.hit)) {
if (ySpeed > 0) {
ySpeed = ySpeed * -0.6;
} else {
ySpeed = -20;
}
ItemsScrollerInst.map[_local1][obj].gotoAndPlay("hit");
ItemsScrollerInst.map[_local1][obj]._name = "hit" + ItemsScrollerInst.map[_local1][obj]._name;
}
}
}
}
_local1++;
}
}
break;
case STATE_LANDING :
if (mapY <= FLOOR_HEIGHT) {
mapX = mapX + xSpeed;
mapY = mapY + ySpeed;
} else {
SoundInst.SFXLand.start();
jumpDistance = DistanceToString((mapX - SLOPE_END) / DISTANCE_RATIO);
DistanceMarkerInst.DistanceSignpostInst.Num.text = jumpDistance;
DistanceMarkerInst._x = PlayerInst._x;
finishSpeed = 18;
ySpeed = 1;
state = STATE_MEASURE;
track0._x = PlayerInst._x;
track0._y = PlayerInst._y;
track0._visible = true;
}
break;
case STATE_MEASURE :
xSpeed = 0;
if (QuitMessageInst._visible == false) {
PlayerInst._x = PlayerInst._x + finishSpeed;
StarMarkerInst._x = StarMarkerInst._x + finishSpeed;
track0._width = track0._width + finishSpeed;
}
break;
case STATE_FINISHED :
onEnterFrame = null;
}
}
};
Frame 41
gotoAndPlay ("game");
Symbol 2 MovieClip [particle2] Frame 1
gotoAndStop(Math.floor(Math.random() * 3) + 1);
Symbol 6 MovieClip [particle1] Frame 1
gotoAndStop(Math.floor(Math.random() * 3) + 1);
Symbol 23 MovieClip [Star2] Frame 1
stop();
r = int(Math.random() * 7);
switch (r) {
case 0 :
gotoAndPlay ("Red");
break;
case 1 :
gotoAndPlay ("Yellow");
break;
case 2 :
gotoAndPlay ("Green");
break;
case 3 :
gotoAndPlay ("Blue");
break;
case 4 :
gotoAndPlay ("Purple");
}
Symbol 23 MovieClip [Star2] Frame 31
gotoAndPlay ("Red");
Symbol 29 Button
on (release) {
_global.mute(true);
gotoAndStop ("mute");
}
Symbol 31 Button
on (release) {
_global.mute(false);
gotoAndStop ("unmute");
}
Symbol 32 MovieClip [soundButtonMov] Frame 1
stop();
Symbol 32 MovieClip [soundButtonMov] Frame 11
stop();
Symbol 39 MovieClip [button2] Frame 1
#initclip 10
Object.registerClass("button2", AnimButton);
#endinitclip
Symbol 39 MovieClip [button2] Frame 11
this.stopReversing();
Symbol 39 MovieClip [button2] Frame 28
this.stopRollOver();
Symbol 39 MovieClip [button2] Frame 39
this.stopReversing();
Symbol 39 MovieClip [button2] Frame 56
this.stopRollOut();
Symbol 42 MovieClip [button] Frame 1
#initclip 8
Object.registerClass("button", AnimButton);
#endinitclip
Symbol 42 MovieClip [button] Frame 11
this.stopReversing();
Symbol 42 MovieClip [button] Frame 28
this.stopRollOver();
Symbol 42 MovieClip [button] Frame 39
this.stopReversing();
Symbol 42 MovieClip [button] Frame 56
this.stopRollOut();
Symbol 43 MovieClip [particleSystem] Frame 1
#initclip 9
Object.registerClass("particleSystem", ParticleSystem);
#endinitclip
Symbol 53 MovieClip Frame 1
stop();
Symbol 792 MovieClip [__Packages.ViralTracker2] Frame 0
class ViralTracker2
{
var dat, trackerAddress, referer, first_ping, second_ping;
function ViralTracker2 (viralID, address, referer) {
var _local3 = new Date();
var _local2 = new LoadVars();
dat = new LoadVars();
dat.fiab_viral_id = viralID;
_local2.fiab_initial_ping = "true";
_local2.fiab_viral_id = viralID;
trackerAddress = address;
this.referer = referer;
first_ping = _local3.getTime();
sendVars(_local2);
}
function continueTracking(activity) {
var _local2;
dat.fiab_action = activity;
sendVars(dat);
delete dat.fiab_action;
}
function beginTracking(appSize) {
dat.fiab_start_tracking = "true";
var _local4;
var _local3 = new Date();
second_ping = _local3.getTime();
_local4 = (second_ping - first_ping) / 1000;
appSize = appSize / 1024;
dat.dl_speed = Math.round(appSize / _local4);
if (dat.dl_speed == Infinity) {
dat.dl_speed = 0;
}
dat.language = System.capabilities.language;
dat.os = System.capabilities.os;
dat.screenx = System.capabilities.screenResolutionX;
dat.screeny = System.capabilities.screenResolutionY;
dat.player = getVersion();
if (Camera.get() == null) {
dat.camera = 0;
} else {
dat.camera = 1;
}
if (Microphone.get() == null) {
dat.mic = 0;
} else {
dat.mic = 1;
}
dat.fiab_referer = referer;
var _local2 = _url;
if (_local2.substr(0, 5) == "file:") {
dat.fiab_host = "LOCAL";
} else if (_local2.substr(0, 7) == "http://") {
dat.fiab_host = _local2.substr(7, _local2.indexOf("/", 7) - 7);
} else if (_local2.substr(0, 8) == "https://") {
dat.fiab_host = _local2.substr(8, _local2.indexOf("/", 8) - 8);
} else {
dat.fiab_host = _url;
}
sendVars(dat);
delete dat.language;
delete dat.os;
delete dat.screenx;
delete dat.screeny;
delete dat.player;
delete dat.fiab_start_tracking;
delete dat.camera;
delete dat.mic;
delete dat.fiab_referer;
delete dat.fiab_host;
delete dat.dl_speed;
}
function trackFrameRate(frameRate) {
dat.framerate = frameRate;
sendVars(dat);
delete dat.framerate;
}
function sendVars(senderObj) {
trace("SENDING VARS: ");
var _local2;
var _local4 = new Date();
for (_local2 in senderObj) {
trace((_local2 + " : ") + senderObj[_local2]);
}
senderObj.rnd = _local4.getTime();
trace(trackerAddress);
senderObj.sendAndLoad(trackerAddress, senderObj, "GET");
trace(newline);
delete senderObj.rnd;
}
}
Symbol 793 MovieClip [__Packages.AnimButton] Frame 0
class AnimButton extends MovieClip
{
var stop, hitClip, gotoAndStop, _currentframe, _totalframes;
function AnimButton () {
super();
stop();
hitClip.onRollOver = function () {
switch (this._parent.currState) {
case "out" :
this._parent.gotoAndForward("roll over");
this._parent.currState = "roll over";
break;
case "roll out" :
this._parent.reverse();
this._parent.currState = "roll out";
break;
case "over" :
break;
case "roll over" :
this._parent.forward();
this._parent.currState = "roll over";
}
};
hitClip.onRollOut = function () {
switch (this._parent.currState) {
case "out" :
break;
case "roll out" :
this._parent.forward();
this._parent.currState = "roll out";
break;
case "over" :
this._parent.gotoAndForward("roll out");
this._parent.currState = "roll out";
break;
case "roll over" :
this._parent.reverse();
this._parent.currState = "roll over";
}
};
hitClip.onReleaseOutside = hitClip.onRollOut;
}
function forward() {
playDir = 1;
}
function reverse() {
playDir = -1;
}
function gotoAndForward(frame) {
gotoAndStop(frame);
playDir = 1;
}
function gotoAndReverse(frame) {
gotoAndStop(frame);
playDir = -1;
}
function stopRollOver() {
playDir = 0;
currState = "over";
}
function stopRollOut() {
playDir = 0;
currState = "out";
}
function stopReversing() {
if (playDir < 0) {
playDir = 0;
}
}
function onEnterFrame() {
if (playDir != 0) {
var _local2 = _currentframe + playDir;
if (_local2 < 1) {
_local2 = _totalframes;
} else if (_local2 > _totalframes) {
_local2 = 1;
}
gotoAndStop(_local2);
}
}
var playDir = 0;
var currState = "out";
}
Symbol 794 MovieClip [__Packages.ParticleSystem] Frame 0
class ParticleSystem extends MovieClip
{
var _visible, running, paused, particles, numParticles, lifespan, rotation, scaling, xSpeed, ySpeed, xSpeedRandom, ySpeedRandom, lifeRandom, rotateRandom, xPos, _x, yPos, _y, gravity, orientToPath, orientToSource, alphaFlag, alphaEasing, spawnInterval, spawnNext, spawnWidth, spawnHeight, frameOffset, holder, _parent, getDepth, _rotation;
function ParticleSystem () {
super();
_visible = false;
running = false;
paused = false;
particles = new Array();
numParticles = 20;
lifespan = 10;
rotation = 0;
scaling = 1;
xSpeed = 0;
ySpeed = 0;
xSpeedRandom = 0;
ySpeedRandom = 0;
lifeRandom = 0;
rotateRandom = 0;
xPos = _x;
yPos = _y;
gravity = 0;
orientToPath = false;
orientToSource = false;
alphaFlag = true;
alphaEasing = 0;
spawnInterval = 0;
spawnNext = 0;
spawnWidth = 0;
spawnHeight = 0;
frameOffset = 0;
}
function start() {
running = true;
var _local2 = 0;
while (_local2 < frameOffset) {
update();
_local2++;
}
}
function stop() {
running = false;
}
function pause() {
paused = true;
}
function resume() {
paused = true;
}
function burst() {
if (!paused) {
var _local2 = 0;
while (_local2 < numParticles) {
addParticle(randSpeed(xSpeed, xSpeedRandom), randSpeed(ySpeed, ySpeedRandom), randLife(lifespan));
_local2++;
}
}
}
function init(clip, num, life, dx, dy, holder) {
if ((holder == undefined) || (holder == null)) {
this.holder = _parent.createEmptyMovieClip("holder", getDepth() + 1);
} else {
this.holder = holder;
}
numParticles = num;
lifespan = life;
xSpeed = dx;
ySpeed = dy;
var _local2 = 0;
while (_local2 < numParticles) {
particles.push(this.holder.attachMovie(clip, "p" + _local2, _local2));
var _local3 = particles[_local2];
_local3._x = 0;
_local3._y = 0;
_local3._visible = false;
_local3.life = 100;
_local2++;
}
}
function setScaling(scale) {
scaling = scale;
}
function setRotation(rotate) {
rotation = rotate;
}
function setLifeRandomness(rand) {
lifeRandom = rand;
}
function setSpeedRandomness(x, y) {
xSpeedRandom = x;
ySpeedRandom = y;
}
function setRotationRandomness(rand) {
rotateRandom = rand;
}
function setGravity(gravity) {
this.gravity = gravity;
}
function setAlpha(alpha) {
alphaFlag = alpha;
}
function setAlphaEasing(ease) {
if (ease > 1) {
ease = 1;
} else if (ease < 0) {
ease = 0;
}
alphaEasing = ease;
}
function setOrientToPath(orient) {
orientToPath = orient;
}
function setOrientToSource(orient) {
orientToSource = orient;
}
function setSpawnArea(x, y) {
spawnWidth = x;
spawnHeight = y;
}
function setSpawnInterval(interval) {
spawnInterval = interval;
}
function setFrameOffset(offset) {
frameOffset = offset;
}
function addParticle(dx, dy, life) {
var _local3 = 0;
while (_local3 < numParticles) {
var _local2 = particles[_local3];
if (!_local2._visible) {
break;
}
_local3++;
}
if (spawnWidth != 0) {
_local2._x = xPos + ((Math.random() * spawnWidth) - (spawnWidth * 0.5));
} else {
_local2._x = xPos;
}
if (spawnHeight != 0) {
_local2._y = yPos + ((Math.random() * spawnHeight) - (spawnHeight * 0.5));
} else {
_local2._y = yPos;
}
_local2._rotation = 0;
_local2._xscale = 100;
_local2._yscale = 100;
_local2._alpha = 100;
_local2.maxLife = life;
_local2.life = life;
_local2.fade = 100 / life;
_local2.dx = dx;
_local2.dy = dy;
_local2.rot = randRotation(rotation);
_local2.scale = scaling;
if (orientToSource) {
_local2._rotation = _rotation - 90;
}
_local2._visible = true;
}
function randSpeed(speed, rand) {
var _local2 = (((speed + 1) * rand) * Math.random()) - (((speed + 1) * rand) * 0.5);
speed = speed + _local2;
return(speed);
}
function randLife(life) {
var _local3 = ((life + 1) * lifeRandom) * Math.random();
life = life - _local3;
return(life);
}
function randRotation(rot) {
var _local3 = (((rot + 1) * rotateRandom) * Math.random()) - (((rot + 1) * rotateRandom) * 0.5);
rot = rot + _local3;
return(rot);
}
function update() {
if (running) {
if (spawnNext >= spawnInterval) {
addParticle(randSpeed(xSpeed, xSpeedRandom), randSpeed(ySpeed, ySpeedRandom), randLife(lifespan));
spawnNext = 0;
}
spawnNext++;
}
xPos = _x;
yPos = _y;
var _local3 = 0;
while (_local3 < numParticles) {
var _local2 = particles[_local3];
if (_local2._visible) {
_local2.life--;
if (_local2.life <= 0) {
_local2._visible = false;
} else {
if (alphaFlag) {
if ((_local2.life / _local2.maxLife) < (1 - alphaEasing)) {
_local2._alpha = _local2._alpha - (_local2.fade / (1 - alphaEasing));
}
}
if (orientToPath) {
_local2._rotation = (Math.atan2(_local2.dy, _local2.dx) * D180_OVER_PI) - 270;
} else {
_local2._rotation = _local2._rotation + _local2.rot;
}
_local2.dy = _local2.dy + gravity;
_local2._x = _local2._x + _local2.dx;
_local2._y = _local2._y + _local2.dy;
_local2._xscale = _local2._xscale * _local2.scale;
_local2._yscale = _local2._yscale * _local2.scale;
}
}
_local3++;
}
}
function cleanUp() {
var _local2 = 0;
while (_local2 < numParticles) {
particles[_local2].removeMovieClip();
_local2++;
}
delete particles;
}
function reset() {
var _local2 = 0;
while (_local2 < numParticles) {
particles[_local2]._visible = false;
_local2++;
}
}
function onEnterFrame() {
if (!paused) {
update();
}
}
var D180_OVER_PI = 57.2957795;
}
Symbol 795 MovieClip [__Packages.HighScores2] Frame 0
class HighScores2 extends MovieClip
{
var theTitle, attemptCounter, configured, canConnect, score_runner, onEnterFrame, activityList, _visible, confirm, countryCodeArray, leagueNamesSoFar, leagueNameHolder, currentSpan, allMovie, monthMovie, weekMovie, todayMovie, leagueMovie, allButton, monthButton, weekButton, todayButton, leagueButton, leagueNameString, currentActivity, theRoot, serviceURL, viralID, highLightColor, quitButton, league, league_player, score_id, currentFirstPos, scoresPerPage, scoresAsTime, previousButton, nextButton, leaguesOn, leaveLeagueButton, startLeagueButton, debugArea, theScore, onSubmit, onCancel, gotoAndStop, theScoreBox, player_name, nameInput, submitButton, skipitButton, leagueStarterName, leagueStarterEmail, submitLeagueButton, addMoreButton, leagueName, viralName, loadingMovie, onHide;
function HighScores2 () {
super();
theTitle.text = "HIGH SCORES TABLE";
attemptCounter = new Number(0);
configured = new Boolean(false);
canConnect = new Boolean(true);
score_runner = new LoadVars();
onEnterFrame = loadLoop;
activityList = new Array();
_visible = false;
confirm._visible = false;
countryCodeArray = new Array("AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "AX", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "KY", "CF", "CL", "CN", "CO", "CD", "CK", "CR", "HR", "CU", "CY", "CZ", "DK", "DJ", "DO", "EC", "EG", "SV", "ER", "EE", "ET", "EU", "FO", "FJ", "FI", "FR", "GF", "PF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MR", "MU", "MX", "FM", "MD", "MC", "MN", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "AP", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PL", "PT", "PR", "QA", "ZZ", "RO", "RU", "RW", "KN", "LC", "WS", "SM", "SA", "SN", "RS", "CS", "SC", "SL", "SG", "SK", "SI", "SB", "ZA", "ES", "LK", "SD", "SR", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TG", "TO", "TT", "TN", "TR", "TM", "TV", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "YE", "ZM", "ZW", "00");
leagueNamesSoFar = new Number();
leagueNameHolder = new Object();
}
function showSpan() {
var _local2;
var _local5 = new Array("ALL", "MONTH", "WEEK", "DAY", "LEAGUE");
var _local4 = returnArrayIndex(currentSpan, _local5);
var _local3 = new Array(allMovie, monthMovie, weekMovie, todayMovie, leagueMovie);
trace("DEACTIVEATEING BUTTONS");
_local2 = 0;
while (_local2 < _local3.length) {
trace(_local3[_local2]);
_local3[_local2].gotoAndStop("dormant");
_local2++;
}
trace(_local4);
_local3[_local4].gotoAndStop("active");
allButton = allMovie.allButton;
monthButton = monthMovie.monthButton;
weekButton = weekMovie.weekButton;
todayButton = todayMovie.todayButton;
leagueButton = leagueMovie.leagueButton;
if (currentSpan == "LEAGUE") {
if ((leagueNameString == undefined) || (leagueNameString == "")) {
theTitle.text = "YOUR LEAGUE HIGH SCORES";
} else {
theTitle.text = leagueNameString.toUpperCase();
}
} else {
theTitle.text = "HIGH SCORE TABLE";
}
}
function configure(theHost, theID, theRoot, highLight) {
if (canConnect == false) {
activityList.push(Array("CONFIGURE", theHost, theID, theRoot, highLight));
return(undefined);
}
currentActivity = Array("CONFIGURE", theHost, theID, theRoot, highLight);
canConnect = false;
var _local4 = new Date();
var self = this;
this.theRoot = theRoot;
checkForLeagues();
serviceURL = theHost;
viralID = theID;
if (highLight == undefined) {
highLightColor = 16711680 /* 0xFF0000 */;
} else {
highLightColor = highLight;
}
quitButton.onRelease = function () {
self.hideScores();
self.onHide();
};
score_runner.fiab_viral_id = viralID;
score_runner.rnd = _local4.getTime();
score_runner.fiab_score_action = "CONFIGURE";
score_runner.league_id = league;
score_runner.fiab_league_player = league_player;
score_runner.onLoad = function (success) {
self.loadingMovie._visible = false;
if (success) {
trace("CONFIGURED SUCCESS");
if (this.errmsg != undefined) {
self.handleError(this.errmsg);
} else {
if (this.fiab_league_player == 0) {
self.league_player = 0;
}
if (this.league_id == 0) {
self.league_id = 0;
}
self.leagueNameString = this.league_name;
self.attemptCounter = 0;
if (this.leaguesOn == "true") {
self.leaguesOn = true;
} else {
self.leaguesOn = false;
}
if (this.global_scores == "true") {
self.globalScoresOn = true;
} else {
self.globalScoresOn = false;
}
if (this.scoresAsTime == "false") {
self.scoresAsTime = false;
} else {
self.scoresAsTime = true;
}
self.maxScore = Number(this.max_score);
self.minScore = Number(this.min_score);
self.scoresPerPage = Number(this.scoresPerPage);
self.viralName = this.game_name;
self.defaultSpan = this.default_span;
self.currentSpan = this.default_span;
if (((((self.league != 0) && (self.league != undefined)) && (self.league_player != 0)) && (self.league_player != undefined)) && (self.leaguesOn == true)) {
self.currentSpan = "LEAGUE";
}
if (this.player_name != undefined) {
self.player_name = this.player_name;
}
self.configured = true;
self.onConfigure();
}
} else {
trace("ERROR CONFIGURING " + self.attemptCounter);
self.handleError("FAILED");
self.onConfigureFail();
}
self.canConnect = true;
delete this.rnd;
delete this.fiab_score_action;
delete this.errmsg;
delete this.default_span;
delete this.leaguesOn;
delete this.global_scores;
delete this.max_score;
delete this.min_score;
delete this.game_name;
delete this.scoresAsTime;
delete this.scoresPerPage;
delete this.league_id;
delete this.fiab_league_player;
delete this.player_name;
delete this.league_name;
};
score_runner.sendAndLoad(serviceURL, score_runner, "GET");
}
function loadLoop() {
if (canConnect == false) {
return(undefined);
}
if (activityList.length < 1) {
return(undefined);
}
currentActivity = activityList.shift();
trace("ACTIVITY : " + currentActivity);
switch (currentActivity[0]) {
case "RANK" :
returnRank(currentActivity[1]);
break;
case "SUBMIT" :
submitScore(currentActivity[1], currentActivity[2], currentActivity[3], currentActivity[4]);
break;
case "CONFIGURE" :
configure(currentActivity[1], currentActivity[2], currentActivity[3], currentActivity[4]);
break;
case "GET SCORES" :
get_scores();
break;
case "START_LEAGUE" :
submitLeagueStart();
break;
case "LEAVE_LEAGUE" :
leaveForEver();
}
}
function submitScore(myName, myScore, onSuccess, isGlobal) {
if (canConnect == false) {
activityList.push(Array("SUBMIT", myName, myScore, onSuccess, isGlobal));
return(undefined);
}
currentActivity = Array("SUBMIT", myName, myScore, onSuccess, isGlobal);
canConnect = false;
trace("SUBMITING SCORE : " + serviceURL);
var _local7;
var _local2 = new Date();
var self = this;
score_runner.scorerName = myName;
score_runner.score = myScore;
score_runner.score_id = score_id;
score_runner.fiab_score_action = "SUBMIT";
score_runner.league_id = league;
score_runner.league_player = league_player;
score_runner.rnd = _local2.getTime();
score_runner.globalScore = isGlobal;
score_runner.onLoad = function (success) {
self.loadingMovie._visible = false;
if (success) {
trace("SUBMIT SUCCESS");
if (this.errmsg == undefined) {
self.attemptCounter = 0;
if (this.globalScore == 0) {
trace("WAS NOT A GLOBAL SCORE");
self.gotoAndStop("submited");
self.populateSubmited();
} else {
trace("WAS A GLOBAL SCORE");
self.score_id = this.score_id;
}
self.player_name = this.player_name;
} else if (this.errmsg != undefined) {
self.handleError(this.errmsg);
}
} else {
trace("SUBMIT ERROR" + self.attemptCounter);
self.handleError("FAILED");
}
delete this.scorerName;
delete this.score;
delete this.rnd;
delete this.fiab_score_action;
delete this.errmsg;
delete this.league_id;
delete this.league_player;
delete this.globalScore;
delete this.more_available;
delete this.currentSpan;
delete this.score_id;
delete this.globalScore;
delete this.player_name;
self.canConnect = true;
};
score_runner.sendAndLoad(serviceURL, score_runner, "GET");
if (score_runner.globalScore == 0) {
doLoading();
}
}
function populateSubmited() {
var _local2;
var self = this;
var _local3;
currentFirstPos = Number(score_runner.first_pos);
confirm._visible = false;
showSpan();
_local2 = 0;
while (_local2 < scoresPerPage) {
if (((score_runner["score" + _local2] == "NONE") && (score_runner["name" + _local2] == "NONE")) && ((score_runner["location" + _local2] = "NONE"))) {
this["score" + _local2]._visible = false;
this["flag" + _local2]._visible = false;
this["name" + _local2]._visible = false;
this["rank" + _local2]._visible = false;
} else {
this["score" + _local2]._visible = true;
this["flag" + _local2]._visible = true;
this["name" + _local2]._visible = true;
this["rank" + _local2]._visible = true;
this["score" + _local2].text = score_runner["score" + _local2];
if (scoresAsTime == true) {
this["score" + _local2].text = secondsToString(Number(this["score" + _local2].text));
} else {
this["score" + _local2].text = addCommas(this["score" + _local2].text);
}
upDateFlag(this["flag" + _local2], score_runner["location" + _local2]);
this["name" + _local2].text = score_runner["name" + _local2];
this["rank" + _local2].text = Number(Number(score_runner.first_pos) + Number(_local2));
if (score_runner["highlight" + _local2] == "YES") {
trace("WE HAVE SCORE");
_local3 = new TextFormat();
_local3.color = highLightColor;
this["score" + _local2].setTextFormat(_local3);
this["name" + _local2].setTextFormat(_local3);
this["rank" + _local2].setTextFormat(_local3);
}
}
_local2++;
}
if (score_runner.first_pos > 1) {
previousButton._visible = true;
previousButton.onRelease = function () {
trace("PREVIOUS PRESSED");
self.currentFirstPos = self.currentFirstPos - self.scoresPerPage;
self.get_scores();
};
} else {
previousButton._visible = false;
previousButton.onRelease = null;
}
trace("MORE SCORES : " + score_runner.more_available);
trace("SPAN : " + score_runner.currentSpan);
currentSpan = score_runner.currentSpan;
if (score_runner.more_available == "true") {
nextButton._visible = true;
nextButton.onRelease = function () {
trace("NEXT PRESSED");
self.currentFirstPos = self.currentFirstPos + self.scoresPerPage;
self.get_scores();
};
} else {
nextButton._visible = false;
nextButton.onRelease = null;
}
if (((leaguesOn == true) && (league != 0)) && (league != undefined)) {
trace("LEAGUES ARE ON");
leaveLeagueButton._visible = true;
leaveLeagueButton.onRelease = function () {
trace("LEAVE LEAGUE");
self.setupLeaveLeague();
};
} else {
trace("LEAGUES AE OFF");
leaveLeagueButton._visible = false;
leaveLeagueButton.onRelease = null;
}
if ((leaguesOn == true) && (league == 0)) {
startLeagueButton._visible = true;
startLeagueButton.onRelease = function () {
trace("START A LEAGUE");
self.gotoAndStop("start_league");
self.setupLeagueStartPage();
};
} else {
startLeagueButton._visible = false;
startLeagueButton.onRelease = null;
}
if ((leaguesOn == true) && (league != 0)) {
leagueButton._visible = true;
trace("SHOW LEAGUE BUTTON");
leagueButton.onRelease = function () {
trace("VIEW LEAGUE");
self.currentSpan = "LEAGUE";
self.currentFirstPos = 0;
self.get_scores();
};
} else {
trace("HIDE LEAGE BUTTON");
leagueButton._visible = false;
leagueButton.onRelease = null;
}
allButton.onRelease = function () {
trace("VIEW ALL SCORES");
self.currentSpan = "ALL";
self.currentFirstPos = 0;
self.get_scores();
};
monthButton.onRelease = function () {
trace("VIEW MONTHS SCORES");
self.currentSpan = "MONTH";
self.currentFirstPos = 0;
self.get_scores();
};
weekButton.onRelease = function () {
trace("VIEW WEEKS SCORES");
self.currentSpan = "WEEK";
self.currentFirstPos = 0;
self.get_scores();
};
todayButton.onRelease = function () {
trace("VIEW DAYS SCORES");
self.currentSpan = "DAY";
self.currentFirstPos = 0;
self.get_scores();
};
_local2 = 0;
while (_local2 < 10) {
delete score_runner["score" + _local2];
delete score_runner["location" + _local2];
delete score_runner["name" + _local2];
delete score_runner["highlight" + _local2];
_local2++;
}
delete score_runner.first_pos;
delete score_runner.more_available;
}
function populateRanking() {
}
function get_scores() {
if (canConnect == false) {
activityList.push(Array("GET SCORES"));
return(undefined);
}
currentActivity = Array("GET SCORES");
canConnect = false;
var self = this;
var _local3 = new Date();
score_runner.score_interval = currentSpan;
if (currentSpan == "LEAGUE") {
score_runner.league_id = league;
} else {
score_runner.league_id = 0;
}
score_runner.start_pos = currentFirstPos;
score_runner.fiab_score_action = "GET_SCORE";
score_runner.rnd = _local3.getTime();
score_runner.onLoad = function (success) {
self.loadingMovie._visible = false;
if (success) {
if (this.errmsg == undefined) {
this.attemptCounter = 0;
trace("GET SCORES SUCCESSFULL!");
self.gotoAndStop("submited");
self.populateSubmited();
} else if (this.errmsg != undefined) {
self.handleError(this.errmsg);
}
} else {
trace("ERROR GETTING SCORES");
self.handleError("FAILED");
return(undefined);
}
self.canConnect = true;
delete this.score_interval;
delete this.rnd;
delete this.start_pos;
delete this.fiab_score_action;
delete this.league_id;
delete this.more_available;
delete this.currentSpan;
delete this.errmsg;
};
var _local2;
for (_local2 in score_runner) {
trace((_local2 + " : ") + score_runner[_local2]);
}
score_runner.sendAndLoad(serviceURL, score_runner, "GET");
trace("GOING TO LOADING");
doLoading();
}
function checkForLeagues() {
trace("CHECKING FOR LEAGUES");
trace("ROOT : " + theRoot);
trace("THIS : " + this);
trace("DEBUG : " + debugArea);
debugArea.text = "BOO!! CHECKING FOR LEAGUES";
debugArea.text = debugArea.text + (("\nROOT : " + theRoot) + newline);
trace("DEBUG TEXT " + debugArea.text);
if (theRoot.fiab_league_id != undefined) {
league = theRoot.fiab_league_id;
} else {
league = 0;
}
if (theRoot.fiab_league_player != undefined) {
league_player = theRoot.fiab_league_player;
} else {
league_player = 0;
}
trace("END CHECK FOR LEAGUES");
}
function submit(theScore, onSubmit, onCancel) {
var self = this;
var enterKeyListener = new Object();
enterKeyListener.onKeyDown = function () {
if (Key.isDown(13)) {
self.submitButton.onRelease();
}
};
score_id = new Number(0);
this.theScore = theScore;
this.onSubmit = onSubmit;
this.onCancel = onCancel;
_visible = true;
gotoAndStop("submit");
confirm._visible = false;
theScoreBox.text = String(theScore);
trace("PLAYER NAME " + player_name);
if (player_name != undefined) {
nameInput.text = player_name;
}
if (scoresAsTime == true) {
theScoreBox.text = secondsToString(Number(theScoreBox.text));
} else {
theScoreBox.text = addCommas(theScoreBox.text);
}
returnRank(theScore);
submitButton.onRelease = function () {
if (self.nameInput.text == "") {
return(undefined);
}
Key.removeListener(enterKeyListener);
self.submitScore(self.nameInput.text, self.theScore, self.onSubmit, 0);
};
skipitButton.onRelease = function () {
trace("GLOBAL SCORES : " + self.globalScoresOn);
if (self.onCancel) {
self.hideScores();
self.onCancel();
} else {
self.get_scores();
}
};
if (self.globalScoresOn == true) {
self.submitScore("", self.theScore, self.onCancel, 1);
}
Selection.setFocus(nameInput);
Key.addListener(enterKeyListener);
}
function justView() {
var _local2 = this;
gotoAndStop("view");
_visible = true;
get_scores();
}
function returnRank(theScoreToRank) {
if (canConnect == false) {
activityList.push(Array("RANK", theScoreToRank));
return(undefined);
}
var self = this;
canConnect = false;
currentActivity = Array("RANK", theScoreToRank);
trace("RETURNING REANK");
score_runner.fiab_score_action = "JUST_RANK";
score_runner.score = theScoreToRank;
score_runner.onLoad = function (success) {
self.loadingMovie._visible = false;
if (success) {
if (this.errmsg != undefined) {
self.handleError(this.errmsg);
} else {
self.attemptCounter = 0;
trace("RANK SUCCESS");
self.rankingText.text = self.generateRankText(this.first_pos, this.currentSpan);
}
} else {
trace("ERROR GETTING RANK");
self.handleError("FAILED");
}
delete this.first_pos;
delete this.fiab_score_action;
delete this.name;
delete this.score;
delete this.location;
delete this.currentSpan;
delete this.errmsg;
self.canConnect = true;
};
score_runner.sendAndLoad(serviceURL, score_runner, "GET");
}
function generateRankText(position, theSpan) {
trace("GENERATING RANK TEXT");
var _local1 = new String();
switch (theSpan) {
case "LEAGUE" :
_local1 = "in your league.";
break;
case "ALL" :
_local1 = "in the world ever!";
break;
case "YEAR" :
_local1 = "in the world this year.";
break;
case "MONTH" :
_local1 = "in the world this month.";
break;
case "WEEK" :
_local1 = "in the world this week.";
break;
case "DAY" :
_local1 = "in the world today.";
break;
default :
_local1 = ".";
}
return((("You ranked " + Number(Number(position) + Number(1))) + " ") + _local1);
}
function setupLeagueStartPage() {
var _local2;
var self = this;
var _local3 = this;
confirm._visible = false;
startLeagueButton._visible = false;
leagueNamesSoFar = 0;
previousButton._visible = false;
nextButton._visible = false;
delete leagueNameHolder.leagueStaterName;
delete leagueNameHolder.leagueStaterEmail;
_local2 = 1;
while (leagueNameHolder["name" + _local2] != undefined) {
delete leagueNameHolder["name" + _local2];
delete leagueNameHolder["email" + _local2];
_local2++;
}
_local2 = 1;
leagueStarterName.text = "";
leagueStarterEmail.text = "";
leagueStarterName.tabEnabled = true;
leagueStarterName.tabIndex = 1;
leagueStarterEmail.tabEnabled = true;
leagueStarterEmail.tabIndex = 2;
while (this["name" + _local2] != undefined) {
this["name" + _local2].text = "";
this["email" + _local2].text = "";
this["name" + _local2].tabEnabled = true;
this["email" + _local2].tabEnabled = true;
this["name" + _local2].tabIndex = 2 + (_local2 * 2);
this["email" + _local2].tabIndex = 3 + (_local2 * 2);
_local2++;
}
submitLeagueButton.onRelease = function () {
self.submitLeagueButtonRelease();
};
addMoreButton.onRelease = function () {
self.addMoreToLeague();
};
}
function submitLeagueButtonRelease() {
var _local2;
var _local3;
var _local4;
_local4 = leagueNamesSoFar;
trace((("LEAGE NAME " + leagueName) + " : ") + leagueName.text);
_local2 = 1;
while (this["name" + _local2] != undefined) {
trace("THIS NAME : " + _local3);
if (this["name" + _local2].text == "") {
_local2++;
continue;
}
_local3 = _local2 + _local4;
leagueNameHolder["name" + _local3] = new String();
leagueNameHolder["email" + _local3] = new String();
leagueNameHolder["name" + _local3] = this["name" + _local2].text;
leagueNameHolder["email" + _local3] = this["email" + _local2].text;
_local2++;
leagueNamesSoFar++;
}
leagueNameHolder.leagueStarterName = new String();
leagueNameHolder.leagueStarterEmail = new String();
leagueNameHolder.leagueStarterEmail = leagueStarterEmail.text;
leagueNameHolder.leagueStarterName = leagueStarterName.text;
leagueNameHolder.leagueName = new String();
leagueNameHolder.leagueName = leagueName.text;
trace("SUBMITTING LEAGUE");
for (_local2 in leagueNameHolder) {
trace((_local2 + " : ") + leagueNameHolder[_local2]);
}
trace(leagueNameHolder);
submitLeagueStart();
}
function addMoreToLeague() {
trace("ADDING MORE");
var _local2;
var _local3;
var _local4;
_local4 = leagueNamesSoFar;
_local2 = 1;
while (this["name" + _local2] != undefined) {
trace("THIS NAME : " + _local3);
if (this["name" + _local2].text == "") {
_local2++;
continue;
}
_local3 = _local2 + _local4;
leagueNameHolder["name" + _local3] = new String();
leagueNameHolder["email" + _local3] = new String();
leagueNameHolder["name" + _local3] = this["name" + _local2].text;
leagueNameHolder["email" + _local3] = this["email" + _local2].text;
this["name" + _local2].text = "";
this["email" + _local2].text = "";
leagueNamesSoFar++;
_local2++;
}
}
function submitLeagueStart() {
if (canConnect == false) {
activityList.push(Array("START_LEAGUE"));
return(undefined);
}
trace("CONNECTING FOR NEW LEAGUE");
currentActivity = Array("START_LEAGUE");
var _local3 = new Date();
var _local2;
var self = this;
score_runner.rnd = _local3.getTime();
score_runner.fiab_score_action = "START_LEAGUE";
score_runner.leagueStarterName = leagueNameHolder.leagueStarterName;
score_runner.leagueStarterEmail = leagueNameHolder.leagueStarterEmail;
score_runner.leagueName = leagueNameHolder.leagueName;
score_runner.viralName = viralName;
trace("PREPAREING FOR LEAGUE\n\n");
for (_local2 in leagueNameHolder) {
trace((_local2 + " : ") + leagueNameHolder[_local2]);
score_runner[_local2] = leagueNameHolder[_local2];
}
trace("LEAGUE PREPAED\n\n");
score_runner.onLoad = function (success) {
self.loadingMovie._visible = false;
var _local2;
trace("NEW LEAGUE ON LOAD");
if (success) {
if (this.errmsg != undefined) {
self.handleError(this.errmsg);
} else {
self.attemptCounter = 0;
trace("THE LEAGUE HAS BEEN STARTED : " + this.league);
self.league = this.league;
self.league_player = this.league_player;
this.theRoot.fiab_league_id = this.league;
this.theRoot.fiab_league_player = this.league_player;
self.leagueNameString = this.league_name;
self.gotoAndStop("leagueSuccess");
self.currentSpan = "LEAGUE";
self.populateSubmited();
}
} else {
self.handleError("FAILED");
}
delete this.rnd;
for (_local2 in self.leagueNameHolder) {
delete this[_local2];
}
delete this.fiab_score_action;
delete this.league;
delete this.league_player;
delete this.viralName;
delete this.league_name;
delete this.errmsg;
};
score_runner.sendAndLoad(serviceURL, score_runner, "GET");
doLoading();
}
function setupLeaveLeague() {
var self = this;
confirm._visible = true;
confirm.noButton.onRelease = function () {
self.confirm._visible = false;
};
confirm.yesButton.onRelease = function () {
trace("LEAVE FOREVER");
self.doLoading();
self.leaveForEver();
};
}
function leaveForEver() {
if (canConnect == false) {
activityList.push(Array("LEAVE_LEAGUE"));
return(undefined);
}
currentActivity = Array("LEAVE_LEAGUE");
var _local2 = new Date();
var self = this;
score_runner.rnd = _local2.getTime();
score_runner.fiab_score_action = "LEAVE_LEAGUE";
score_runner.league_player = league_player;
score_runner.onLoad = function (success) {
self.loadingMovie._visible = false;
if (success) {
self.attemptCounter = 0;
trace("SUCESSFULLY LEFT THE LEAGUE");
trace("LEAVE FOR EVER");
self.theRoot.fiab_league_id = 0;
self.theRoot.fiab_league_player = 0;
self.league = 0;
self.league_player = 0;
self.get_scores();
} else {
trace("leaving league failure");
self.handleError("FAILED");
}
delete this.rnd;
delete this.fiab_score_action;
delete this.errmsg;
};
score_runner.sendAndLoad(serviceURL, score_runner, "GET");
doLoading();
}
function doLoading() {
loadingMovie._visible = true;
}
function hideScores() {
_visible = false;
onHide();
}
function handleError(theError) {
trace("theError : " + theError);
var _local5 = new String();
switch (theError) {
case "LEAGUE LEFT" :
case "BEST SCORE" :
return(undefined);
case "SCORE TOO HIGH" :
case "SCORE TOO LOW" :
break;
case "NO NAME" :
default :
case "NO SCORE" :
case "NO CONNECTION" :
case "BAD LOCATION" :
case "BAD WORD" :
case "INVALID ID" :
case "NO REQUEST" :
case "NO LEAGUE CREATOR NAME" :
case "NO LEAGUE CREATOR EMAIL" :
case "NO LEAGUE BUDDIES" :
case "BAD SPAN" :
case "FAILED" :
if ((++attemptCounter) > 5) {
gotoAndStop("error");
} else {
activityList.unshift(currentActivity);
}
}
var _local2;
var _local3 = new Boolean(true);
debugArea.text = debugArea.text + "\nDELETING THESE ITEMS:";
for (_local2 in score_runner) {
_local3 = false;
switch (_local2) {
case "fiab_viral_id" :
case "league" :
case "league_player" :
case "viralID" :
_local3 = true;
break;
default :
_local3 = false;
}
if (_local3 == true) {
continue;
}
debugArea.text = debugArea.text + (((newline + _local2) + " : ") + score_runner[_local2]);
delete score_runner[_local2];
}
debugArea.text = debugArea.text + "\nDELETING COMPLETE\n";
}
function upDateFlag(theFlag, theFlagCode) {
var _local2;
_local2 = returnArrayIndex(theFlagCode, countryCodeArray);
if (_local2 < 0) {
theFlag.gotoAndStop("blank");
} else {
_local2++;
theFlag.gotoAndStop(_local2);
}
}
function returnArrayIndex(needle, haystack) {
var _local1;
_local1 = 0;
while (_local1 < haystack.length) {
if (needle == haystack[_local1]) {
return(_local1);
}
_local1++;
}
return(-1);
}
function secondsToString(seconds) {
var _local2 = "";
var _local3 = new Number(0);
var _local4 = new Number(0);
while (seconds > 3600) {
seconds = seconds - 3600;
_local3++;
}
if (_local3 < 10) {
_local2 = "0" + _local3.toString();
} else {
_local2 = _local3.toString();
}
_local2 = _local2 + ":";
while (seconds > 60) {
seconds = seconds - 60;
_local4++;
}
if (_local4 < 10) {
_local2 = _local2 + ("0" + _local4.toString());
} else {
_local2 = _local2 + _local4.toString();
}
_local2 = _local2 + ":";
if (seconds < 10) {
_local2 = _local2 + ("0" + seconds.toString());
} else {
_local2 = _local2 + seconds.toString();
}
return(_local2);
}
function addCommas(myString) {
if (myString == "NONE") {
return("NONE");
}
var _local2;
var _local1;
var _local5;
var _local3 = "";
_local2 = 0;
while (_local2 < myString.length) {
if (_local2 > 0) {
_local3 = "," + _local3;
}
_local1 = myString.length - (_local2 + 3);
if (_local1 < 0) {
_local5 = 3 + _local1;
_local1 = 0;
} else {
_local5 = 3;
}
_local3 = myString.substr(_local1, _local5) + _local3;
if (_local1 == 0) {
break;
}
_local2 = _local2 + 3;
}
return(_local3);
}
}
Symbol 796 MovieClip [__Packages.SendToMeForm] Frame 0
class SendToMeForm extends MovieClip
{
var serviceURL, dataRunner, canGo, gotoAndStop, submitButton, backButton, errorBox, theNameInput, theEmail, _visible;
function SendToMeForm () {
super();
serviceURL = new String("");
dataRunner = new LoadVars();
canGo = false;
gotoAndStop("mail");
setupToSend();
}
function setServiceURL(serviceURL) {
this.serviceURL = serviceURL;
}
function setupToSend() {
canGo = false;
trace("SETTING UP TO SEND MAILER THIS " + this);
var self = this;
submitButton.onRelease = function () {
trace("SUBMIT PRESSED");
self.submit();
};
}
function setUpSent() {
trace("SETTING UP SENT " + this);
var self = this;
backButton.onRelease = function () {
trace("BACK PRESSED");
self.gotoAndStop("mail");
self.setupToSend();
};
}
function submit() {
errorBox.text = "";
if (checkText(theNameInput.text) == false) {
errorBox.text = "Please enter your name.";
return(undefined);
}
if (checkEmail(theEmail.text) == false) {
errorBox.text = "Please enter your email.";
return(undefined);
}
sendData();
}
function sendData() {
var _local2 = new Date();
var self = this;
dataRunner.theName = theNameInput.text;
dataRunner.theEmail = theEmail.text;
dataRunner.rnd = _local2.getTime();
dataRunner.onLoad = function (success) {
var _local3;
if (success) {
if (this.returnValue == "ERROR") {
self.gotoValue = "error";
} else {
self.gotoValue = "sent";
}
self.canGo = true;
trace("data sent okay");
delete this.rnd;
delete this.theName;
delete this.theEmail;
delete this.returnValue;
} else {
trace("failed to send data");
self.gotoValue = "error";
self.canGo = true;
}
};
trace(("SENDING DATA TO " + serviceURL) + " NOW");
dataRunner.sendAndLoad(serviceURL, dataRunner, "GET");
gotoAndStop("sending");
}
function checkText(theText) {
trace("CHECKING TEXT : " + theText);
if (theText == "") {
return(false);
}
return(true);
}
function checkNumber(theNumber) {
var _local1;
if (theNumber == "") {
return(false);
}
_local1 = 0;
while (_local1 < theNumber.length) {
if ((theNumber.charAt(_local1) != " ") && (isNaN(theNumber.charAt(_local1)))) {
return(false);
}
_local1++;
}
return(true);
}
function checkEmail(email) {
var _local1;
var _local2;
var _local4;
if (email == "") {
return(false);
}
_local1 = email.indexOf("@");
if (_local1 == -1) {
return(false);
}
if (_local1 == 0) {
return(false);
}
_local1++;
_local2 = email.indexOf(".", _local1);
if (_local2 == -1) {
return(false);
}
if (_local2 == _local1) {
return(false);
}
_local2++;
_local4 = email.substr(_local2);
if (_local4.length < 1) {
return(false);
}
return(true);
}
function view() {
_visible = true;
Selection.setFocus(theNameInput);
}
}
Symbol 797 MovieClip [__Packages.SendToAFriendForm] Frame 0
class SendToAFriendForm extends MovieClip
{
var serviceURL, dataRunner, gotoAndStop, submitButton, backButton, theNameInput, theEmail, errorBox, theNameInput1, theEmail1, _visible;
function SendToAFriendForm () {
super();
serviceURL = new String("");
dataRunner = new LoadVars();
gotoAndStop("mail");
setupToSend();
}
function setServiceURL(serviceURL) {
this.serviceURL = serviceURL;
}
function setupToSend() {
trace("SETTING UP TO SEND MAILER THIS " + this);
var self = this;
submitButton.onRelease = function () {
trace("SUBMIT PRESSED");
self.submit();
};
}
function setUpSent() {
trace("SETTING UP SENT " + this);
var self = this;
backButton.onRelease = function () {
trace("BACK PRESSED");
self.gotoAndStop("mail");
self.setupToSend();
};
}
function submit() {
trace("SUBMITING : " + this);
trace("NAME : " + theNameInput.text);
trace("COMPANY : " + theEmail.text);
errorBox.text = "";
if (checkText(theNameInput.text) == false) {
errorBox.text = "Please enter your name.";
return(undefined);
}
if (checkText(theNameInput1.text) == false) {
errorBox.text = "Please enter your friend's name.";
return(undefined);
}
if (checkEmail(theEmail1.text) == false) {
errorBox.text = "Please enter your friend's email.";
return(undefined);
}
sendData();
}
function sendData() {
var _local2 = new Date();
var self = this;
dataRunner.theName = theNameInput.text;
dataRunner.theName1 = theNameInput1.text;
dataRunner.theEmail1 = theEmail1.text;
dataRunner.rnd = _local2.getTime();
dataRunner.onLoad = function (success) {
var _local3;
if (success) {
if (this.returnValue == "ERROR") {
self.gotoValue = "error";
} else {
self.gotoValue = "sent";
}
self.canGo = true;
trace("data sent okay");
delete this.rnd;
delete this.theName;
delete this.theName1;
delete this.theEmail1;
delete this.returnValue;
} else {
trace("failed to send data");
self.gotoValue = "error";
self.canGo = true;
}
};
dataRunner.sendAndLoad(serviceURL, dataRunner, "GET");
gotoAndStop("sending");
}
function checkText(theText) {
trace("CHECKING TEXT : " + theText);
if (theText == "") {
return(false);
}
return(true);
}
function checkNumber(theNumber) {
var _local1;
if (theNumber == "") {
return(false);
}
_local1 = 0;
while (_local1 < theNumber.length) {
if ((theNumber.charAt(_local1) != " ") && (isNaN(theNumber.charAt(_local1)))) {
return(false);
}
_local1++;
}
return(true);
}
function checkEmail(email) {
var _local1;
var _local2;
var _local4;
if (email == "") {
return(false);
}
_local1 = email.indexOf("@");
if (_local1 == -1) {
return(false);
}
if (_local1 == 0) {
return(false);
}
_local1++;
_local2 = email.indexOf(".", _local1);
if (_local2 == -1) {
return(false);
}
if (_local2 == _local1) {
return(false);
}
_local2++;
_local4 = email.substr(_local2);
if (_local4.length < 1) {
return(false);
}
return(true);
}
function view() {
_visible = true;
Selection.setFocus(theNameInput);
}
}
Symbol 798 MovieClip [__Packages.CryptoClass] Frame 0
class CryptoClass
{
var cipher, key;
function CryptoClass (theKey) {
cipher = " ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789|,.abcdefghijklmnopqrstuvwxyz_-!?=";
key = theKey;
}
function encrypt(string) {
var _local6 = new String();
var _local3;
var _local2;
var _local4 = 0;
_local3 = 0;
while (_local3 < string.length) {
_local2 = cipher.indexOf(string.charAt(_local3)) + cipher.indexOf(key.charAt(_local4));
while (_local2 >= cipher.length) {
_local2 = _local2 - cipher.length;
}
_local6 = _local6 + cipher.charAt(_local2);
_local4++;
if (_local4 >= key.length) {
_local4 = 0;
}
_local3++;
}
trace(string);
trace(_local6);
return(_local6);
}
function decrypt(string) {
var _local6 = new String();
var _local3;
var _local2;
var _local4 = 0;
_local3 = 0;
while (_local3 < string.length) {
_local2 = cipher.indexOf(string.charAt(_local3)) - cipher.indexOf(key.charAt(_local4));
while (_local2 < 0) {
_local2 = _local2 + cipher.length;
}
_local6 = _local6 + cipher.charAt(_local2);
_local4++;
if (_local4 >= key.length) {
_local4 = 0;
}
_local3++;
}
trace(string);
trace(_local6);
return(_local6);
}
}
Symbol 59 MovieClip Frame 20
gotoAndPlay (2);
Symbol 225 MovieClip Frame 1
gotoAndStop ("blank");
Symbol 300 MovieClip [highScoresSymbol] Frame 1
#initclip 11
Object.registerClass("highScoresSymbol", HighScores2);
#endinitclip
stop();
blocker.useHandCursor = false;
Symbol 308 MovieClip [marker] Frame 1
function SetNum(numString) {
numTop.text = numString;
numBot.text = numString;
}
Symbol 323 MovieClip Frame 1
this._visible = false;
Symbol 333 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 11
giftBurst.init("particle1", 20, 25, 2, -4);
giftBurst.setSpeedRandomness(12, 6);
giftBurst.setScaling(0.95);
giftBurst.setRotation(0.5);
giftBurst.setLifeRandomness(0.8);
giftBurst.setRotationRandomness(1.5);
giftBurst.setGravity(0.4);
giftBurst.setOrientToPath(true);
giftBurst.setAlpha(true);
giftBurst.setAlphaEasing(0.9);
giftBurst.burst();
Symbol 333 MovieClip Frame 20
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 11
puddingBurst.init("particle2", 20, 25, 2, -4);
puddingBurst.setSpeedRandomness(12, 6);
puddingBurst.setScaling(0.92);
puddingBurst.setLifeRandomness(0.9);
puddingBurst.setGravity(0.4);
puddingBurst.setAlpha(true);
puddingBurst.setAlphaEasing(0.9);
puddingBurst.burst();
Symbol 338 MovieClip Frame 20
stop();
Symbol 353 MovieClip Frame 1
stop();
SFXGun = new Sound(this);
SFXGun.attachSound("Gun.wav");
SFXBuzzer = new Sound(this);
SFXBuzzer.attachSound("buzz.wav");
SFXEnd = new Sound(this);
SFXEnd.attachSound("solar_endsfx01.wav");
SFXSlide = new Sound(this);
SFXSlide.attachSound("slide.wav");
SFXLaunch = new Sound(this);
SFXLaunch.attachSound("launch.wav");
SFXLand = new Sound(this);
SFXLand.attachSound("land.wav");
Symbol 356 MovieClip Frame 1
this._x = Math.random() * 635;
this._y = Math.random() * 400;
this._xscale = (this._yscale = 10 + (Math.random() * 90));
var x = (-1 + (Math.random() * 2));
var y = (1 + (Math.random() * 2));
var a = (Math.random() * 0.1);
onEnterFrame = function () {
if (_parent.Paused != true) {
this._x = this._x + (Math.sin(x) * 0.5);
x = x + a;
this._y = this._y + y;
}
if (this._y > 370) {
this._y = 0;
this._x = Math.random() * 635;
x = -1 + (Math.random() * 2);
}
};
Symbol 429 MovieClip Frame 23
gotoAndPlay ("skiidle");
Symbol 487 MovieClip Frame 1
quitButton.onRelease = function () {
_parent.instructionsButt._visible = true;
_parent.highButt._visible = true;
_parent.friendButt._visible = true;
_parent.PlayButtonInst._visible = true;
_visible = false;
};
Symbol 505 MovieClip [SendToFriend] Frame 1
#initclip 13
Object.registerClass("SendToFriend", SendToAFriendForm);
#endinitclip
function replaceQuotesWithAt() {
var _local2;
_local2 = this.text.indexOf("\"");
if (_local2 > -1) {
this.text = (this.text.substr(0, _local2) + "@") + this.text.substr(_local2 + 1);
}
}
quitButton.onRelease = function () {
_parent.instructionsButt._visible = true;
_parent.highButt._visible = true;
_parent.friendButt._visible = true;
_parent.PlayButtonInst._visible = true;
gotoAndStop ("mail");
_visible = false;
};
blocker.useHandCursor = false;
blocker.onRelease = function () {
return(undefined);
};
var serviceURL = "http://d3400.u24.fishinabottle.com/send_to_friend_flash.php";
theNameInput.tabIndex = 1;
theNameInput1.tabIndex = 2;
theEmail1.tabIndex = 3;
theNameInput2.tabIndex = 4;
theEmail1.onChanged = replaceQuotesWithAt;
this.setupToSend();
Symbol 505 MovieClip [SendToFriend] Frame 5
trace("SENDING");
var waitCounter = 0;
onEnterFrame = function () {
waitCounter++;
if (waitCounter < 30) {
return(undefined);
}
if (canGo == true) {
gotoAndStop(gotoValue);
}
};
Symbol 505 MovieClip [SendToFriend] Frame 10
trace("SENT");
delete onEnterFrame;
_parent.trackObj.continueTracking("SF");
setUpSent();
Symbol 505 MovieClip [SendToFriend] Frame 15
trace("ERROR");
delete onEnterFrame;
setUpSent();
Symbol 522 MovieClip [SendToMe] Frame 1
#initclip 12
Object.registerClass("SendToMe", SendToMeForm);
#endinitclip
function replaceQuotesWithAt() {
var _local2;
_local2 = this.text.indexOf("\"");
if (_local2 > -1) {
this.text = (this.text.substr(0, _local2) + "@") + this.text.substr(_local2 + 1);
}
}
quitButton.onRelease = function () {
_parent.hasSignedUp = true;
_parent.instructionsButt._visible = true;
_parent.highButt._visible = true;
_parent.friendButt._visible = true;
_parent.PlayButtonInst._visible = true;
gotoAndStop ("mail");
_visible = false;
};
cancelButton.onRelease = quitButton.onRelease;
blocker.useHandCursor = false;
blocker.onRelease = function () {
return(undefined);
};
var serviceURL = "http://d3400.u24.fishinabottle.com/send_to_me.php";
theNameInput.tabIndex = 1;
theEmail.tabIndex = 2;
theEmail.onChanged = replaceQuotesWithAt;
this.setupToSend();
stop();
Symbol 522 MovieClip [SendToMe] Frame 5
trace("SENDING");
var waitCounter = 0;
onEnterFrame = function () {
waitCounter++;
if (waitCounter < 30) {
return(undefined);
}
if (canGo == true) {
gotoAndStop(gotoValue);
}
};
Symbol 522 MovieClip [SendToMe] Frame 10
trace("SENT");
delete onEnterFrame;
_parent.trackObj.continueTracking("DC");
_parent.hasSignedUp = true;
setUpSent();
Symbol 522 MovieClip [SendToMe] Frame 15
trace("ERROR");
delete onEnterFrame;
setUpSent();
Symbol 534 MovieClip Frame 1
function AddTile(symbol) {
var _local2 = map.length;
map[_local2] = this.attachMovie(symbol, "b" + _local2, _local2, {_x:dX, _y:0});
map[_local2]._visible = false;
dX = dX + map[_local2]._width;
return(map[_local2]);
}
function MoveTo(xPos) {
var _local2 = xPos * fX;
var _local1 = 0;
while (_local1 < map.length) {
c = map[_local1];
if (((c._x + c._width) >= _local2) && (c._x <= (_local2 + 635))) {
c._visible = true;
} else {
c._visible = false;
}
_local1++;
}
_x = (-_local2);
}
function MoveY(yPos) {
var _local1 = yPos;
_y = (-_local1);
}
function SetParallaxFactor(factor) {
fX = factor;
}
function GetClipAtIndex(index) {
return(map[index]);
}
map = new Array();
dX = 0;
fX = 1;
Symbol 536 MovieClip Frame 2
function CreateParticle(symbolStr) {
var _local1 = attachMovie(symbolStr, "p" + layer, layer++);
_local1._visible = false;
free.push(_local1);
}
function AddParticle(x, y, dx, dy, rotation, scale, life) {
var _local1 = free.pop();
if (_local1 != undefined) {
_local1._visible = true;
_local1._x = x;
_local1._y = y;
_local1._alpha = 100;
_local1._rotation = 0;
_local1._xscale = (_local1._yscale = 100);
_local1.dx = dx;
_local1.dy = dy;
_local1.life = life;
_local1.rot = rotation;
_local1.scale = scale;
_local1.alpha = 100 / life;
used.push(_local1);
}
}
stop();
var free = new Array();
var used = new Array();
var layer = 0;
onEnterFrame = function () {
for (var _local2 in used) {
var _local1 = used[_local2];
_local1.life--;
if (_local1.life > 0) {
_local1._x = _local1._x + _local1.dx;
_local1._y = _local1._y + _local1.dy;
_local1._rotation = _local1._rotation + _local1.rot;
_local1._xscale = _local1._xscale + _local1.scale;
_local1._yscale = _local1._yscale + _local1.scale;
_local1._alpha = _local1._alpha - _local1.alpha;
} else {
_local1._visible = false;
free.push(used[_local2]);
used.splice(_local2, 1);
}
}
};
Symbol 599 MovieClip Frame 1
if (foot != 1) {
_parent._parent.CallBack(3);
foot = 1;
}
Symbol 599 MovieClip Frame 2
if (foot != 1) {
_parent._parent.CallBack(3);
foot = 1;
}
Symbol 599 MovieClip Frame 3
if (foot != 1) {
_parent._parent.CallBack(3);
foot = 1;
}
Symbol 599 MovieClip Frame 4
if (foot != 1) {
_parent._parent.CallBack(3);
foot = 1;
}
Symbol 599 MovieClip Frame 7
if (foot != 0) {
_parent._parent.CallBack(3);
foot = 0;
}
Symbol 599 MovieClip Frame 8
if (foot != 0) {
_parent._parent.CallBack(3);
foot = 0;
}
Symbol 599 MovieClip Frame 9
if (foot != 0) {
_parent._parent.CallBack(3);
foot = 0;
}
Symbol 599 MovieClip Frame 10
if (foot != 0) {
_parent._parent.CallBack(3);
foot = 0;
}
Symbol 616 MovieClip Frame 16
gotoAndPlay ("slopeHat");
Symbol 639 MovieClip Frame 12
_parent.gotoAndStop("Ski Flight");
Symbol 732 MovieClip Frame 45
gotoAndPlay ("hatLand");
Symbol 733 MovieClip Frame 1
function SetAnimation(animID) {
lastAnim = currAnim;
currAnim = animID;
switch (currAnim) {
case ANIM_SANTA_INIT :
gotoAndStop ("Initialize");
break;
case ANIM_SANTA_IDLE :
gotoAndStop ("Idle");
break;
case ANIM_SANTA_RUNNING :
gotoAndStop ("Running");
break;
case ANIM_SANTA_LJLAUNCH :
gotoAndStop ("LJ Launch");
break;
case ANIM_SANTA_LJFLIGHT :
gotoAndStop ("LJ Flight");
break;
case ANIM_SANTA_LJLAND :
gotoAndStop ("LJ Land");
break;
case ANIM_SANTA_HURDLESJUMP :
gotoAndStop ("Hurdles Jump");
break;
case ANIM_SANTA_HURDLESFALL :
gotoAndStop ("Hurdles Fall");
break;
case ANIM_SANTA_SKIIDLE :
gotoAndStop ("Ski Idle");
break;
case ANIM_SANTA_SKISLOPE :
gotoAndStop ("Ski Slope");
break;
case ANIM_SANTA_SKIJUMP :
gotoAndStop ("Ski Jump");
break;
case ANIM_SANTA_SKIFLIGHT :
gotoAndStop ("Ski Flight");
break;
case ANIM_SANTA_SKILAND :
gotoAndStop ("Ski Land");
}
currFrame = 0;
rate = 1;
}
function Play() {
paused = false;
}
function Stop() {
paused = true;
}
function IsPlaying() {
return(!paused);
}
function SetRate(animRate) {
rate = animRate;
}
function IsLooped() {
return(loop);
}
function SetLooped(flag) {
loop = flag;
}
stop();
ANIM_SANTA_INIT = 0;
ANIM_SANTA_IDLE = 1;
ANIM_SANTA_RUNNING = 2;
ANIM_SANTA_LJLAUNCH = 3;
ANIM_SANTA_LJFLIGHT = 4;
ANIM_SANTA_LJLAND = 5;
ANIM_SANTA_HURDLESJUMP = 6;
ANIM_SANTA_HURDLESFALL = 7;
ANIM_SANTA_SKIIDLE = 8;
ANIM_SANTA_SKISLOPE = 9;
ANIM_SANTA_SKIJUMP = 10;
ANIM_SANTA_SKIFLIGHT = 11;
ANIM_SANTA_SKILAND = 12;
currAnim = ANIM_SANTA_INIT;
lastAnim = ANIM_SANTA_INIT;
paused = true;
loop = true;
rate = 1;
currFrame = 0;
onEnterFrame = function () {
if (!paused) {
PlayerInst.gotoAndStop(Math.round(currFrame + 1));
currFrame = currFrame + rate;
if (currFrame > (PlayerInst._totalframes - 1)) {
if (loop) {
currFrame = currFrame - PlayerInst._totalframes;
} else {
currFrame = PlayerInst._totalframes;
PlayerInst.gotoAndStop(PlayerInst._totalframes);
}
}
}
};
Symbol 737 MovieClip Frame 1
DistanceSignpostInst._rotation = (Math.random() * 12) - 6;
Symbol 739 MovieClip Frame 1
this._x = Math.random() * Stage.width;
this._y = Stage.height;
this._xscale = (this._yscale = 10 + (Math.random() * 90));
var x = (-1 + (Math.random() * 2));
var y = (1 + (Math.random() * 2));
var a = (Math.random() * 0.1);
onEnterFrame = function () {
if (_parent.Paused != true) {
this._x = this._x + (Math.sin(x) - (_parent.xSpeed * 0.5));
x = x + a;
this._y = this._y + (y - (_parent.ySpeed * 0.5));
this._x = this._x - 0;
}
if ((this._y < 0) || (this._y > Stage.height)) {
this._y = Stage.height;
}
if (this._x < 0) {
this._x = Stage.width;
}
};
Symbol 740 MovieClip Frame 1
this._x = Math.random() * Stage.width;
this._y = Math.random() * Stage.height;
this._xscale = (this._yscale = 10 + (Math.random() * 90));
var x = (-1 + (Math.random() * 2));
var y = (1 + (Math.random() * 2));
var a = (Math.random() * 0.1);
onEnterFrame = function () {
if (_parent.Paused != true) {
this._x = this._x + (Math.sin(x) - (_parent.xSpeed * 0.5));
x = x + a;
this._y = this._y + (y - (_parent.ySpeed * 0.5));
this._x = this._x - 0;
}
if (this._y > Stage.height) {
this._y = 0;
}
if (this._x < 0) {
this._x = Stage.width;
}
};
Symbol 745 MovieClip Frame 25
_parent.StartEvent();
Symbol 745 MovieClip Frame 39
stop();
Symbol 747 MovieClip Frame 1
function Start() {
controllerOn = true;
}
function Stop() {
controllerOn = false;
}
function getDrag() {
var _local1 = Math.abs(angle) / ANGLE_LIMIT;
return(_local1);
}
function getAngle() {
return(angle);
}
ANGLE_LIMIT = 45;
var accelerate = 0.01;
var deccelerate = 0.05;
var angle = 0;
var turnSpeed = Math.random();
if (turnSpeed < 0.5) {
turnSpeed = -0.01;
} else {
turnSpeed = 0.01;
}
controllerOn = false;
onEnterFrame = function () {
if (controllerOn == true) {
if (Key.isDown(37) || (Key.isDown(39))) {
if (Key.isDown(37)) {
if (angle > (-ANGLE_LIMIT)) {
turnSpeed = turnSpeed - accelerate;
}
}
if (Key.isDown(39)) {
if (angle < ANGLE_LIMIT) {
turnSpeed = turnSpeed + accelerate;
}
}
} else {
if ((turnSpeed < 0) && ((angle > (ANGLE_LIMIT * 0.75)) || (angle < ((-ANGLE_LIMIT) * 0.75)))) {
turnSpeed = turnSpeed + deccelerate;
}
if ((turnSpeed > 0) && ((angle > (ANGLE_LIMIT * 0.75)) || (angle < ((-ANGLE_LIMIT) * 0.75)))) {
turnSpeed = turnSpeed - deccelerate;
}
if ((angle < (ANGLE_LIMIT * 0.5)) && (angle > ((-ANGLE_LIMIT) * 0.5))) {
if (turnSpeed > 0) {
turnSpeed = turnSpeed + accelerate;
}
if (turnSpeed <= 0) {
turnSpeed = turnSpeed - accelerate;
}
}
}
if (angle < (-ANGLE_LIMIT)) {
angle = -ANGLE_LIMIT;
turnSpeed = 0;
}
if (angle > ANGLE_LIMIT) {
angle = ANGLE_LIMIT;
turnSpeed = 0;
}
if (accelerate < 0.25) {
accelerate = accelerate + 0.01;
}
deccelerate = accelerate * 0.5;
angle = angle + turnSpeed;
testPlayerInst._rotation = angle;
}
};
Symbol 758 MovieClip Frame 1
function Start() {
windBarOn = true;
}
function Stop() {
windBarOn = false;
}
function getWindPower() {
var _local1 = (100 - scalerInst._xscale) / 100;
return(_local1);
}
REDUCE = 0.8;
INCREASE = 1.6;
var increment = -5;
windBarOn = false;
scalerInst._xscale = 100;
onEnterFrame = function () {
if (windBarOn) {
if (increment < 0) {
increment = increment * INCREASE;
}
if (increment > 0) {
increment = increment * REDUCE;
}
scalerInst._xscale = scalerInst._xscale + increment;
if (scalerInst._xscale <= 0) {
scalerInst._xscale = 0;
increment = increment * -1;
}
if (scalerInst._xscale >= 100) {
scalerInst._xscale = 100;
increment = -1;
}
}
};
Symbol 765 MovieClip Frame 1
function setFps(newFps) {
fps = newFps;
}
function start() {
isRunning = true;
}
function stop() {
isRunning = false;
}
function reset() {
ticks = 0;
Value = "00:00.00";
}
function getTime() {
return(Math.round((ticks / fps) * 100));
}
isRunning = false;
ticks = 0;
fps = 18;
onEnterFrame = function () {
if (isRunning) {
ticks++;
var _local1 = ticks;
var _local2 = Math.floor(_local1 / (fps * 60));
if (_local2 < 10) {
_local2 = "0" + _local2;
}
_local1 = _local1 - (_local2 * (fps * 60));
var _local3 = Math.floor(_local1 / fps);
if (_local3 < 10) {
_local3 = "0" + _local3;
}
_local1 = _local1 - (_local3 * fps);
var _local4 = Math.floor((_local1 / fps) * 100);
if (_local4 < 10) {
_local4 = "0" + _local4;
}
Value = (((_local2 + ":") + _local3) + ".") + _local4;
}
};
Symbol 772 MovieClip Frame 1
function stripCommas(str) {
var _local2 = str.indexOf(",");
while (_local2 != -1) {
trace(str);
str = str.substr(0, _local2) + str.substr(_local2 + 1);
_local2 = str.indexOf(",");
trace(str);
}
trace("RETURNING " + str);
return(str);
}
function submit_to_aol() {
delete onEnterFrame;
var _local5 = Array("MONKEYIESLIKEBEANS", "LIVEATMARCHAPPOLLO", "S243SDF", "BAKEDMY473", "148795", "FISHINABOTTLE", "ILIKE34BEANS2");
var _local3 = Math.round(Math.random() * _local5.length);
if (_local3 > _local5.length) {
_local3 = 0;
}
if (KeyNo < 0) {
_local3 = 0;
}
var _local4 = new CryptoClass(_local5[_local3]);
var _local6 = (((("score|" + stripCommas(theScoreBox.text)) + ",name|") + nameInput.text) + ",special|") + _local4.key;
sendQuery = (((_parent.linkToAddress + "?I=") + _local3) + "&query=") + _local4.encrypt(_local6);
trace("DECRYPT " + _local4.decrypt(_local4.encrypt(_local6)));
if (_global.isMute()) {
sendQuery = sendQuery + "&autoMute";
}
_parent.trackObj.continueTracking("CT");
getURL (sendQuery, "_blank");
submitButton.onRelease = null;
_parent.afterHighScore();
}
function submit(score) {
var self = this;
submitButton.onRelease = submit_to_aol;
var _local3 = new Object();
_local3.onKeyDown = function () {
if (Key.isDown(13)) {
self.submitButton.onRelease();
}
};
rankingText.text = "You got a high score.";
_parent.hiScoresInst.submit(score, null, null);
hiScoresInst._visible = false;
onEnterFrame = function () {
if (_parent.hiScoresInst.rankingText.text == "") {
return(undefined);
}
if (_parent.hiScoresInst.rankingText.text.length < 1) {
return(undefined);
}
if (_parent.hiScoresInst.rankingText.text == undefined) {
return(undefined);
}
if (_parent.hiScoresInst.rankingText.text == "undefined") {
return(undefined);
}
rankingText.text = _parent.hiScoresInst.rankingText.text;
delete onEnterFrame;
};
theScoreBox.text = _parent.hiScoresInst.theScoreBox.text;
_parent.hiScoresInst._visible = false;
_visible = true;
Selection.setFocus(nameInput);
Key.addListener(_local3);
}
var sendQuery;
var score;
_visible = false;
skipitButton.onRelease = function () {
delete onEnterFrame;
_parent.afterHighScore();
};
stop();
Symbol 786 MovieClip Frame 1
function TimeToString(t) {
var _local2;
var _local1;
var _local3;
var _local5 = "";
_local2 = Math.floor(t / (fps * 60));
if (_local2 < 10) {
_local2 = "0" + _local2;
}
t = t - (_local2 * (fps * 60));
_local1 = Math.floor(t / fps);
if (_local1 < 10) {
_local1 = "0" + _local1;
}
t = t - (_local1 * fps);
_local3 = Math.floor((t / fps) * 100);
if (_local3 < 10) {
_local3 = "0" + _local3;
}
_local5 = (((_local2 + ":") + _local1) + ".") + _local3;
return(_local5);
}
function DistanceToString(dist, lead, trail) {
var _local4 = "";
var _local2 = 10;
var _local3 = Math.floor(dist);
var _local1;
_local1 = 0;
while (_local1 < (lead - 1)) {
if (_local3 < _local2) {
_local4 = _local4 + "0";
}
_local2 = _local2 * 10;
_local1++;
}
_local4 = _local4 + (_local3 + ".");
_local3 = dist - Math.floor(dist);
_local3 = Math.floor(_local3 * Math.pow(10, trail));
_local2 = 10;
_local1 = 0;
while (_local1 < (lead - 1)) {
if (_local3 < _local2) {
_local4 = _local4 + "0";
}
_local2 = _local2 * 10;
_local1++;
}
_local4 = _local4 + String(_local3);
return(_local4);
}
function ShowResult(resultVal) {
var _local2 = 0;
var _local3 = "";
var _local5 = 0;
trace("SHOW RESULT");
Line1A.text = "IDS_YOURDISTANCE";
Line1B.text = "IDS_YOURDISTANCE";
_local2 = resultVal;
_local3 = DistanceToString(resultVal, 2, 2);
_local2 = resultVal * 100;
eventScore = _local2;
Line2A.text = "IDS_YOUSCORED";
Line2B.text = "IDS_YOUSCORED";
_parent.StrTable.populate();
Line2A.text = Line2A.text + (" " + _local2);
Line2B.text = Line2B.text + (" " + _local2);
Line1A.text = Line1A.text + (" " + _local3);
Line1B.text = Line1B.text + (" " + _local3);
return(_local2);
}
EVENT_LONGJUMP = 0;
EVENT_SPRINT = 1;
EVENT_HANGGLIDING = 2;
EVENT_HURDLES = 3;
EVENT_SKATING = 4;
EVENT_ROWING = 5;
EVENT_SWIMMING = 6;
EVENT_SKIJUMP = 7;
PLANET_MERCURY = EVENT_LONGJUMP;
PLANET_VENUS = EVENT_SPRINT;
PLANET_MARS = EVENT_HANGGLIDING;
PLANET_JUPITER = EVENT_HURDLES;
PLANET_SATURN = EVENT_SKATING;
PLANET_URANUS = EVENT_ROWING;
PLANET_NEPTUNE = EVENT_SWIMMING;
PLANET_PLUTO = EVENT_SKIJUMP;
_visible = false;
var eventScore = 0;
var fps = 18;
OKButtonInst.onRelease = function () {
_parent.ResultsCallBack(eventScore);
_visible = false;
};
Symbol 791 MovieClip Frame 1
_visible = false;