Frame 2
Frame 10
stop();
StringTable = function (xmlFile) {
this.table = new Array();
this.loadData(xmlFile);
};
StringTable.prototype.loadData = function (source) {
var _local3 = this;
_local3.xmlFile = new XML();
_local3.xmlFile.load(source);
_local3.xmlFile.ignoreWhite = true;
_local3.xmlFile.notify = _local3;
_local3.xmlFile.onLoad = function () {
var stringID = "";
var _local3 = "";
var _local2 = this.firstChild.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
if (!(_local2[_local1].nodeName === "string")) {
} else {
stringID = _local2[_local1].attributes.id;
_local3 = _local2[_local1].firstChild.nodeValue;
this.notify.table[stringID] = _local3;
}
_local1++;
}
this.notify.loaded = true;
if (this.notify.onLoad != null) {
this.notify.onLoad();
}
delete this;
};
};
StringTable.prototype.get = function (stringID) {
return(this.table[stringID]);
};
StringTable.prototype.populate = function () {
this.populateFieldsIn(_root);
};
StringTable.prototype.populateFieldsIn = function (target) {
var _local1 = target;
var _local3 = this;
for (obj in _local1) {
if (_local1[obj] instanceof TextField) {
if (_local1[obj].text.substr(0, 4) == "IDS_") {
var _local2 = _local3.get(_local1[obj].text);
if (_local2 != null) {
_local1[obj].text = _local2;
}
}
} else if (_local1[obj] instanceof MovieClip) {
_local3.populateFieldsIn(_local1[obj]);
} else if (_local1[obj] instanceof Button) {
_local3.populateFieldsIn(_local1[obj]);
}
}
};
StringTable.prototype.getBytesLoaded = function () {
return(this.xmlFile.getBytesLoaded());
};
StringTable.prototype.getBytesTotal = function () {
return(this.xmlFile.getBytesTotal());
};
StringTable.prototype.getPercentLoaded = function () {
var _local1 = this;
if (_local1.xmlFile.getBytesTotal() <= 0) {
return(0);
}
var _local2 = Math.round((_local1.xmlFile.getBytesTotal() / _local1.xmlFile.getBytesTotal()) * 100);
return(_local2);
};
StringTable.prototype.dump = function () {
var _local1 = this;
trace("===============================");
trace(" ");
trace("Dumping the String Table:");
trace(" ");
trace("String ID Value");
trace("--------- -----");
for (var _local2 in _local1.table) {
trace((_local2 + " ") + _local1.table[_local2]);
}
trace(" ");
trace("String Table dump done.");
trace("===============================");
trace(" ");
};
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_quality = "HIGH";
_global.masterVolume = new Sound();
restoreVolume = _global.masterVolume.getVolume();
StrTable = new StringTable("winterworkout_strings.xml");
onEnterFrame = function () {
var _local2 = (getBytesLoaded() + StrTable.getBytesLoaded()) / (getBytesTotal() + StrTable.getBytesTotal());
var _local1 = int(_local2 * 100);
if (isNaN(_local1)) {
_local1 = 0;
}
LoadingBarInst._xscale = _local1;
if (((getBytesTotal() > 0) && (getBytesLoaded() >= getBytesTotal())) && (StrTable.loaded)) {
delete onEnterFrame;
gotoAndPlay ("Initialisation");
}
};
Frame 29
function ParseNewLines(sourceString) {
var _local2 = sourceString;
var _local3 = "";
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2.charAt(_local1) != "\\") {
_local3 = _local3 + _local2.charAt(_local1);
} else if (_local2.charAt(_local1 + 1) == "n") {
_local3 = _local3 + newline;
_local1++;
}
_local1++;
}
return(_local3);
}
function cGlobalState() {
var _local1 = this;
_local1.score = 0;
_local1.practiceMode = null;
_local1.currentEvent = null;
_local1.score = 0;
}
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;
swfLocation = "../events/";
globalState = new cGlobalState();
cGlobalState.prototype.Reset = function () {
delete globalState;
globalState = new cGlobalState();
};
gotoAndPlay ("Title");
Frame 39
function TriggerShaker() {
ShakerInst.Impulse();
BurstInst._x = _xmouse;
BurstInst._y = _ymouse;
BurstInst.Burst();
}
function EnableButtons(state) {
var _local1 = state;
InstructionsButtonInst.enabled = _local1;
PracticeButtonInst.enabled = _local1;
TheSolarGamesButtonInst.enabled = _local1;
HiscoresButtonInst.enabled = _local1;
}
function mute(enable) {
if (enable) {
_global.masterVolume.setVolume(0);
} else {
_global.masterVolume.setVolume(restoreVolume);
}
}
stop();
EVENT_SPRINT = 0;
EVENT_LONGJUMP = 1;
EVENT_HURDLES = 2;
EVENT_SKIJUMP = 3;
InstructionsInst._visible = false;
SoundInst.SFXTitleTune.stop();
SoundInst.SFXTitleTune.setVolume(0);
SoundInst.SFXTitleTune.start(0, 9999);
InstructionsButtonInst.onRelease = function () {
InstructionsInst._visible = true;
SoundInst.SFXUIClick.start();
TriggerShaker();
EnableButtons(false);
};
InstructionsInst.OKButtonInst.onRelease = function () {
InstructionsInst._visible = false;
SoundInst.SFXUIClick.start();
TriggerShaker();
EnableButtons(true);
};
PracticeButtonInst.onRelease = function () {
globalState.practiceMode = true;
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Event Select");
};
TheSolarGamesButtonInst.onRelease = function () {
globalState.practiceMode = false;
globalState.currentEvent = EVENT_SPRINT;
globalState.score = 0;
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Event");
};
HiscoresButtonInst.onRelease = function () {
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("ViewScores");
};
onEnterFrame = function () {
if (SoundInst.SFXTitleTune.getVolume() < 80) {
SoundInst.SFXTitleTune.setVolume(SoundInst.SFXTitleTune.getVolume() + 2);
}
};
Frame 49
stop();
SelectLongJumpInst.onRelease = function () {
globalState.currentEvent = EVENT_LONGJUMP;
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Event");
};
SelectSprintInst.onRelease = function () {
globalState.currentEvent = EVENT_SPRINT;
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Event");
};
SelectHurdlesInst.onRelease = function () {
globalState.currentEvent = EVENT_HURDLES;
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Event");
};
SelectSkiJumpInst.onRelease = function () {
globalState.currentEvent = EVENT_SKIJUMP;
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Event");
};
QuitButtonInst.onRelease = function () {
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Title");
};
onEnterFrame = function () {
if (SoundInst.SFXTitleTune.getVolume() < 80) {
SoundInst.SFXTitleTune.setVolume(SoundInst.SFXTitleTune.getVolume() + 2);
}
};
Frame 59
function EndEvent(score) {
SoundInst.SFXGameLoop.stop();
TriggerShaker();
SoundInst.SFXUIClick.start();
SoundInst.SFXTitleTune.stop();
SoundInst.SFXTitleTune.setVolume(0);
SoundInst.SFXTitleTune.start(0, 9999);
EventHolderInst.unloadMovie();
if (score < 0) {
gotoAndPlay ("Title");
return(undefined);
}
if (globalState.practiceMode) {
gotoAndPlay ("Event Select");
return(undefined);
}
globalState.score = globalState.score + score;
if (globalState.currentEvent != EVENT_SKIJUMP) {
globalState.currentEvent++;
PlayEvent();
} else {
gotoAndPlay ("Results");
}
}
function PlayEvent() {
switch (globalState.currentEvent) {
case EVENT_LONGJUMP :
loadMovie (swfLocation + "longjump/longjump08.swf", EventHolderInst);
return;
case EVENT_SPRINT :
loadMovie (swfLocation + "sprint/sprint06.swf", EventHolderInst);
return;
case EVENT_HURDLES :
loadMovie (swfLocation + "hurdles/hurdles07.swf", EventHolderInst);
return;
case EVENT_SKIJUMP :
loadMovie (swfLocation + "skijump/skijump04.swf", EventHolderInst);
}
}
stop();
PlayEvent();
onEnterFrame = function () {
if (SoundInst.SFXTitleTune.getVolume() > 0) {
SoundInst.SFXTitleTune.setVolume(SoundInst.SFXTitleTune.getVolume() - 2);
}
};
Frame 69
stop();
CompletedAnimInst.gotoAndPlay(1);
SoundInst.SFXTitleTune.stop();
SoundInst.SFXTitleTune.setVolume(0);
SoundInst.SFXTitleTune.start(0, 9999);
onEnterFrame = function () {
if (SoundInst.SFXTitleTune.getVolume() < 80) {
SoundInst.SFXTitleTune.setVolume(SoundInst.SFXTitleTune.getVolume() + 2);
}
};
Frame 79
stop();
trace(_root.globalState.score);
OKButtonInst.onRelease = function () {
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Title");
};
Instance of Symbol 270 MovieClip "comHighscores" in Frame 79
//component parameters
onClipEvent (initialize) {
scoreLocation = "_root.globalState.score";
gamename = "winterworkout";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 90
stop();
QuitButtonInst.onRelease = function () {
SoundInst.SFXUIClick.start();
TriggerShaker();
gotoAndPlay ("Title");
};
Instance of Symbol 270 MovieClip "comHighscores" in Frame 90
//component parameters
onClipEvent (initialize) {
scoreLocation = "_root.globalState.score";
gamename = "winterworkout";
saveScore = false;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 9 MovieClip Frame 1
this._visible = false;
Symbol 15 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 20 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 20 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 20 MovieClip Frame 12
stop();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 100
stop();
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 36 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 37 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 37 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 53 MovieClip Frame 1
stop();
Symbol 53 MovieClip Frame 60
Symbol 53 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 54 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 9 MovieClip "mcIntro" in Symbol 54 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 54 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 32 MovieClip "mcLoadingAnimated" in Symbol 54 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 54 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 54 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 56 Button
on (release) {
_parent.mute(true);
gotoAndStop ("Sound Off");
}
Symbol 58 Button
on (release) {
_parent.mute(false);
gotoAndStop ("Sound On");
}
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 11
stop();
Symbol 68 MovieClip Frame 1
stop();
SFXTitleClip = createEmptyMovieClip("sfx1", 1);
SFXTitleTune = new Sound(SFXTitleClip);
SFXTitleTune.attachSound("solar_title.wav");
SFXAbmientClip = createEmptyMovieClip("sfx2", 2);
SFXAmbientTune = new Sound(SFXAbmientClip);
SFXAmbientTune.attachSound("solar_ambient.wav");
SFXGameLoop = new Sound();
SFXGameLoop.attachSound("ingameloop.wav");
SFXUIClick = new Sound();
SFXUIClick.attachSound("uiclick.wav");
Symbol 70 MovieClip Frame 1
stop();
Symbol 72 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 77 MovieClip Frame 1
function Impulse() {
shakeDY = 5;
shakeF = 1;
shakeState = true;
}
function Update() {
if (!shakeState) {
_root._y = 0;
return(undefined);
}
_root._y = shakeDY * shakeF;
shakeF = shakeF * -0.7;
if (Math.abs(shakeF) < 0.1) {
shakeState = false;
}
}
var shakeDY;
var shakeF;
var shakeState = false;
onEnterFrame = function () {
Update();
};
Symbol 79 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 80 MovieClip Frame 2
function Burst() {
var _local1 = 0;
while (_local1 < 16) {
SmokeInst.AddParticle(0, 0, (Math.random() * 30) - 15, (Math.random() * 30) - 15, Math.random() * 20, 0, 18);
_local1++;
}
}
stop();
ThingInst._visible = (Thing2Inst._visible = false);
var n = 0;
while (n < 16) {
if (Math.random() > 0.5) {
SmokeInst.CreateParticle("Thing");
} else {
SmokeInst.CreateParticle("Thing2");
}
n++;
}
Symbol 114 MovieClip Frame 13
gotoAndPlay ("run");
Symbol 127 MovieClip Frame 13
gotoAndPlay ("run");
Symbol 136 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 () {
var _local1 = this;
_local1._x = _local1._x + Math.sin(x);
x = x + a;
_local1._y = _local1._y + y;
_local1._x = _local1._x - 0;
if ((_local1._y > Stage.height) || (_local1._x < 0)) {
_local1._x = Math.random() * (Stage.width + 100);
_local1._xscale = (_local1._yscale = 50 + (Math.random() * 75));
_local1._y = 0;
}
};
Symbol 174 MovieClip Frame 1
_root.StrTable.populate();
TextObj1.text = _root.ParseNewLines(TextObj1.text);
TextObj2.text = _root.ParseNewLines(TextObj2.text);
Symbol 241 MovieClip Frame 1
stop();
_parent.StrTable.populate();
TextObj.text = _parent.ParseNewLines(TextObj.text);
Score1.text = ((Score1.text + " ") + _parent.globalState.score) + " points";
Score2.text = ((Score2.text + " ") + _parent.globalState.score) + " points";
MainMenuButtonInst.onRelease = function () {
var _local1 = _parent;
_local1.TriggerShaker();
_local1.SoundInst.SFXUIClick.start();
_local1.gotoAndPlay("Title");
};
SubmitScoreButtonInst.onRelease = function () {
var _local1 = _parent;
_local1.TriggerShaker();
_local1.SoundInst.SFXUIClick.start();
_local1.gotoAndPlay("Hiscores");
};
Symbol 244 MovieClip Frame 10
stop();
Symbol 250 MovieClip Frame 1
this._visible = false;
Symbol 268 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Symbol 270 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 250 MovieClip "mcHighscores" in Symbol 270 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 270 MovieClip Frame 2
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 270 MovieClip Frame 3
stop();