Frame 1
sponsor_btn.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.kvClick(467);
}
};
tinymania_btn.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.kvClick(468);
}
};
function resetGui() {
gui.p1r1.text = "1. - - : - -";
gui.p1r2.text = "2. - - : - -";
gui.p1r3.text = "3. - - : - -";
gui.p2r1.text = "1. - - : - -";
gui.p2r2.text = "2. - - : - -";
gui.p2r3.text = "3. - - : - -";
}
kv_v = {c:351, a:0, da:["distralytics.com", "distralytics.co.uk"]};
kv_v.i = 0;
while (kv_v.i < kv_v.da.length) {
System.security.allowDomain(kv_v.da[kv_v.i], (kv_v.c + ".c.") + kv_v.da[kv_v.i], "*." + kv_v.da[kv_v.i]);
kv_v.i++;
}
kv_v.lc = function () {
var _local1 = ((("http://" + kv_v.c) + ".c.") + kv_v.da[kv_v.a % kv_v.da.length]) + kv_v.lurl;
System.security.allowDomain(_local1);
kv_v.l_mcl.loadClip(_local1, kv_v.t_mc);
};
kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_v.lurl = "/control/tracking/tracker.swf?r=" + Math.floor(Math.random() * 10000);
kv_v.t_mc = createEmptyMovieClip("kv_tracker", -16734);
kv_v.l_mcl = new MovieClipLoader();
kv_v.mcl_l = {onLoadError:function () {
kv_v.a++;
kv_v.lc();
}, onLoadStart:function (m) {
System.security.allowDomain(m._url);
}};
kv_v.l_mcl.addListener(kv_v.mcl_l);
kv_v.lc();
System.security.allowDomain(_root._url);
_global.root = this;
_global.root.tinyManiaURL = "http://www.tinymania.com";
_global.root.wildheartsURL = "http://www.thewildhearts.com";
_global.root.buyItURL = "http://www.buyit.com";
function openWindow(url, dunno) {
trace(url);
getURL (url, "_blank");
}
function startMenuMusic() {
trace("music go!");
musicSound = _global.sndman.newSound("music");
musicSound.onSoundComplete = function () {
this.remove();
};
musicSound.setVolume(0);
musicSound.start(0, 999);
musicSound.fadeTo(100, 20);
}
function stopMenuMusic() {
musicSound.fadeTo(0, 10, musicSound.remove);
}
function startRiff() {
riffSound = _global.sndman.newSound("riff");
riffSound.onSoundComplete = function () {
this.remove();
};
riffSound.setVolume(0);
riffSound.start(0, 999);
riffSound.fadeTo(100, 20);
}
function stopRiff() {
riffSound.fadeTo(0, 10, riffSound.remove);
}
_global.sndman = new SoundManager(_root.createEmptyMovieClip("snd_mc", _root.getNextHighestDepth()));
Frame 2
stop();
Instance of Symbol 54 MovieClip "sound" in Frame 2
onClipEvent (load) {
_root.globalsound = new Sound();
if (!_root.soundOff) {
stopAllSounds();
_root.fader.onEnterFrame = null;
_root.globalsound.setVolume(100);
_root.soundOff = false;
this.gotoAndPlay("start");
}
}
Frame 13
_global.g = this;
bigCurtains.gotoAndPlay("open");
Frame 26
stop();
Frame 27
bigCurtains.gotoAndPlay("close");
Instance of Symbol 211 MovieClip in Frame 27
onClipEvent (load) {
_root.globalsound = new Sound();
this.onEnterFrame = function () {
currvolume = _root.globalsound.getVolume();
if (currvolume >= 10) {
_root.globalsound.setVolume(currvolume - 10);
} else {
_root.globalsound.setVolume(0);
}
};
}
Frame 39
if (!newGame) {
_root.gotoAndPlay("startHome");
var mcLoader = new MovieClipLoader();
mcLoader.unloadClip(_root.container);
} else {
_root.game = newGame;
var mcLoader = new MovieClipLoader();
mcLoader.unloadClip(_root.container);
_root.gotoAndPlay("loadGame");
}
Symbol 4 MovieClip [sofaL] Frame 1
stop();
Symbol 212 MovieClip [__Packages.Snd] Frame 0
class Snd extends Sound
{
var target, manager, position, start, duration, onFadeComplete, fId, getVolume, setVolume, setPan;
function Snd (targ, sndman) {
super(targ);
target = (targ ? (targ) : _root);
manager = sndman;
}
function switchSound(id, loops) {
var _local3 = position;
super.stop();
super.attachSound(id);
start((_local3 % duration) / 1000, loops);
}
function fade(dVol, tVol, handler) {
onFadeComplete = handler;
if (fId) {
stopFade(fId);
}
fId = setInterval(this, "changeVolTowards", FADE_RATE, dVol * (FADE_RATE / 1000), tVol, true);
}
function fadeBy(dVol, t, handler) {
onFadeComplete = handler;
if (fId) {
stopFade(fId);
}
if (t > 0) {
fId = setInterval(this, "changeVolTowards", FADE_RATE, dVol * (FADE_RATE / 1000), dVol * t, true);
}
}
function fadeTo(tVol, t, handler) {
onFadeComplete = handler;
if (fId) {
stopFade(fId);
}
if (t > 0) {
var _local3 = (tVol - getVolume()) / t;
trace((((("fadeTo: " + tVol) + ", ") + getVolume()) + ", ") + _local3);
fId = setInterval(this, "changeVolTowards", FADE_RATE, _local3, tVol, true);
} else {
setVolume(tVol);
}
}
function changeVolTowards(dVol, tVol, fading) {
var _local2 = getVolume();
if (Math.abs(dVol) < Math.abs(tVol - _local2)) {
changeVolume(dVol);
} else {
setVolume(tVol);
if (fading) {
stopFade();
}
}
}
function stopFade() {
if (fId) {
clearInterval(fId);
delete fId;
onFadeComplete();
delete onFadeComplete;
}
}
function positionSound(a, d, f, t) {
if (d < f) {
t = (isNaN(t) ? 100 : (((t < 0) ? 0 : (t))));
d = ((d < 1) ? 1 : (d));
var _local4 = 1 / ((d / f) * 100);
setVolume(Math.ceil(_local4 * t));
setPan((-Math.sin(a)) * 100);
} else {
setVolume(0);
}
}
function positionSoundLinear(a, d, f, t) {
if (d < f) {
t = (isNaN(t) ? 100 : (((t < 0) ? 0 : (t))));
setVolume(((f - d) / f) * t);
setPan((-Math.sin(a)) * 100);
} else {
setVolume(0);
}
}
function changeVolume(n) {
setVolume(getVolume() + n);
}
function remove() {
super.stop();
delete manager.sounds[target.getDepth()];
target.removeMovieClip();
}
function toString() {
return(("(target=" + target) + ")");
}
static var FADE_RATE = 100;
}
Symbol 213 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager extends Snd
{
var sounds, mc_holder, getVolume;
function SoundManager (hld_mc) {
super();
sounds = new Object();
mc_holder = (hld_mc ? (hld_mc) : _root);
}
function playAndRemove(snd_id, offset, loops) {
offset = (isNaN(offset) ? 0 : (offset));
loops = (isNaN(loops) ? 0 : (loops));
var _local2 = newSound(snd_id);
_local2.start(offset, loops);
_local2.onSoundComplete = _local2.remove;
return(_local2);
}
function clearAllSounds() {
for (var _local2 in sounds) {
sounds[_local2].remove();
}
}
function newSound() {
var _local5 = mc_holder.getNextHighestDepth();
var _local6 = mc_holder.createEmptyMovieClip("sh_mc" + _local5, _local5);
var _local4 = new Snd(_local6, this);
var _local3 = 0;
while (_local3 < arguments.length) {
if (arguments[_local3] != undefined) {
_local4.attachSound(arguments[_local3]);
}
_local3++;
}
sounds[_local5] = _local4;
return(_local4);
}
function deleteSound(snd) {
snd.remove();
}
function setVolume(vol) {
if (muted) {
curVol = vol;
} else {
super.setVolume(vol);
}
}
function get mute() {
return(muted);
}
function set mute(b) {
muted = b;
if (b) {
curVol = getVolume();
super.setVolume(0);
} else {
super.setVolume(curVol);
}
//return(mute);
}
var muted = false;
var curVol = 100;
}
Symbol 52 MovieClip Frame 100
gotoAndPlay (1);
Instance of Symbol 45 MovieClip in Symbol 53 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Symbol 53 MovieClip Frame 9
function onEnterFrame() {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
if (getTimer() >= (startTime + 100)) {
animDone = true;
}
if (((Math.ceil(bar._width) >= width) && (animDone)) && (!endOnce)) {
trace("loaded!");
endOnce = true;
stopSparks = true;
delete onEnterFrame;
gotoAndPlay ("out");
} else {
setProgress(_local2);
}
}
function fadeOut() {
setProgress(progress);
this._alpha = this._alpha - 5;
if (this._alpha <= -50) {
this._visible = false;
_parent.play();
}
}
function makeSpark() {
}
function sparkControl() {
if (!stopSparks) {
this._y = this._y + this.grav;
this._x = this._x + this.wind;
this.grav = this.grav * gravity;
this._alpha = this._alpha - this.grav;
this._rotation = this._rotation + this.spin;
if (this._alpha <= 0) {
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
}
function setProgress(p) {
bar._width = ((bar._width * 2) + (p * width)) / 3;
if (progress != 1) {
makeSpark();
}
}
width = 200;
i = 0;
gravity = 1.3;
animDone = true;
startTime = getTimer();
if (this._name == "loader_mc") {
myName = _global.language.loadingAssets;
} else {
myName = _global.language.initLevel;
}
setProgress(0);
stop();
Symbol 53 MovieClip Frame 15
_parent.play();
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 1
stop();
Symbol 61 MovieClip Frame 1
this._visible = false;
this.onEnterFrame = function () {
this.swapDepths(this._parent.getNextHighestDepth());
this.removeMovieClip();
};
Symbol 72 MovieClip Frame 1
down = 10;
Instance of Symbol 71 MovieClip in Symbol 72 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_global.g.game.rDist == oldDist) {
stop();
} else {
theFrame = Math.abs(Math.ceil((_global.g.game.rDist * 0.5) % this._totalframes));
gotoAndStop(theFrame);
}
oldDist = _global.g.game.rDist;
}
Symbol 72 MovieClip Frame 31
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 2
stop();
Symbol 73 MovieClip Frame 3
stop();
Symbol 73 MovieClip Frame 4
stop();
Symbol 73 MovieClip Frame 5
gotoAndPlay ("run");
Symbol 73 MovieClip Frame 8
stop();
Symbol 73 MovieClip Frame 13
stop();
Symbol 73 MovieClip Frame 23
stop();
Symbol 73 MovieClip Frame 26
stop();
Symbol 73 MovieClip Frame 31
stop();
Symbol 73 MovieClip Frame 32
stop();
Symbol 80 MovieClip Frame 1
stop();
Instance of Symbol 71 MovieClip in Symbol 80 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_global.g.game.rDist == oldDist) {
stop();
} else {
theFrame = Math.abs(Math.ceil(_global.g.game.rDist % this._totalframes));
gotoAndStop(theFrame);
}
oldDist = _global.g.game.rDist;
}
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
stop();
Symbol 81 MovieClip Frame 3
stop();
Symbol 81 MovieClip Frame 4
stop();
Symbol 81 MovieClip Frame 5
gotoAndPlay ("run");
Symbol 81 MovieClip Frame 10
stop();
Symbol 81 MovieClip Frame 20
stop();
Symbol 81 MovieClip Frame 34
stop();
Symbol 81 MovieClip Frame 36
stop();
Symbol 81 MovieClip Frame 53
stop();
Symbol 81 MovieClip Frame 54
stop();
Symbol 92 MovieClip Frame 1
var root = this._parent._parent;
var p = this._parent;
root.initBG(p.background, root);
Symbol 92 MovieClip Frame 55
_parent.play();
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 2
play();
Symbol 94 MovieClip Frame 49
_parent.gotoAndPlay("reset");
stop();
Symbol 94 MovieClip Frame 50
play();
Symbol 94 MovieClip Frame 77
_parent.gotoAndPlay("reset");
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
play();
Symbol 96 MovieClip Frame 51
_parent.gotoAndPlay("reset");
stop();
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 2
play();
Symbol 98 MovieClip Frame 45
_parent.gotoAndPlay("reset");
stop();
Symbol 100 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 2
play();
Symbol 100 MovieClip Frame 45
_parent.gotoAndPlay("reset");
stop();
Symbol 101 MovieClip Frame 1
_global.theGame = this;
stop();
Symbol 101 MovieClip Frame 2
var listener = new Object();
listener.t = this;
listener.onKeyDown = function () {
if (!this.t.isPaused) {
if (Key.getCode() == this.t.keys[this.t.curKey]) {
this.t.i++;
this.t.curKey = (this.t.curKey + 1) % 2;
}
if (((Key.getCode() == this.t.keys[2]) && (!this.t.door)) && (!((this.t.numPlayers == 1) && (this.t.curPlayer == 2)))) {
this.t.jumping = true;
}
}
if (Key.getCode() == 19) {
this.t.pauseGame();
}
};
listener.onKeyUp = function () {
if (!this.t.isPaused) {
if (this.t.jumping) {
if (Key.getCode() == this.t.keys[2]) {
this.t.endJump = true;
}
}
}
};
Key.addListener(listener);
function gameLoop() {
if ((rDist - (e - player._x)) < 0) {
if (!sofaContainer.sofaL) {
sofaItems.push(sofaContainer.attachMovie("sofaL", "sofaL", sofaContainer.getNextHighestDepth(), {_x:e - w, _y:123}));
} else {
var _local3 = Math.floor(rDist / sofaLength) * -1;
if (!sofaContainer["c" + _local3]) {
if (((xv > 8.8) || (xv == undefined)) || (player.s != "slide")) {
var _local5 = (sofaContainer.sofaL._x + sofaContainer.sofaL._width) + ((_local3 + 2) * sofaLength);
if ((_local3 % 2) == 0) {
sofaItems.push(sofaContainer.attachMovie("sofaCL", "c" + _local3, sofaContainer.getNextHighestDepth(), {_x:_local5, _y:123}));
} else {
sofaItems.push(sofaContainer.attachMovie("sofaCR", "c" + _local3, sofaContainer.getNextHighestDepth(), {_x:_local5, _y:123}));
}
} else if (!sofaEnded) {
sofaEnded = true;
sofaItems.push(sofaContainer.attachMovie("sofaR", "c" + _local3, sofaContainer.getNextHighestDepth(), {_x:(sofaContainer.sofaL._x + sofaContainer.sofaL._width) + ((_local3 + 1) * sofaLength), _y:123}));
}
}
}
}
if (!jumping) {
speed = speed + (accel * i);
speed = speed * decel;
speed = ((speed <= 0.1) ? 0 : (((speed > maxspeed) ? (maxspeed) : (speed))));
rDist = rDist - speed;
if (rDist > 0) {
if (player._x < r) {
if ((player._x + speed) >= r) {
var _local6 = (player._x + speed) - r;
door._x = door._x - _local6;
player._x = r;
} else {
player._x = player._x + speed;
}
} else {
if (door) {
if ((door._x + door._width) > w) {
door._x = door._x - speed;
} else {
door.swapDepths(this.getNextHighestDepth());
door.removeMovieClip();
}
}
background._x = background._x - speed;
}
animate(player);
_parent.gui.update(rDist / dist, speed / maxspeed);
i = 0;
} else {
player.gotoAndStop("ooof");
this.onEnterFrame = null;
this.gotoAndPlay("overTheLine");
}
} else if (!endJump) {
if (!angleMarker) {
player.gotoAndStop("crouch");
attachMovie("angleMarker", "angleMarker", this.getNextHighestDepth(), {_x:player._x, _y:player._y + (player._height / 2)});
angle = 0;
}
angle = angle + angleInc;
if (angle >= 90) {
angle = 86;
endJump = true;
}
angleMarker.mask._rotation = angleMarker.mask._rotation - angleInc;
} else {
if (xv == undefined) {
angleMarker.removeMovieClip();
radians = (angle * Math.PI) / 180;
xv = speed * Math.cos(radians);
yv = speed * Math.sin(radians);
player.gotoAndPlay("jump");
}
background._x = background._x - xv;
if (player._y < st) {
player._y = player._y - yv;
if (yv < 0) {
if (player.s != "down") {
player.gotoAndPlay("down");
player.s = "down";
}
} else if ((yv <= 2) && (player.s != "glide")) {
player.gotoAndPlay("glide");
player.s = "glide";
}
yv = yv - grav;
} else if ((rDist > 0) || (player.s === "missed")) {
player._y = player._y - yv;
yv = yv - grav;
if (player._y >= f) {
player._y = f;
this.onEnterFrame = null;
this.gotoAndStop("missed");
}
player.s = "missed";
} else {
player._y = st;
player.gotoAndStop("slide");
player.s = "slide";
if (xv >= 0) {
xv = xv - frict;
} else {
xv = 0;
this.onEnterFrame = null;
trace("final distance: " + rDist);
this.score = rDist;
this.gotoAndPlay("jumped");
}
}
rDist = rDist - xv;
if (rDist <= 0) {
_parent.gui.distanceBar.distCount.text = (Math.floor(rDist * -1) / 100) + "m";
_parent.gui[(("p" + curPlayer) + "r") + curRun].text = ((curRun + ". ") + (Math.floor(rDist * -1) / 100)) + "m";
}
}
if (sofaContainer.sofaL && ((!jumping) || (endJump === true))) {
if (xv != undefined) {
sofaContainer._x = sofaContainer._x - xv;
} else {
sofaContainer._x = sofaContainer._x - speed;
}
}
for (var _local4 in panels) {
if (((background._x + panels[_local4]._x) + panels[_local4]._width) < wv) {
panels[_local4].removeMovieClip();
delete panels[_local4];
}
}
if ((background._x + rightpanel) < e) {
rightpanel = rightpanel + panelwidth;
panels.push(spawnBg(rightpanel));
}
}
function ai() {
if (!jumppoint) {
jumppoint = rand(aiJSP[ailvl], aiJEP[ailvl]);
}
if (!jumpangle) {
jumpangle = rand(aiASP[ailvl], aiAEP[ailvl]);
}
if ((rDist - (e - player._x)) < 0) {
if (!sofaContainer.sofaL) {
sofaItems.push(sofaContainer.attachMovie("sofaL", "sofaL", sofaContainer.getNextHighestDepth(), {_x:e - w, _y:123}));
} else {
var _local3 = Math.floor(rDist / sofaLength) * -1;
if (!sofaContainer["c" + _local3]) {
if (((xv > 8.8) || (xv == undefined)) || (player.s != "slide")) {
var _local5 = (sofaContainer.sofaL._x + sofaContainer.sofaL._width) + ((_local3 + 2) * sofaLength);
if ((_local3 % 2) == 0) {
sofaItems.push(sofaContainer.attachMovie("sofaCL", "c" + _local3, sofaContainer.getNextHighestDepth(), {_x:_local5, _y:123}));
} else {
sofaItems.push(sofaContainer.attachMovie("sofaCR", "c" + _local3, sofaContainer.getNextHighestDepth(), {_x:_local5, _y:123}));
}
} else if (!sofaEnded) {
sofaEnded = true;
sofaItems.push(sofaContainer.attachMovie("sofaR", "c" + _local3, sofaContainer.getNextHighestDepth(), {_x:(sofaContainer.sofaL._x + sofaContainer.sofaL._width) + ((_local3 + 1) * sofaLength), _y:123}));
}
}
}
}
if (rDist <= jumppoint) {
jumping = true;
}
if (!jumping) {
i = rand(0, 1);
speed = speed + (accel * i);
speed = speed * decel;
speed = ((speed <= 0.1) ? 0 : (((speed > maxspeed) ? (maxspeed) : (speed))));
rDist = rDist - speed;
if (rDist > 0) {
if (player._x < r) {
if ((player._x + speed) >= r) {
var _local6 = (player._x + speed) - r;
door._x = door._x - _local6;
player._x = r;
} else {
player._x = player._x + speed;
}
} else {
if (door) {
if ((door._x + door._width) > w) {
door._x = door._x - speed;
} else {
door.swapDepths(this.getNextHighestDepth());
door.removeMovieClip();
}
}
background._x = background._x - speed;
}
animate(player);
_parent.gui.update(rDist / dist, speed / maxspeed);
i = 0;
} else {
player.gotoAndStop("ooof");
this.onEnterFrame = null;
this.gotoAndPlay("overTheLine");
}
} else if (!endJump) {
if (!angleMarker) {
player.gotoAndStop("crouch");
attachMovie("angleMarker", "angleMarker", this.getNextHighestDepth(), {_x:player._x, _y:player._y + (player._height / 2)});
angle = 0;
}
if (angle >= jumpangle) {
endJump = true;
}
angle = angle + angleInc;
if (angle >= 90) {
angle = 86;
endJump = true;
}
angleMarker.mask._rotation = angleMarker.mask._rotation - angleInc;
} else {
if (xv == undefined) {
angleMarker.removeMovieClip();
radians = (angle * Math.PI) / 180;
xv = speed * Math.cos(radians);
yv = speed * Math.sin(radians);
player.gotoAndPlay("jump");
}
background._x = background._x - xv;
if (player._y < st) {
player._y = player._y - yv;
if (yv < 0) {
if (player.s != "down") {
player.gotoAndPlay("down");
player.s = "down";
}
} else if ((yv <= 2) && (player.s != "glide")) {
player.gotoAndPlay("glide");
player.s = "glide";
}
yv = yv - grav;
} else if ((rDist > 0) || (player.s == "missed")) {
player._y = player._y - yv;
yv = yv - grav;
if (player._y >= f) {
player._y = f;
this.onEnterFrame = null;
this.gotoAndStop("missed");
}
player.s = "missed";
} else {
player._y = st;
player.gotoAndStop("slide");
player.s = "slide";
if (xv >= 0) {
xv = xv - frict;
} else {
xv = 0;
this.onEnterFrame = null;
this.gotoAndPlay("jumped");
}
}
rDist = rDist - xv;
if (rDist <= 0) {
_parent.gui.distanceBar.distCount.text = (Math.floor(rDist * -1) / 100) + "m";
_parent.gui[(("p" + curPlayer) + "r") + curRun].text = ((curRun + ". ") + (Math.floor(rDist * -1) / 100)) + "m";
}
}
if (sofaContainer.sofaL && ((!jumping) || (endJump === true))) {
if (xv != undefined) {
sofaContainer._x = sofaContainer._x - xv;
} else {
sofaContainer._x = sofaContainer._x - speed;
}
}
for (var _local4 in panels) {
if (((background._x + panels[_local4]._x) + panels[_local4]._width) < w) {
panels[_local4].removeMovieClip();
delete panels[_local4];
}
}
if ((background._x + rightpanel) < e) {
rightpanel = rightpanel + panelwidth;
panels.push(spawnBg(rightpanel));
}
}
function spawnBg(x) {
if (spawnIndex == undefined) {
spawnIndex = -1;
}
var _local1 = ["painting", "clock", "plant", "shelves", "lamp", "painting"];
trace((("spawnBg:" + spawnIndex) + " ") + _local1.length);
if (spawnIndex < _local1.length) {
spawnIndex++;
return(background.attachMovie(_local1[spawnIndex], "bg" + Math.floor(x), background.getNextHighestDepth(), {_x:x, cacheAsBitmap:true}));
}
}
function rand(min, max) {
return(Math.floor(Math.random() * ((max - min) + 1)) + min);
}
function animate(t) {
if (this.speed > 0) {
this.aCount++;
this.aSpeed = Math.floor((this.afps - ((this.speed / this.maxspeed) * this.afps)) * 0.25);
if (this.aSpeed <= this.aCount) {
this.aCount = 0;
t.play();
}
} else {
t.gotoAndPlay("stand");
}
}
function pauseGame() {
if (isPaused) {
isPaused = false;
this.onEnterFrame = gameLoop;
} else {
isPaused = true;
this.onEnterFrame = null;
}
}
function slideSofa() {
speed = speed * 0.97;
if (speed > 1) {
sofaContainer._x = sofaContainer._x - speed;
player._x = player._x - speed;
background._x = background._x - speed;
} else {
this.onEnterFrame = null;
play();
}
}
n = nb._y;
e = eb._x;
s = sb._y;
w = wb._x;
r = rp._x;
f = fp._y;
st = sofaTop._y;
px = ps._x;
py = ps._y;
if (!curPlayer) {
curPlayer = 1;
curRun = 1;
p1scores = 0;
p2scores = 0;
}
numPlays = 2;
numRuns = 3;
score = 0;
worldRecord = 8.9;
curKey = 0;
if (curPlayer == 1) {
keys = [37, 39, 32];
keyNames = ["left", "right", "space"];
} else {
keys = [90, 88, 67];
keyNames = ["cpu", "cpu", "cpu"];
}
_parent.gui.l_button.key = keys[0];
_parent.gui.l_button.txt = keyNames[0];
_parent.gui.r_button.key = keys[1];
_parent.gui.r_button.txt = keyNames[1];
_parent.gui.j_button.key = keys[2];
_parent.gui.j_button.txt = keyNames[2];
dist = 1000;
i = 0;
speed = 0;
maxspeed = 15;
accel = 2;
decel = 0.95;
rDist = dist;
frict = 0.13;
angleInc = 5;
grav = 0.4;
sofaLength = 92;
sofaEnded = false;
tfps = 20;
afps = 20;
aSpeed = 0;
aCount = 0;
panelwidth = 150;
rightpanel = 0;
pr = null;
std_fmt = new TextFormat();
std_fmt.color = 10066329 /* 0x999999 */;
stdH_fmt = new TextFormat();
stdH_fmt.color = 16777215 /* 0xFFFFFF */;
stdC_fmt = new TextFormat();
stdC_fmt.color = 16711680 /* 0xFF0000 */;
lrg_fmt = new TextFormat();
lrg_fmt.color = 10066329 /* 0x999999 */;
lrgH_fmt = new TextFormat();
lrgH_fmt.color = 16777215 /* 0xFFFFFF */;
background._x = 0;
sofaContainer._x = 0;
player._x = px;
player._y = py;
for (var p in panels) {
panels[p].removeMovieClip();
}
for (var s in sofaItems) {
sofaItems[s].removeMovieClip();
}
panels = new Array();
sofaItems = new Array();
var x = (w + door._width);
while (x < e) {
panels.push(spawnBg(x));
rightpanel = rightpanel + panelwidth;
x = x + panelwidth;
}
stop();
_global.g.aiDifficulty = 0;
playergirl._visible = false;
playerman._visible = false;
ailvl = _parent.aiDifficulty;
aiJSP = [-30, -10, -1];
aiJEP = [150, 80, 40];
aiASP = [30, 20, 10];
aiAEP = [65, 50, 30];
if (curPlayer == 2) {
trace("devil on!");
cpu._visible = true;
cpu.play();
} else {
trace("devil off!");
cpu._visible = false;
cpu.gotoAndStop(1);
}
Instance of Symbol 82 MovieClip "sofaContainer" in Symbol 101 MovieClip Frame 2
onClipEvent (load) {
this._xscale = 100;
}
Instance of Symbol 87 MovieClip "cpu" in Symbol 101 MovieClip Frame 2
onClipEvent (load) {
this._visible = false;
stop();
}
onClipEvent (enterFrame) {
if ((_currentframe == lastFrame) && (lastFrame)) {
_visible = false;
} else {
_visible = true;
}
}
Symbol 101 MovieClip Frame 3
_parent.gui["player" + curPlayer].setTextFormat(lrgH_fmt);
_parent.gui["p" + curPlayer].setTextFormat(stdH_fmt);
_parent.gui[(("p" + curPlayer) + "r") + curRun].setNewTextFormat(stdC_fmt);
_parent.gui[(("p" + curPlayer) + "r") + curRun].setTextFormat(stdC_fmt);
_parent.gui.player_txt.text = "PLAYER " + curPlayer;
player = this[this["pc" + curPlayer]];
player._visible = true;
player.gotoAndStop(1);
speed = maxspeed;
if (!((numPlayers == 1) && (curPlayer == 2))) {
this.onEnterFrame = gameLoop;
Key.addListener(listener);
cpu._visible = false;
} else {
this.onEnterFrame = ai;
Key.removeListener(listener);
cpu._visible = true;
}
_parent.gui.distanceBar.distCount.text = "0.00m";
door.door.play();
stop();
Symbol 101 MovieClip Frame 4
stop();
Symbol 101 MovieClip Frame 5
delete jumping;
delete endJump;
delete xv;
delete yv;
delete radians;
delete player.s;
delete curSofa;
delete jumppoint;
delete jumpangle;
speed = (angle = (curKey = (rightpanel = 0)));
stop();
sc = Math.floor(rDist * -1) / 100;
if (this[("p" + curPlayer) + "scores"]) {
if (this[("p" + curPlayer) + "scores"] < sc) {
this[("p" + curPlayer) + "scores"] = sc;
}
} else {
this[("p" + curPlayer) + "scores"] = Math.floor(rDist * -1) / 100;
}
if (((rDist * -1) / 100) > worldRecord) {
trace("doWorldRecord");
this.wrldRcrd.gotoAndPlay("start");
} else if (curPlayer == 1) {
trace("doWellDone");
this.wellDone.gotoAndPlay("start");
} else {
this.wellDone.gotoAndPlay("devil");
trace("doDevil");
}
stop();
Symbol 101 MovieClip Frame 6
delete jumping;
delete endJump;
delete xv;
delete yv;
delete radians;
delete player.s;
delete curSofa;
delete jumppoint;
delete jumpangle;
speed = (angle = (curKey = (rightpanel = 0)));
stop();
status_txt.text = "You missed!!";
_parent.gui[(("p" + curPlayer) + "r") + curRun].text = curRun + ". - - : - -";
this.missed.gotoAndPlay("start");
Symbol 101 MovieClip Frame 7
var curSofa = (Math.floor(rDist / sofaLength) * -1);
sofaItems.push(sofaContainer.attachMovie("sofaR", "sofaR", sofaContainer.getNextHighestDepth(), {_x:(sofaContainer.sofaL._x + sofaContainer.sofaL._width) + ((curSofa + 1) * sofaLength), _y:123}));
this.onEnterFrame = slideSofa;
stop();
Symbol 101 MovieClip Frame 8
delete jumping;
delete endJump;
delete xv;
delete yv;
delete radians;
delete player.s;
delete curSofa;
speed = (angle = (curKey = (rightpanel = 0)));
stop();
status_txt.text = "Over the Line!!";
this.overTheLine.gotoAndPlay("start");
Symbol 101 MovieClip Frame 9
_parent.gui["player" + curPlayer].setTextFormat(lrg_fmt);
_parent.gui["p" + curPlayer].setTextFormat(std_fmt);
_parent.gui[(("p" + curPlayer) + "r") + curRun].setNewTextFormat(std_fmt);
_parent.gui[(("p" + curPlayer) + "r") + curRun].setTextFormat(std_fmt);
score = 0;
spawnIndex = -1;
if (curPlayer == numPlays) {
curPlayer = 1;
curRun++;
} else {
curPlayer++;
}
if (curRun > numRuns) {
trace("game over!");
this.stop();
_parent.menu.gotoAndPlay("closeCurtains");
_parent.menu.left.gotoAndStop("worldRecord");
_parent.menu.right.gotoAndPlay("chooseEvent");
} else {
this.gotoAndPlay("start");
}
trace((("curRun=" + curRun) + " numRuns=") + numRuns);
if (curRun <= numRuns) {
background._x = 0;
sofaContainer._x = 0;
player._x = px;
player._y = py;
for (var i in panels) {
panels[i].removeMovieClip();
}
for (var i in sofaItems) {
sofaItems[i].removeMovieClip();
}
panels = new Array();
sofaItems = new Array();
}
Symbol 105 Button
on (release) {
_global.root.openWindow(_global.root.wildheartsURL, true);
_root.kvClick(440);
}
Symbol 109 Button
on (release) {
_global.root.openWindow(_global.root.tinyManiaURL, true);
_root.kvClick(439);
}
Symbol 115 MovieClip Frame 1
this.onEnterFrame = function () {
if (Key.isDown(this.key) && (!((this._parent._parent.game.curPlayer == 2) && (this._parent._parent.game.numPlayers == 1)))) {
this.gotoAndPlay("on");
} else {
this.gotoAndPlay("off");
}
};
stop();
Symbol 115 MovieClip Frame 2
Symbol 121 MovieClip Frame 1
l = lb._x;
r = rb._x;
Symbol 126 MovieClip Frame 1
mask.width = mask._width;
stop();
Symbol 143 MovieClip Frame 1
function update(rDist, speed) {
speedBar.mask._width = speed * speedBar.mask.width;
distanceBar.jumpMarker._x = (distanceBar.l + distanceBar.r) - (rDist * distanceBar.r);
}
Symbol 148 MovieClip Frame 7
stop();
Symbol 148 MovieClip Frame 12
delete _parent._parent._parent.game.curPlayer;
_parent._parent._parent.game.gotoAndPlay("start");
_parent._parent.gotoAndPlay("openCurtains");
_global.g.resetGui();
gotoAndStop ("off");
Symbol 148 MovieClip Frame 13
stop();
Symbol 158 Button
on (release) {
fader.gotoAndPlay("out");
_global.root.startPage.gotoAndPlay(1);
_global.root.gotoAndPlay("restart");
}
Symbol 159 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 6
stop();
Symbol 159 MovieClip Frame 11
root = this._parent._parent;
game = root.game;
trace(("final scores: p1=" + game.p1scores) + ", p2=game.p2scores");
if (game.p1scores >= game.p2scores) {
score1_txt.text = game.p1scores;
win1_txt.text = "Ginger wins!";
score2_txt.text = game.p2scores;
win2_txt.text = ((root.numPlayers == 1) ? "The Devil loses" : "The Devil loses");
} else {
score1_txt.text = game.p2scores;
win1_txt.text = ((root.numPlayers == 1) ? "The Devil wins!" : "The Devil wins");
score2_txt.text = game.p1scores;
win2_txt.text = "Ginger loses";
}
stop();
_parent._parent.game.cpu._visible = false;
_parent._parent.game.cpu.gotoAndStop(1);
Symbol 159 MovieClip Frame 16
root = this._parent._parent;
game = root.game;
trace(("final scores: p1=" + game.p1scores) + ", p2=game.p2scores");
if (game.p1scores >= game.p2scores) {
score1_txt.text = game.p1scores;
win1_txt.text = "Ginger wins!";
score2_txt.text = game.p2scores;
win2_txt.text = ((root.numPlayers == 1) ? "The Devil loses" : "The Devil loses");
} else {
score1_txt.text = game.p2scores;
win1_txt.text = ((root.numPlayers == 1) ? "The Devil wins!" : "The Devil wins");
score2_txt.text = game.p1scores;
win2_txt.text = "Ginger loses";
}
stop();
_parent._parent.game.cpu._visible = false;
_parent._parent.game.cpu.gotoAndStop(1);
Symbol 159 MovieClip Frame 21
score1_txt.text = game.p2scores;
win1_txt.text = "The Devil wins!";
score2_txt.text = game.p1scores;
win2_txt.text = "Ginger lost!";
stop();
_parent._parent.game.cpu._visible = false;
_parent._parent.game.cpu.gotoAndStop(1);
Symbol 160 MovieClip Frame 1
t = this._parent;
p1 = t.player1;
p2 = t.player2;
p1.character = "man1";
p2.character = "girl1";
t.numPlayers = 1;
function formatNumber(value, precision) {
var _local1;
if (precision > 0) {
var _local5 = Math.pow(10, precision);
_local1 = (Math.round(value * _local5) / _local5).toString();
if (_local1.length > 0) {
var _local4 = _local1.lastIndexOf(".");
var _local2 = 0;
if (_local4 < 0) {
_local1 = _local1 + ".";
_local2 = precision;
} else {
_local2 = precision - (_local1.length - (_local4 + 1));
}
_local1 = _local1 + "0000000000000000000000000000".substring(0, _local2);
}
} else {
_local1 = Math.round(value).toString();
}
return(_local1);
}
Symbol 160 MovieClip Frame 13
stop();
Symbol 160 MovieClip Frame 39
left.gotoAndStop(1);
stop();
Symbol 160 MovieClip Frame 40
if (_parent.wd && (!_parent.wr)) {
left.gotoAndStop("wellDone");
delete _parent.wd;
}
if (_parent.wr) {
left.gotoAndStop("worldRecord");
delete _parent.wr;
}
Symbol 160 MovieClip Frame 54
score_txt.text = formatNumber(_parent.score1, 2) + "s";
stop();
Symbol 183 Button
on (release) {
play();
}
Symbol 184 MovieClip Frame 2
stop();
Instance of Symbol 170 MovieClip in Symbol 184 MovieClip Frame 3
onClipEvent (load) {
onPress = function () {
};
this.useHandCursor = false;
}
Symbol 184 MovieClip Frame 8
stop();
Symbol 184 MovieClip Frame 12
gotoAndStop ("off");
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 5
stop();
Symbol 190 Button
on (release) {
getURL ("http://www.tinymania.com", "_blank");
_root.kvClick(439);
}
Symbol 206 Button
on (release) {
getURL ("http://www.cargorecords.co.uk/release/3881", "_blank");
_root.kvClick(441);
}
Symbol 207 Button
on (release) {
getURL ("http://www.cargorecords.co.uk/release/3881", "_blank");
_root.kvClick(441);
}
Symbol 208 Button
on (release) {
howToPlay.gotoAndPlay("on");
}
Symbol 209 Button
on (release) {
var game = _parent.game;
var gui = _parent.gui;
delete game.curPlayer;
gui.p1r1.text = "1. - - : - -";
gui.p1r2.text = "2. - - : - -";
gui.p1r3.text = "3. - - : - -";
gui.p2r1.text = "1. - - : - -";
gui.p2r2.text = "2. - - : - -";
gui.p2r3.text = "3. - - : - -";
game.gotoAndPlay("start");
play();
}
Symbol 210 MovieClip Frame 1
t = this._parent;
p1 = t.player1;
p2 = t.player2;
p1.character = "man1";
p2.character = "girl1";
t.numPlayers = 1;
function formatNumber(value, precision) {
var _local1;
if (precision > 0) {
var _local5 = Math.pow(10, precision);
_local1 = (Math.round(value * _local5) / _local5).toString();
if (_local1.length > 0) {
var _local4 = _local1.lastIndexOf(".");
var _local2 = 0;
if (_local4 < 0) {
_local1 = _local1 + ".";
_local2 = precision;
} else {
_local2 = precision - (_local1.length - (_local4 + 1));
}
_local1 = _local1 + "0000000000000000000000000000".substring(0, _local2);
}
} else {
_local1 = Math.round(value).toString();
}
return(_local1);
}
_global.g.aiDifficulty = 0;
t = _parent.game;
if (t.pc1) {
if (t.pc1) {
this.playerChoose.gotoAndPlay("p1g");
trace("goto girl!");
}
} else {
t.pc1 = "playerman";
t.pc2 = "playergirl";
}
if (!t.numPlayers) {
t.numPlayers = 1;
}
Instance of Symbol 162 MovieClip in Symbol 210 MovieClip Frame 1
onClipEvent (load) {
onRollOver = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 187 MovieClip "mute" in Symbol 210 MovieClip Frame 1
onClipEvent (load) {
if (new Sound().getVolume() == 0) {
gotoAndStop ("off");
}
this.onRelease = function () {
if (new Sound().getVolume() == 0) {
gotoAndStop ("on");
new Sound().setVolume(100);
} else {
gotoAndStop ("off");
new Sound().setVolume(0);
}
};
}
Symbol 210 MovieClip Frame 2
_global.root.stopRiff();
Symbol 210 MovieClip Frame 9
_global.root.startMenuMusic();
Symbol 210 MovieClip Frame 43
stop();
Symbol 210 MovieClip Frame 44
_global.root.stopMenuMusic();
Instance of Symbol 170 MovieClip in Symbol 210 MovieClip Frame 44
onClipEvent (load) {
onPress = function () {
};
this.useHandCursor = false;
}
Symbol 210 MovieClip Frame 50
_global.root.startRiff();
Symbol 210 MovieClip Frame 51
stop();