Combined Code
movieClip 6 rocks {
}
movieClip 10 {
}
movieClip 18 {
}
movieClip 20 kayaking fox {
frame 1 {
stop();
}
}
frame 1 {
stop();
/:spills = 5;
}
movieClip 29 {
}
movieClip 30 {
}
button 35 {
on (release) {
getURL('http://www.kidscom.com/games/games.html', '');
}
}
button 38 {
on (press) {
gotoAndPlay(2);
timeSinceLastRock = 0;
riverSpeed = 0;
}
}
button 40 {
on (press) {
gotoAndPlay(2);
timeSinceLastRock = 10;
riverSpeed = 50;
}
}
button 42 {
on (press) {
gotoAndPlay(2);
timeSinceLastRock = 20;
riverSpeed = 100;
}
}
button 49 {
on (release) {
getURL('http://www.kidscom.com/games/kc500/kc500.html', '');
}
}
frame 2 {
function initGame() {
firstRock = 1;
lastRock = 0;
/:points = 0;
totalRocks = 40;
attachMovie('kayaking fox', 'fox', 999999);
fox._x = 228;
fox._y = 118;
}
function moveFox() {
if (4 < fox._currentFrame) {
dx = 0;
} else {
if (Key.isDown(Key.RIGHT)) {
dx = riverSpeed;
fox.gotoAndStop('left');
} else {
if (Key.isDown(Key.LEFT)) {
dx = -riverSpeed;
fox.gotoAndStop('right');
} else {
dx = 0;
fox.gotoAndStop('still');
}
}
}
fox._x += dx;
if (fox._x < 130) {
fox._x = 130;
}
if (305 < fox._x) {
fox._x = 305;
}
if (riverSpeed < 20) {
riverSpeed += 0.5;
}
}
function newRock() {
if (5 < timeSinceLastRock) {
if (lastRock < totalRocks) {
if (Math.random() < 0.2) {
++lastRock;
attachMovie('rocks', 'rock' + lastRock, lastRock);
_root['rock' + lastRock]._x = Math.random() * 175 + 130;
_root['rock' + lastRock]._y = 450;
f = int(Math.Random() * _root['rock' + lastRock]._totalFrames) + 1;
_root['rock' + lastRock].gotoAndStop(f);
timeSinceLastRock = 0;
_root['rock' + i].hit = false;
}
}
}
++timeSinceLastRock;
}
function moveRocks() {
i = firstRock;
while (lastRock >= i) {
/:points = i;
x = _root['rock' + i]._x;
y = _root['rock' + i]._y - riverSpeed;
if (y < -50) {
removeRock(i);
} else {
if (_root['rock' + i].hit == false and Math.abs(y - fox._y) < 50 and Math.abs(x - fox._x) < 25) {
spills -= 1;
_root['rock' + i].hit = true;
fox.gotoAndPlay('spill');
if (/:spills == 0) {
removeAll();
gotoAndPlay(3);
}
}
}
_root['rock' + i]._y = y;
++i;
}
}
function removeRock(n) {
_root['rock' + n].removeMovieClip();
firstRock = n + 1;
if (n == totalRocks) {
removeAll();
gotoAndPlay(4);
}
}
function removeAll() {
i = firstRock;
while (lastRock >= i) {
_root['rock' + i].removeMovieClip();
++i;
}
fox.removeMovieClip();
}
stop();
}
movieClip 55 {
}
instance of movieClip 55 {
onClipEvent (load) {
_root.initGame();
}
onClipEvent (enterFrame) {
_root.moveFox();
_root.newRock();
_root.moveRocks();
}
onClipEvent (enterFrame) {
if (8 < /:spills) {
_root.flute_game.gotoAndStop(2);
}
}
}
movieClip 63 {
}
button 70 {
on (release) {
/:spills += 2;
}
}
movieClip 71 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
frame 3 {
stop();
}
button 76 {
on (release) {
stopAllSounds();
gotoAndPlay(1);
}
}
frame 4 {
stop();
}
button 77 {
on (release) {
stopAllSounds();
gotoAndPlay(1);
}
}