Frame 1
vars.txt_title = "Rapid Retreat";
vars.txt_game_over = "Game Over";
vars.txt_subtitle = "Escape from the Wolves";
vars.txt_instructions = "Instructions";
vars.txt_instructions_copy = "Race down-river to escape the White Witch's Wolves. Use your up and down arrow keys to steer. Be carefull not to smash into the floating chunks of ice! See how far down the river you can get.";
vars.txt_play = "Play";
vars.txt_play_again = "Play Again?";
vars.txt_help = "Help";
vars.txt_on_dvd = "On DVD";
vars.txt_date = "3rd April";
vars.txt_pre_order = "Out now on DVD!";
vars.txt_copyright = "\u00A9 Disney/Walden 2006. All rights reserved";
vars.txt_narnia_link = "Visit: www.narnia.co.uk";
vars.txt_url = "http://www.narnia.co.uk";
vars.txt_danger = "Danger!";
vars.txt_move = "Move";
vars.txt_distance = "Distance:";
vars.txt_best = "Personal best:";
function music_soft() {
if (_root.soundon == "yes") {
musicSoft = new Sound();
musicSoft.attachSound("music_soft");
musicSoft.setVolume(100);
musicSoft.start(0, 1000);
}
}
function music_game() {
if (_root.soundon == "yes") {
musicSoft = new Sound();
musicSoft.attachSound("music_game");
musicSoft.setVolume(100);
musicSoft.start(0, 1000);
}
}
function music_soft_stop() {
musicSoft.stop("music_soft");
}
function music_game_stop() {
musicSoft.stop("music_game");
}
soundon = "yes";
_root._quality = "best";
Instance of Symbol 10 MovieClip in Frame 1
onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
total = _parent.getBytesTotal();
sofar = _parent.getBytesLoaded();
percent = Math.floor((sofar / total) * 100);
percentdisplay = percent add "%";
if (percent < _currentframe) {
stop();
} else {
play();
}
trace(percent);
trace(percentdisplay);
if (percent > 99) {
gotoAndPlay(_currentframe + 5);
}
if (_currentframe > 101) {
_root.play();
}
}
Frame 2
music_soft();
Frame 35
function setCookie(c, n, v) {
var _local1 = SharedObject.getLocal(c);
_local1.data[n] = v;
_local1.flush();
}
function getCookie(c, n) {
var _local1 = SharedObject.getLocal(c);
return(_local1.data[n]);
}
stop();
highScore = getCookie("disney_narnia_icegame", "highscore");
if (highScore == null) {
highScore = 0;
}
Frame 43
stop();
Frame 44
music_soft_stop();
music_game();
stop();
Frame 57
stop();
Frame 58
music_game_stop();
music_soft();
endFeedbackTotal = 5;
endFeedbackScores = [100, 250, 500, 750, 99999];
endFeedback1 = "xxx metres? The wolves can almost smell you from there!";
endFeedback2 = "Not bad, but a wolf can run xxx metres in a few seconds!";
endFeedback3 = "Good work! xxx metres has given you a good head start!";
endFeedback4 = "Excellent! It'll take the wolves ages to cover xxx metres!";
endFeedback5 = "Awesome! The wolves wont even try to get you after xxx metres!";
var i = 0;
while (score > endFeedbackScores[i]) {
i++;
}
feedbackTxt = eval ("endFeedback" + (i + 1));
var xxxPos = feedbackTxt.indexOf("xxx");
feedbackTxt = ((feedbackTxt.substring(0, xxxPos) + score) + " ") + feedbackTxt.substring(xxxPos + 4, feedbackTxt.length);
buttons_display.play();
Frame 68
stop();
Symbol 19 Button
on (release) {
getURL (_root.vars.txt_url, "_blank");
}
Symbol 24 MovieClip Frame 2
stop();
Symbol 47 MovieClip Frame 1
title_clip.title_text = _root.vars.txt_title;
Symbol 58 Button
on (release) {
_parent.gotoAndPlay("video");
}
Symbol 63 Button
on (release) {
_parent.gotoAndPlay("instructions");
}
Symbol 64 MovieClip Frame 25
stop();
Symbol 77 MovieClip Frame 1
function checkMe() {
var _local1 = _parent;
if (state) {
x = x + (xStep * _local1._parent.paralaxRatio);
y = y + (yStep * _local1._parent.paralaxRatio);
if (y <= _local1.genMinY) {
yStep = -yStep;
}
if (y >= _local1.genMaxY) {
yStep = -yStep;
}
_x = x;
_y = y;
_yscale = (60 + ((y - _local1.genMinY) / 4));
_xscale = (60 + ((y - _local1.genMinY) / 4));
if (x < -100) {
this.removeMovieClip();
}
}
}
stop();
this.onEnterFrame = checkMe;
Symbol 79 Button
on (release) {
_root.gotoAndStop("video");
}
Symbol 80 Button
on (release) {
_parent.gotoAndStop("video");
}
Symbol 81 MovieClip Frame 27
stop();
Symbol 86 MovieClip Frame 104
_parent.play();
Symbol 98 MovieClip Frame 1
this.onEnterFrame = function () {
var _local1 = this;
if (myState) {
myX = myX + (myXstep * _parent._parent.paralaxRatio);
_local1._x = myX;
_local1._y = myY;
if (myX <= -20) {
_local1.removeMovieClip();
}
}
};
Symbol 99 MovieClip Frame 1
function dupeBubble(x, y) {
bubbleTotal++;
bubbleDupe.duplicateMovieClip("bubble" + bubbleTotal, bubbleTotal + 10);
tmpMC = this["bubble" + bubbleTotal];
tmpMC.myX = x;
tmpMC.myY = (y - 8) + (Math.random() * 16);
tmpMC.myXstep = -4 - (Math.random() * 2);
tmpMC._xscale = (tmpMC._yscale = 60 + (Math.random() * 40));
tmpMC.myState = 1;
}
bubbleTotal = 0;
stop();
Symbol 100 MovieClip Frame 1
function resetBergGen() {
this.onEnterFrame = checkBergGen;
genCounter = 0;
minGenDelay = 10;
maxGenDelay = 30;
genDelay = maxGenDelay;
bergTotal = 0;
genMaxX = 640;
genMinY = 120;
genMaxY = 280;
}
function checkBergGen() {
genCounter++;
if (genCounter > Math.round(genDelay)) {
genDelay = genDelay - 0.5;
if (genDelay < minGenDelay) {
genDelay = minGenDelay;
}
genCounter = 0;
bergTotal++;
bergDupe.duplicateMovieClip("berg" + bergTotal, bergTotal + 10);
var _local1 = this["berg" + bergTotal];
_local1.x = genMaxX;
_local1.y = genMinY + (Math.random() * (genMaxY - genMinY));
_local1.xStep = -10 - ((_local1.y - genMinY) / 20);
_local1.yStep = Math.random() * 2;
if (Math.random() < 0.5) {
_local1.yStep = -_local1.yStep;
}
_local1.state = 1;
_local1._xscale = (_local1._yscale = 60 + ((_local1.y - genMinY) / 4));
}
}
stop();
resetBergGen();
Symbol 111 MovieClip Frame 1
stop();
trace(_x);
Symbol 111 MovieClip Frame 58
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 1
function resetGame() {
refMcY = this._y;
_parent.score = 0;
resetPlayer();
bergStage.resetBergGen();
}
function endGame() {
var _local1 = _parent;
if (_local1.score > _local1.highScore) {
_local1.highScore = _local1.score;
_local1.setCookie("disney_narnia_icegame", "highscore", _local1.highScore);
}
_local1.gotoAndPlay("endScene");
}
function resetPlayer() {
playerX = -50;
playerY = 190;
bufferPlayerY = playerY;
playerStartX = 160;
playerStartY = playerY;
playerMinY = 128;
playerMaxY = 264;
playerYarray = new Array();
keyBuffermax = 10;
i = 0;
while (i < keyBuffermax) {
playerYarray.push(playerY);
i++;
}
playerState = 1;
playerMC.onEnterFrame = playerChecks;
}
function playerChecks() {
movePlayer();
checkHit();
}
function movePlayer() {
if (playerState == 1) {
if (Math.ceil(playerX) < playerStartX) {
playerX = playerX + Math.ceil((playerStartX - playerX) / 10);
}
if (playerY >= playerMinY) {
playerY = playerY - (Key.isDown(38) * 8);
}
if (playerY <= playerMaxY) {
playerY = playerY + (Key.isDown(40) * 8);
}
playerYarray.push(playerY);
playerYarray.splice(0, 1);
bufferPlayerY = 0;
i = 0;
while (i < keyBuffermax) {
bufferPlayerY = bufferPlayerY + playerYarray[i];
i++;
}
bufferPlayerY = Math.round(bufferPlayerY / keyBuffermax);
_parent.score++;
} else if (playerState == 3) {
bufferPlayerY = bufferPlayerY - Math.round((bufferPlayerY - playerMinY) / 10);
playerMC._y = bufferPlayerY;
paralaxRatio = paralaxRatio - 0.015;
if (paralaxRatio <= 0) {
paralaxRatio = 0;
endGame();
}
}
playerMC._xscale = (playerMC._yscale = 60 + ((bufferPlayerY - playerMinY) / 4));
playerMC._x = playerX;
playerMC._y = bufferPlayerY;
bubbleStage.dupeBubble(playerX - 50, bufferPlayerY);
}
function checkHit() {
if ((bergStage.hitTest(playerX + (playerMC.berg._width / 2), bufferPlayerY + refMcY, true) || (bergStage.hitTest(playerX, (bufferPlayerY - (playerMC.berg._height / 2)) + refMcY, true))) || (bergStage.hitTest(playerX, (bufferPlayerY + (playerMC.berg._height / 2)) + refMcY, true))) {
playerHit();
}
}
function playerHit() {
playerMC.berg.play();
playerState = 3;
}
function initParalax(mc, spd) {
var _local1 = mc;
var _local3 = this;
paralaxRatio = 1;
_local1.onEnterFrame = scrollParalax(_local3);
(_local1.x = _local1._x);
(_local1.xMin = 0);
_local1.xMax = 600;
_local1.xWidth = _local1._width;
_local1.speed = spd;
var _local2 = Number(_local1._name.substring(4));
if ((_local2 / 2) != Math.round(_local2 / 2)) {
_local1.pairMC = _local3["scen" + (_local2 + 1)];
} else {
_local1.pairMC = _local3["scen" + (_local2 - 1)];
}
}
function scrollParalax(mc, rndGen) {
var _local1 = mc;
if (paralaxState) {
_local1.x = _local1.x + (_local1.speed * paralaxRatio);
if (_local1.x < (_local1.xMin - (_local1.xWidth / 2))) {
if (!rndGen) {
_local1.x = (_local1.pairMC.x + _local1.xWidth) + _local1.speed;
} else {
_local1.x = _local1.xMax + (Math.random() * 1000);
}
}
_local1._x = _local1.x;
}
}
function startParalax() {
paralaxState = 1;
}
function stopParalax() {
paralaxState = 0;
}
stop();
resetGame();
startParalax();
Instance of Symbol 90 MovieClip "scen5" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -12);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 90 MovieClip "scen6" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -12);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 90 MovieClip "scen7" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -14);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 90 MovieClip "scen8" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -14);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 90 MovieClip "scen9" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -16);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 90 MovieClip "scen10" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -16);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 93 MovieClip "scen3" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -10);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 93 MovieClip "scen4" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -10);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 96 MovieClip "scen1" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -6);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 96 MovieClip "scen2" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -6);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 120 MovieClip "scen11" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -18);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 120 MovieClip "scen12" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -18);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 123 MovieClip "scen13" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -20);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 123 MovieClip "scen14" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -20);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this);
}
Instance of Symbol 126 MovieClip "scen15" in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
_parent.initParalax(this, -30);
}
onClipEvent (enterFrame) {
_parent.scrollParalax(this, 1);
}
Symbol 128 Button
on (release) {
_root.gotoAndPlay("replay");
}
Symbol 139 MovieClip Frame 1
title_clip.title_text = _root.vars.txt_game_over;
Symbol 144 Button
on (release) {
gotoAndPlay ("video");
}
Symbol 145 Button
on (release) {
gotoAndPlay ("instructions");
}