Frame 2
if (getBytesLoaded() < getBytesTotal()) {
gotoAndPlay (1);
} else {
_root.scrollRect = new flash.geom.Rectangle(0, 0, 750, 150);
gotoAndStop ("reload");
}
Frame 3
var p = _root.createEmptyMovieClip;
var ct = (new flash.geom.ColorTransform());
_root.transform.colorTransform = ct;
_root._x = (_root._y = 0);
_root._xscale = (_root._yscale = 100);
firefly_trap = false;
firefly_target = firefly_home;
var urls = ["http://jayisgames.com", "http://casualgameplay.com", "http://foon", "http://localhost", "file://"];
var ok = false;
for (i in urls) {
var url = urls[i];
if (_url.indexOf(url) == 0) {
ok = true;
break;
}
}
if (ok || (MMSave)) {
gotoAndStop ("start");
} else {
gotoAndStop ("denied");
}
Frame 20
getURL ("http://jayisgames.com", "_top");
Frame 26
function main() {
function doneStars() {
for (var _local1 in stars) {
stars[_local1].gotoAndPlay("fade");
}
jigman.play();
}
function prepareRocket() {
if (!game_started) {
bushes.gotoAndStop(2);
rocket._visible = true;
}
}
function newSite() {
delete fish_site.ripples.onRipple;
fish_site.makeActive(false);
fish_site = sites[random(sites.length)];
fish_site.makeActive(true);
fish_site.ripples.onRipple = function () {
if (Math.random() > 0.6) {
newSite();
}
};
}
function trapFireflies() {
firefly_trap = true;
var _local2 = firefly_target.getBounds(_root);
firefly_trap_x0 = _local2.xMin;
firefly_trap_x1 = _local2.xMax;
firefly_trap_y0 = _local2.yMin;
firefly_trap_y1 = _local2.yMax;
}
function wizHov() {
if (!letters.l1.lit) {
return(undefined);
}
if (man.pos != "Middle") {
wiz.fly();
primeWizard();
} else {
wiz.peek();
}
}
function primeWizard() {
delete reed.onHover;
reed = reeds[random(reeds.length)];
reed.onHover = wizHov;
}
var game_started = false;
debug_box._visible = false;
switchy._visible = false;
switchy.onSwitch = function () {
letters.light("a2");
};
hole.onActivate = function () {
if (!(letters.m.lit && (letters.y.lit))) {
beetles.emerge();
}
};
beetles.onReachY = function () {
letters.light("y");
};
beetles.onReachM = function () {
letters.light("m");
};
beetles.onGreenAppear = function () {
if (frog.waiting) {
frog.waiting = false;
frog.play();
frog.onLickFin = function () {
frog.gotoAndPlay("disappear");
delete frog.onLickFin;
};
} else {
this.gotoAndPlay("lasered");
}
};
frog.onLick = function () {
this.waiting = true;
this.stop();
this.t = 20;
this.onEnterFrame = function () {
if ((this.t--) < 0) {
this.waiting = false;
this.play();
delete this.onEnterFrame;
}
};
};
kleaves.onHit = function () {
pile.play();
knocky.gotoAndPlay("disappear");
};
if (letters.p.lit) {
kleaves._visible = false;
}
pile.onFall = function () {
man.enablePile(true);
};
man.onThrow = function () {
pile.gotoAndPlay("burn");
};
pile.onBurn = function () {
letters.light("p");
man.enablePile(false);
};
lasers.onDie = function () {
jigman.play();
_root.flash.play();
letters.light("e");
};
jigman.onFire = function () {
jigman.stop();
lasers.play();
};
var stars = [star0, star1, star2, star3, star4, star5, star6];
var starsites = [site6, site5, site3, site0, site1];
var next_pitch = 0;
var pitch_dir = 0;
var i = 0;
while (i < 5) {
var _local3;
do {
_local3 = stars[random(stars.length)];
} while (_local3.lit);
_local3.lit = true;
_local3.pitch = i;
_local3.onHit = function () {
noises.sing(this.pitch);
starsites[this.pitch].rip2.play();
if ((next_pitch == this.pitch) && (pitch_dir != 0)) {
next_pitch = next_pitch + pitch_dir;
if ((next_pitch == -1) || (next_pitch == 5)) {
doneStars();
}
} else if (this.pitch == 0) {
pitch_dir = 1;
next_pitch = 1;
} else if (this.pitch == 4) {
pitch_dir = -1;
next_pitch = 3;
} else {
pitch_dir = (next_pitch = 0);
}
};
i++;
}
for (var i in stars) {
var _local3 = stars[i];
if (!_local3.lit) {
_local3._visible = false;
}
}
letters.e.onLight = function () {
for (var _local1 in stars) {
stars[_local1]._visible = false;
}
};
addDragTarget(wand, man, function () {
man.fling();
});
man.onEnterLake = function () {
jaytrix.visible = false;
gotoAndPlay ("underwater");
};
rocket._visible = false;
letters.y.onLight = function () {
if (letters.l2.lit) {
return(undefined);
}
if (letters.a3.lit) {
prepareRocket();
}
};
letters.a3.onLight = function () {
if (letters.l2.lit) {
return(undefined);
}
if (letters.y.lit) {
prepareRocket();
}
};
frog.onActivateAsMan = function () {
if (rocket._visible) {
frog.gotoAndPlay("go-rocket");
frog.onEnterRocket = function () {
rocket.play();
};
} else {
frog.gotoAndPlay("wave");
}
};
rocket.onTakeoff = function () {
_root.gotoAndPlay("space");
};
if (back_from_rocket_game) {
back_from_rocket_game = false;
if (won_last_game) {
rocket.onExplode = function () {
_root.flash.play();
letters.light("l2");
};
rocket._visible = true;
rocket.gotoAndPlay("landing");
} else {
rocket.gotoAndPlay("landing2");
}
}
primeRange = function () {
function makeScriptFunc(i) {
if (i == undefined) {
i = 0;
}
return(function () {
var _local2 = script[i];
if (typeof(_local2) == "movieclip") {
_local2.play();
_local2.onGetHit = function () {
score++;
};
max_score++;
makeScriptFunc(i + 1)();
} else if (typeof(_local2) == "number") {
var iv;
var fn = makeScriptFunc(i + 1);
var _local3 = function () {
clearInterval(iv);
fn();
};
iv = setInterval(_local3, _local2 * 50);
} else if (typeof(_local2) == "null") {
var _local4 = (("" + score) + "/") + max_score;
man.score(_local4);
man.onScoreFin = function () {
if (score >= (max_score - 2)) {
man.onFlareExplode = function () {
_root.flash.play();
letters.light("u");
};
man.gotoAndPlay("Fire");
} else {
tg0.play();
}
man.locked = false;
};
}
});
}
var script = [20, tg1, 10, tg2, 30, tgt0, tgt1, tgt2, 30, tgt3, tgt4, 20, tgd0, 5, tgd2, 10, tgd1, 5, tgd4, 10, tgd5, 15, tgd3, 30, null];
tgt0.delay = 20;
tgt1.delay = 17;
tgt2.delay = 14;
tg0.onExtend = function () {
this.stop();
};
tg0.play();
var score = 0;
var max_score = 0;
tg0.onGetHit = function () {
score = 1;
max_score = 1;
man.locked = true;
if (man.pos == "Right") {
man.gotoAndPlay("Go Back Left");
} else {
man.go_left_flag = true;
}
makeScriptFunc()();
};
};
frog._visible = false;
frog.swapDepths(rock1);
rock1.setTo("small");
rock2.setTo("none");
clump1.onActivate = (clump2.onActivate = function () {
clump1.rustle();
});
clump1.onRustle = function () {
clump2.rustle();
};
clump2.onRustle = function () {
var _local1 = ((frog._visible || (letters.countLitLetters() < 1)) ? "small" : "big");
if (!rock2.fall("small")) {
rock1.fall(_local1);
}
};
rock1.onDrag = function () {
if (this.state == "big") {
frog._visible = true;
}
};
rock1.onLand = function () {
if (this.state == "big") {
frog._visible = false;
frog.reset();
}
};
frog.onActivate = function () {
if (frog.shape == "Man") {
frog.onActivateAsMan();
} else if (frog.sitting_on) {
if (frog._x < 450) {
frog.onLand = function () {
this._x = this.start_x;
this._y = this.start_y;
this._visible = false;
this.onEnterFrame = function () {
this._visible = true;
this.gotoAndStop("shore");
this.pos = "Left";
delete this.onLand;
delete this.onEnterFrame;
};
};
frog.hopTo(frog_landing_site);
} else {
frog.hopTo(closestPad(frog.sitting_on));
}
} else {
frog.hopTo(closestPad(frog));
}
};
var _local4 = [pad0, pad1, pad2, pad3];
for (i in _local4) {
addDragTarget(wand, _local4[i], function (me) {
if (frog.sitting_on != me) {
recolour(me);
}
});
}
orb._visible = false;
addDragTarget(wand, frog, function () {
frog.anthropomorphize();
});
var sites = [site0, site1, site2, site3, site4, site5];
newSite();
letters.a3.onLight = function () {
for (i in sites) {
sites[i].makeActive(false);
delete sites[i].ripples.onRipple;
}
fish_site = null;
};
frog.onFishStart = function () {
var _local2 = {x:0, y:0};
this.rodend.localToGlobal(_local2);
if ((fish_site.hitTest(_local2.x, _local2.y) && (!letters.a3.lit)) && (!fished)) {
fished = true;
this.gotoAndPlay("fishing-success");
fish_site.makeActive(false);
fish_site = null;
} else {
this.gotoAndPlay("fishing-failure");
}
};
frog.onFishEnd = function () {
frog.sitting_on.locked = false;
};
frog.onFishPull = function () {
orb._visible = true;
orb._x = frog._x - 14;
orb._y = frog._y + 6;
orb.vx = 0;
orb.vy = 0;
orb.target = {};
orb.target._x = orb._x;
orb.target._y = orb._y - 40;
orb.t = 20;
orb.onEnterFrame = function () {
var _local5 = this.target._x - this._x;
var _local4 = this.target._y - this._y;
var _local3 = _local5 / 6;
var _local2 = _local4 / 6;
_local3 = bound(_local3, 5);
_local2 = bound(_local2, 5);
this.vx = this.vx + _local3;
this.vy = this.vy + _local2;
this.vx = this.vx * 0.93;
this.vy = this.vy * 0.93;
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if (this.t == 0) {
this.next();
} else if (this.t > 0) {
this.t--;
}
};
orb.next = function () {
var _local3 = {x:0, y:0};
_root.letters.a3.localToGlobal(_local3);
this.t = 30;
this.target._x = _local3.x + (_root.letters.a3._width / 2);
this.target._y = _local3.y + (_root.letters.a3._height / 2);
this.next = function () {
this.t = -1;
this.onExplode = function () {
_root.flash.play();
_root.letters.light("a3");
};
this.explode();
delete eval (this.onEnterFrame());
delete this.next;
};
};
};
firefly_home = campfire;
if (!firefly_target) {
firefly_target = firefly_home;
}
man.onGetStick = function () {
if (!firefly_trap) {
if (firefly_target == campfire) {
firefly_target = man.item.stick.tip;
}
}
};
man.onBurnOut = function () {
if ((firefly_target == man.item.stick.tip) && (!firefly_trap)) {
if (man.pos == "Middle") {
if (lantern2.lit) {
firefly_target = lantern2;
} else {
firefly_target = null;
}
}
}
};
lantern2.onUnlight = function () {
if (firefly_target == lantern2) {
if (lantern1.lit) {
firefly_target = lantern1;
} else if (letters.l1.flame._visible) {
firefly_target = letters.l1;
letters.l1.onEnterFrame = function () {
if (this.t == undefined) {
this.t = 8;
} else if ((this.t--) <= 0) {
letters.light("l1");
delete this.onEnterFrame;
}
};
} else if (man.holding == "firestick") {
firefly_target = man.item.stick.tip;
} else {
firefly_target = firefly_home;
}
}
};
lantern1.onUnlight = function () {
if (firefly_target == lantern1) {
if (lantern2.lit) {
firefly_target = lantern2;
} else if (man.holding == "firestick") {
firefly_target = man.item.stick.tip;
} else {
firefly_target = null;
}
}
};
letters.l1.onLight = function () {
firefly_target = letters.l1;
trapFireflies();
};
letters.l1.firebutt._visible = true;
letters.l1.firebutt.useHandCursor = false;
letters.l1.firebutt.onPress = function () {
if (letters.l1.flame._visible) {
return(undefined);
}
letters.l1.flame._visible = true;
letters.l1.flame.t = 25;
letters.l1.flame._yscale = 1;
letters.l1.flame.onEnterFrame = function () {
if ((this.t > 20) && (this._yscale < 80)) {
this._yscale = this._yscale + 20;
} else if ((this.t < 5) && (this._yscale > 0)) {
this._yscale = this._yscale - 20;
}
if (this._yscale > 80) {
this._yscale = 80;
}
if ((this.t--) < 0) {
this._visible = false;
delete this.onEnterFrame;
}
};
var _local2 = new Sound(this);
_local2.attachSound("lighter.wav");
_local2.start();
};
var reeds = [];
var reed = null;
var i = 0;
while (i < 9) {
reeds.push(_root["reed" + i]);
i++;
}
primeWizard();
wiz.onHit = function () {
if (!wand.dropped) {
this.wand._visible = false;
wand.drop();
}
};
lantern1.onDragHover = function (what) {
trace("R");
};
addDragTarget(wand, lantern1, function () {
lantern1.fall();
string1._visible = false;
});
addDragTarget(wand, lantern2, function () {
lantern2.fall();
string2._visible = false;
});
lantern1.onFall = function () {
letters.light("a0");
};
lantern2.onFall = function () {
letters.light("a1");
};
letters.a0.onLight = function () {
lantern1._visible = false;
string1._visible = false;
if (!letters.u.lit) {
primeRange();
}
};
letters.a1.onLight = function () {
lantern2._visible = false;
string2._visible = false;
};
for (i in this) {
if (this[i].init) {
this[i].init();
}
}
if ((!lantern1._visible) && (!letters.u.lit)) {
primeRange();
}
if (back_from_maze_game) {
back_from_maze_game = false;
if (won_last_game) {
glitchy.gotoAndPlay("lightning");
glitchy.onLightning = function () {
_root.flash.play();
letters.light("s");
};
}
}
game_started = true;
}
function freakout() {
recolour(_root);
_root._yscale = -100;
_root._y = 150;
glitchy.play();
if (!letters.a2.lit) {
switchy._visible = true;
}
}
function closestPad(ob) {
var _local8 = [pad0, pad1, pad2, pad3];
var _local6 = null;
var _local7 = 0;
for (i in _local8) {
var _local1 = _local8[i];
if (_local1 == ob) {
continue;
}
var _local2 = _local1._y - ob._y;
var _local3 = _local1._x - ob._x;
var _local4 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
if ((_local4 < _local7) || (!_local6)) {
_local7 = _local4;
_local6 = _local1;
}
}
return(_local6);
}
function checkPlayerVersion() {
var _local1 = Number(getVersion().split(" ", 2)[1].split(",", 1)[0]);
if (_local1 >= 9) {
please_upgrade._visible = false;
}
}
function attemptLoad() {
reloadSave();
if (save) {
saving_disabled._visible = false;
delete eval (saving_disabled.onEnterFrame());
} else {
saving_disabled._visible = true;
saving_disabled.onRelease = function () {
System.showSettings(1);
};
saving_disabled.onRollOver = function () {
_root.attemptLoad();
};
}
setupMenu(true);
letters.onLightAll = function () {
if (winsign._currentframe == 1) {
letters.glow();
winsign.play();
winsign.onFall = function () {
xmas.play();
};
xmas.onFall = function () {
sky.play();
lake.sky.play();
};
}
};
}
function setupMenu(maze_enabled) {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
_root.menu = _local2;
_local2.customItems.push(new ContextMenuItem("Forget my Progress", function () {
save.clear();
conn.send("jigban60", "forget");
gotoAndPlay ("reload");
}));
jaytrix = new ContextMenuItem(maze_text, function () {
freakout();
jaytrix.visible = false;
});
jaytrix.separatorBefore = maze_sep;
if (maze_enabled) {
_local2.customItems.push(jaytrix);
}
}
_global.conn = new LocalConnection();
conn.connect("jigban150");
conn.light = function (letter) {
trace(letter);
letters.light(letter, false, true);
};
stop();
debug_line = "";
var i = 0;
while (i <= 5) {
_root["shield" + i].useHandCursor = false;
i++;
}
_global.recolour = function (cl) {
if (typeof(cl) != "movieclip") {
return(undefined);
}
for (i in cl) {
recolour(cl[i]);
}
var _local2 = cl.transform.colorTransform;
_local2.redMultiplier = Math.random() * 2;
_local2.greenMultiplier = Math.random() * 2;
_local2.blueMultiplier = Math.random() * 2;
_local2.redOffset = (Math.random() * 255) - 128;
_local2.greenOffset = (Math.random() * 255) - 128;
_local2.blueOffset = (Math.random() * 255) - 128;
cl.transform.colorTransform = _local2;
};
maze_sep = true;
if (String($version).indexOf("WIN") != -1) {
maze_text = "the jaytrix has you";
} else if (String($version).indexOf("MAC") != -1) {
maze_text = "do a jig";
} else {
maze_text = "jay is MOST DEFINITELY games";
maze_sep = false;
}
_global.bound = function (num, mag) {
if (num > mag) {
return(mag);
}
if (num < (-mag)) {
return(-mag);
}
return(num);
};
_global.debug = function (txt) {
debug_line = debug_line + txt;
};
_global.drag = function (clip, hit, use_hit_point) {
hit.onPress = function () {
_global.holding = clip;
Mouse.addListener(clip);
if (use_hit_point) {
clip.dragX = clip._xmouse;
clip.dragY = clip._ymouse;
} else {
clip.dragX = 0;
clip.dragY = 0;
}
clip.onDrag();
clip.onMouseMove = function () {
this._x = this._parent._xmouse - this.dragX;
this._y = this._parent._ymouse - this.dragY;
updateAfterEvent();
};
clip.onMouseMove();
};
hit.onRelease = (hit.onReleaseOutside = function () {
_global.holding = null;
Mouse.removeListener(clip);
clip.onMouseMove = null;
for (i in targets) {
var _local3 = targets[i];
if (_local3.item == clip) {
var _local5 = _root._xmouse;
var _local4 = _root._ymouse;
if (_local3.home.hitTest(_local5, _local4, true)) {
_local3.action(_local3.home);
}
}
}
clip.onDrop();
});
};
_global.targets = new Array();
_global.addDragTarget = function (nitem, nhome, naction) {
var _local2 = {item:nitem, home:nhome, action:naction};
_global.targets.push(_local2);
};
_global.reloadSave = function () {
_global.save = SharedObject.getLocal("jig-banner", "/");
};
checkPlayerVersion();
attemptLoad();
_visible = false;
onEnterFrame = function () {
_visible = true;
main();
delete onEnterFrame;
};
_root.tabChildren = false;
Frame 81
function nobst(y, id) {
var _local2 = obst.getNextHighestDepth();
var _local1 = obst.attachMovie(id, "n" + _local2, _local2);
_local1._x = -60;
_local1._y = y;
}
function hit() {
delete obst.onEnterFrame;
delete rocket.onMouseMove;
rocket.gotoAndStop("prang");
rocket.vx = 4;
rocket.vy = 0;
rocket.onEnterFrame = function () {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
this.vy = this.vy + 2;
this._rotation = this._rotation + 22;
this._visible = !this._visible;
if (this._y > 200) {
delete this.onEnterFrame;
obst.removeMovieClip();
_root.back_from_rocket_game = true;
_root.won_last_game = false;
_root.gotoAndStop("start");
}
};
}
stop();
rocket._x = 750;
Mouse.addListener(rocket);
rocket.onMouseMove = function () {
this._y = this._parent._ymouse + (this._height / 2);
updateAfterEvent();
};
var obst = this.createEmptyMovieClip("obstacles", this.getNextHighestDepth());
obst.speed = 2;
obst.script = [50, ["Obst1", 50, 20], 50, ["Obst2", 100], 30, ["Obst2", 30], 30, ["Obst1", 20, 50, 120], 40, ["Obst1", 120, 80, 50], 10, ["Obst2", 70], 20, ["Obst2", 100], 20, ["Obst2", 20], 20, ["Obst2", 30], 20, ["Obst1", 20], 0, ["Obst2", 100], 20, ["Obst1", 50, 20, 100], 30, ["Obst1", 120, 80, 50], 15, ["Obst1", 10, 40, 70], 15, ["Obst1", 120, 80, 50], 15, ["Obst1", 10, 40, 70], 15, ["Obst1", 120, 80, 10], 10, ["Obst1", 60, 90], 15, ["Obst1", 10, 120], 22, ["Obst2", 70], 22, ["Obst3", -80, 20, 100], 26, ["Obst3", 40, 90], 26, ["Obst3", 60, -40], 26, ["Obst3", 80], 26, ["Obst3", 120, 30, -70, -150], 26, ["Obst2", 10, 120], 110, ["Obst1", 135], 10, ["Obst1", 125], 10, ["Obst1", 125], 10, ["Obst1", 125], 10, ["Obst1", 125], ["Obst3", -30], 10, ["Obst1", 125], 10, ["Obst1", 125], ["Obst5", 9], 10, 10, ["Obst4", 30], 10, 10, ["Obst1", 125], 10, ["Obst1", 125], ["Obst4", 70], 10, ["Obst1", 125], ["Obst5", 9], 10, ["Obst1", 125], 10, ["Obst1", 125], ["Obst4", 40], 50, ["Obst2", 10, 120], 20, ["Obst2", 60], 110, null];
obst.script_ptr = 0;
obst.timer = 0;
obst.onEnterFrame = function () {
if (this.timer > 0) {
this.timer--;
}
if (this.timer == 0) {
var _local8 = this.script[this.script_ptr];
this.script_ptr++;
if (typeof(_local8) == "number") {
this.timer = _local8;
} else if (_local8 == null) {
delete rocket.onMouseMove;
this.timer = -1;
rocket.onAnimFin = function () {
obst.removeMovieClip();
_root.back_from_rocket_game = true;
_root.won_last_game = true;
_root.gotoAndStop("start");
};
rocket.gotoAndPlay("descend");
} else {
var _local10 = _local8[0];
var _local4 = 1;
while (_local4 < _local8.length) {
nobst(_local8[_local4], _local10);
_local4++;
}
}
}
for (var _local4 in this) {
var _local3 = this[_local4];
if (typeof(_local3) == "movieclip") {
_local3._x = _local3._x + this.speed;
_local3._y = _local3._y + _local3.vy;
_local3._x = _local3._x + _local3.vx;
var _local6 = (rocket._x + (rocket._width / 2)) - _local3._x;
var _local5 = (rocket._y - (rocket._height / 2)) - _local3._y;
var _local9 = (_local6 * _local6) + (_local5 * _local5);
var _local7 = _local3.radius + rocket.radius;
if (_local9 < (_local7 * _local7)) {
hit();
}
}
}
this._parent.bg._x = this._parent.bg._x + (this.speed / 8);
rocket._x = rocket._x - 0.4;
if (this.speed < 8) {
this.speed = this.speed + 0.1;
}
};
rocket.gotoAndStop("closed");
Frame 168
function vecAdd(v0, v1) {
return([v0[0] + v1[0], v0[1] + v1[1]]);
}
function vecSub(v0, v1) {
return([v0[0] - v1[0], v0[1] - v1[1]]);
}
function vecDot(v0, v1) {
return((v0[0] * v1[0]) + (v0[1] * v1[1]));
}
function vecCross(v0, v1) {
return((v0[0] * v1[1]) - (v0[1] * v1[0]));
}
function vecLen(v0) {
return(msqrt(vecLenSq(v0)));
}
function vecLenSq(v0) {
return((v0[0] * v0[0]) + (v0[1] * v0[1]));
}
function vecScale(v, sc) {
return([v[0] * sc, v[1] * sc]);
}
function vecNorm(v) {
var _local1 = vecLen(v);
return([v[0] / _local1, v[1] / _local1]);
}
function vecClip(cl) {
return([cl._x, cl._y]);
}
function vecClipGlob(cl) {
var _local1 = {x:0, y:0};
cl.localToGlobal(_local1);
return([_local1.x, _local1.y]);
}
function range() {
return([null, null]);
}
function rangePush(r, n) {
if (r[0] == null) {
r[0] = n;
r[1] = n;
} else {
if (n < r[0]) {
r[0] = n;
}
if (n > r[1]) {
r[1] = n;
}
}
}
function rangeIntersect(r0, r1) {
if (r0[1] < r1[0]) {
return(false);
}
if (r1[1] < r0[0]) {
return(false);
}
var _local1 = r0[1] - r1[0];
var _local3 = r0[0] - r1[1];
if (_local1 < (-_local3)) {
return(_local1);
}
return(_local3);
}
function pjCircle(axis, cc, cr) {
var _local1 = vecDot(axis, cc);
var _local3 = _local1 - cr;
var _local2 = _local1 + cr;
return([_local3, _local2]);
}
function pjSquare(axis, sq0, sq1) {
var _local1 = [null, null];
rangePush(_local1, pjPoint(axis, sq0));
rangePush(_local1, pjPoint(axis, sq1));
rangePush(_local1, pjPoint(axis, [sq0[0], sq1[1]]));
rangePush(_local1, pjPoint(axis, [sq1[0], sq0[1]]));
return(_local1);
}
function pjRotSquare(axis, sq0, sq1, sq2, sq3) {
var _local1 = [null, null];
rangePush(_local1, pjPoint(axis, sq0));
rangePush(_local1, pjPoint(axis, sq1));
rangePush(_local1, pjPoint(axis, sq2));
rangePush(_local1, pjPoint(axis, sq3));
return(_local1);
}
function colRotSquareCircle(sq0, sq1, sq2, sq3, cc, cr) {
var _local18 = vecSub(sq0, cc);
var _local17 = vecSub(sq1, cc);
var _local16 = vecSub(sq2, cc);
var _local15 = vecSub(sq3, cc);
var _local14 = vecSub(sq1, sq0);
var _local13 = vecSub(sq2, sq0);
var _local6 = [_local14, _local13, _local18, _local17, _local16, _local15];
var _local3 = [null, null];
for (a in _local6) {
var _local2 = vecNorm(_local6[a]);
var _local5 = pjRotSquare(_local2, sq0, sq1, sq2, sq3);
var _local4 = pjCircle(_local2, cc, cr);
var _local1 = rangeIntersect(_local5, _local4);
if (_local1 == false) {
return(false);
}
if (((_local1 * _local1) < vecLenSq(_local3)) || (_local3[0] == null)) {
_local3 = vecScale(_local2, _local1);
}
}
return(_local3);
}
function colSquareCircle(sq0, sq1, cc, cr) {
var _local14 = vecSub(sq0, cc);
var _local13 = vecSub(sq1, cc);
var _local12 = vecSub([sq0[0], sq1[1]], cc);
var _local11 = vecSub([sq1[0], sq0[1]], cc);
var _local6 = [[0, 1], [1, 0], _local14, _local13, _local12, _local11];
var _local3 = [null, null];
for (a in _local6) {
var _local2 = vecNorm(_local6[a]);
var _local5 = pjSquare(_local2, sq0, sq1);
var _local4 = pjCircle(_local2, cc, cr);
var _local1 = rangeIntersect(_local5, _local4);
if (_local1 == false) {
return(false);
}
if (((_local1 * _local1) < vecLenSq(_local3)) || (_local3[0] == null)) {
_local3 = vecScale(_local2, _local1);
}
}
return(_local3);
}
function colCircleCircle(c0, r0, c1, r1) {
var _local1 = vecNorm(vecSub(c1, c0));
var _local4 = pjCircle(_local1, c0, r0);
var _local3 = pjCircle(_local1, c1, r1);
var _local2 = rangeIntersect(_local4, _local3);
if (_local2 == false) {
return(false);
}
return(vecScale(_local1, _local2));
}
function pushActor(ob) {
if (ob.radius == undefined) {
ob.radius = ob._height / 3;
}
ob.pos = [ob._x, ob._y];
ob.vel = [0, 0];
actors.push(ob);
}
function pushColTarget(ob) {
ob._visible = SHOW_HULLS;
if (ob.circular) {
ob.pos = [ob._x, ob._y];
ob.radius = ob._width / 2;
col_targets.push(ob);
} else {
var _local1 = 0;
while (_local1 < 4) {
var _local4 = ob["s" + _local1];
var _local2 = {x:0, y:0};
_local4.localToGlobal(_local2);
ob["p" + _local1] = [_local2.x, _local2.y];
_local1++;
}
col_targets.push(ob);
}
}
function pushItemTarget(ob) {
ob._visible = SHOW_HULLS;
item_targets.push(ob);
}
function spawnItem(id) {
var _local2 = [];
for (i in item_targets) {
if (!item_targets[i].item) {
_local2.push(item_targets[i]);
}
}
if (_local2.length == 0) {
return(undefined);
}
var _local3 = _local2[random(_local2.length)];
var _local4 = lev.getNextHighestDepth();
var _local1 = lev.attachMovie(id, "o" + _local4, _local4);
_local1.radius = _local1._height / 2;
_local1._x = _local3._x;
_local1._y = _local3._y;
_local1.id = id;
_local1.node = _local3;
_local3.item = _local1;
_local1.pos = [_local1._x, _local1._y];
_local1.vel = [0, 0];
actors.push(_local1);
return(_local1);
}
function killItem(cl) {
cl.node.item = null;
cl.removeMovieClip();
}
function onMouseDown() {
mouse_down = true;
}
function onMouseUp() {
mouse_up = true;
}
function init() {
spawnItem("UW Coin");
}
function getRunVector() {
var _local5 = man._xmouse;
var _local2 = Math.abs(_local5);
var _local4 = ((_local5 > 0) ? 1 : -1);
var _local3;
_local2 = _local2 - MX_TOLERANCE;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > MX_MAX) {
_local2 = MX_MAX;
}
_local2 = _local2 * MX_FACTOR;
if (_local4 == -1) {
_local3 = this._xmouse;
} else {
_local3 = 750 - this._xmouse;
}
_local3 = 1 / _local3;
_local3 = _local3 * MX_EDGE_FACTOR;
if (_local3 > MX_EDGE_MAX) {
_local3 = MX_EDGE_MAX;
}
_local2 = _local2 + _local3;
man.gotoAndStop(((_local2 > 0.1) ? (_local4 + 2) : 2));
return([_local2 * _local4, 0]);
}
msqrt = Math.sqrt;
var vroo = 0;
pjPoint = vecDot;
MX_TOLERANCE = 10;
MX_MAX = 200;
MX_FACTOR = 0.007;
MX_EDGE_FACTOR = 20;
MX_EDGE_MAX = 3;
JUMP_STRENGTH = 13;
PLAYER_TOP_SPEED = 6;
SHOW_HULLS = false;
lev.gotoAndStop(random(lev._totalframes) + 1);
var man = lev.man;
items_collected = 0;
gravity = [0, 1];
actors = [];
oxygen = 30;
stop();
var col_targets = [];
var item_targets = [];
man.onHitActor = function (other) {
switch (other.id) {
case "UW Coin" :
items_collected++;
killItem(other);
var _local2 = new Sound(this);
_local2.attachSound("_pop.wav");
_local2.start();
oxygen = oxygen + 10;
if (oxygen >= 100) {
oxygen = 100;
spawnItem("UW MegaCoin");
} else {
spawnItem("UW Coin");
}
break;
case "UW MegaCoin" :
killItem(other);
man.win();
}
};
man.getHurt = function () {
if (this.hurt > 0) {
return(undefined);
}
this.gotoAndStop(4);
this.hurt = 25;
oxygen = oxygen / 2;
};
man.process = function () {
if (!man.locked) {
var _local1 = getRunVector();
man.vel = vecAdd(man.vel, _local1);
if (mouse_down && (man.canjump)) {
if (!needs_releasing) {
man.vel = vecAdd(man.vel, [0, -JUMP_STRENGTH]);
man.canjump = false;
mouse_down = false;
needs_releasing = true;
}
}
if (mouse_up && (needs_releasing)) {
needs_releasing = false;
mouse_up = false;
}
}
if (doxygen == undefined) {
doxygen = 0;
} else {
doxygen = doxygen + ((oxygen - doxygen) / 8);
}
meter.mgx._xscale = doxygen;
meter.mgy._y = doxygen;
if (man.hurt) {
man.hurt--;
if (man.hurt > 0) {
man._visible = !man._visible;
} else {
man._visible = true;
}
}
};
man.win = function () {
man._visible = true;
man.onAnimFin = function () {
_root.back_from_underwater_game = true;
_root.won_last_game = true;
_root.gotoAndStop("start");
};
man.gotoAndPlay("win");
delete ctrl.onEnterFrame;
delete man;
actors = [];
};
man.lose = function () {
man._visible = true;
man.onAnimFin = function () {
_root.back_from_underwater_game = true;
_root.won_last_game = false;
_root.gotoAndStop("start");
};
man.gotoAndPlay("lose");
delete man;
delete ctrl.onEnterFrame;
actors = [];
};
var ctrl = this.createEmptyMovieClip("", 0);
ctrl.onEnterFrame = function () {
if (init) {
init();
delete init;
}
oxygen = oxygen - 0.1;
if (oxygen < 0) {
man.lose();
}
for (i in actors) {
var _local1 = actors[i];
if (_local1.process) {
_local1.process();
}
if (_local1.still) {
continue;
}
_local1.vel = vecAdd(_local1.vel, gravity);
_local1.vel = vecScale(_local1.vel, 0.9);
_local1.pos = vecAdd(_local1.pos, _local1.vel);
if (_local1.vel[1] > 8) {
_local1.canjump = false;
}
for (j in col_targets) {
wall = col_targets[j];
var _local3;
if (wall.circular) {
_local3 = colCircleCircle(wall.pos, wall.radius, _local1.pos, _local1.radius);
} else {
_local3 = colRotSquareCircle(wall.p0, wall.p1, wall.p2, wall.p3, _local1.pos, _local1.radius);
}
if (_local3) {
_local1.pos = vecAdd(_local1.pos, _local3);
_local1.vel = vecAdd(_local1.vel, _local3);
if (_local1.onHitWall) {
_local1.onHitWall(_local3);
}
if (_local3[1] < 0) {
_local1.canjump = true;
}
}
}
for (j in actors) {
if (i == j) {
continue;
}
var _local2 = actors[j];
var _local3 = colCircleCircle(_local1.pos, _local1.radius, _local2.pos, _local2.radius);
if (_local3) {
_local1.onHitActor(_local2);
}
}
_local1._x = _local1.pos[0];
_local1._y = _local1.pos[1];
}
};
Symbol 20 MovieClip [Flamelet] Frame 1
function onEnterFrame() {
_y = (_y + (0.3 + Math.random()));
_x = (_x + ((Math.random() * 2) - 1));
_xscale = (_xscale - 2);
_yscale = (_yscale - 2);
if (_xscale < 5) {
this.removeMovieClip();
}
}
Symbol 40 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 62
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 51
onFire();
Symbol 52 MovieClip Frame 96
gotoAndStop (1);
Symbol 72 MovieClip Frame 1
function peek() {
if (pos == "idle") {
come_out = false;
play();
}
}
function fly() {
if (pos == "idle") {
come_out = true;
play();
}
}
pos = "idle";
stop();
Symbol 72 MovieClip Frame 2
pos = "moving";
Symbol 72 MovieClip Frame 16
if (come_out) {
gotoAndPlay ("fly");
}
Symbol 72 MovieClip Frame 24
gotoAndStop ("idle");
Symbol 72 MovieClip Frame 38
hit.onPress = function () {
onHit();
};
Symbol 77 MovieClip Frame 1
stop();
hit.onPress = function () {
play();
_parent.stop();
_parent.onGetHit();
delete _parent.onEnterFrame;
};
Symbol 77 MovieClip Frame 7
this._parent.gotoAndStop(1);
Symbol 78 MovieClip Frame 1
stop();
delay = 14;
Symbol 78 MovieClip Frame 6
onExtend();
Symbol 78 MovieClip Frame 7
timer = delay;
stop();
onEnterFrame = function () {
if ((timer--) <= 0) {
delete onEnterFrame;
play();
}
};
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
stop();
Symbol 88 MovieClip Frame 1
function rustle() {
play();
}
stop();
hit.onPress = function () {
onActivate();
};
Symbol 88 MovieClip Frame 5
onRustle();
Symbol 105 MovieClip Frame 1
function fall() {
gotoAndPlay ("fall");
}
stop();
lit = true;
hit.onPress = function () {
lit = !lit;
if (lit) {
onLight();
gotoAndStop ("lit");
} else {
onUnlight();
gotoAndStop ("unlit");
}
};
Symbol 105 MovieClip Frame 35
gotoAndStop ("gone");
onFall();
Symbol 107 MovieClip Frame 1
for (i in this) {
var cl = this[i];
var angle = ((Math.random() * 2) * Math.PI);
var c = Math.cos(angle);
var s = Math.sin(angle);
var f1 = 0.213;
var f2 = 0.715;
var f3 = 0.072;
var mat = Array((f1 + (c * (1 - f1))) + (s * (-f1)), (f2 + (c * (-f2))) + (s * (-f2)), (f3 + (c * (-f3))) + (s * (1 - f3)), 0, 0, (f1 + (c * (-f1))) + (s * 0.143), (f2 + (c * (1 - f2))) + (s * 0.14), (f3 + (c * (-f3))) + (s * -0.283), 0, 0, (f1 + (c * (-f1))) + (s * (-(1 - f1))), (f2 + (c * (-f2))) + (s * f2), (f3 + (c * (1 - f3))) + (s * f3), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
var cf = (new flash.filters.ColorMatrixFilter(mat));
cl.filters = [cf];
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 108 MovieClip Frame 20
stop();
onFall();
Symbol 124 MovieClip Frame 1
function suck() {
if (!lit) {
play();
}
}
sucking = false;
stop();
Symbol 124 MovieClip Frame 2
sucking = true;
Symbol 124 MovieClip Frame 46
gotoAndStop (1);
Symbol 124 MovieClip Frame 47
sucking = false;
Symbol 127 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
butt.useHandCursor = false;
butt.onPress = function () {
_parent.mtail.suck();
};
Symbol 145 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 1
stop();
flame._visible = false;
firebutt._visible = false;
Symbol 151 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 1
function glow() {
var _local2 = new flash.filters.GlowFilter(16772710, 20, 5, 5, 0.8, 2, false, false);
for (i in this) {
this[i].filters = [_local2];
}
}
function light(lname, no_event, no_send) {
var _local2 = this[lname];
reloadSave();
save.data.letters[lname] = true;
save.flush();
if (!no_send) {
conn.send("jigban60", "light", lname);
}
_local2.lit = true;
_local2.gotoAndStop("lit");
if (!no_event) {
_local2.onLight();
}
if (_local2.tail) {
_local2.tail.lit = true;
_local2.tail.gotoAndStop("lit");
}
onLightOne();
if (countLitLetters() == 14) {
onLightAll();
}
}
function countLitLetters() {
var _local2 = 0;
for (i in this) {
if (this[i].lit && (i.substr(1) != "tail")) {
_local2++;
}
}
return(_local2);
}
function init() {
if (save) {
if (!save.data.letters) {
debug("No record");
save.data.letters = {};
} else {
debug(("Found record " + save.getSize()) + "b");
var _local2 = [];
for (i in save.data.letters) {
_local2.push(this[i]);
light(i, true);
}
for (i in _local2) {
_local2[i].onLight();
}
}
} else {
debug("Can't load");
}
}
y.tail = ytail;
m.tail = mtail;
p.tail = ptail;
Symbol 183 MovieClip Frame 1
stop();
radius = 10;
Symbol 183 MovieClip Frame 39
stop();
this._visible = false;
onTakeoff();
Symbol 183 MovieClip Frame 88
stop();
onAnimFin();
Symbol 183 MovieClip Frame 105
stop();
_visible = false;
onExplode();
Symbol 183 MovieClip Frame 154
gotoAndStop ("idle");
Symbol 187 MovieClip Frame 1
stop();
hit.onRollOver = function () {
onHover();
play();
};
hit.useHandCursor = false;
Symbol 197 MovieClip Frame 67
onRipple();
Symbol 198 MovieClip Frame 1
stop();
Symbol 199 MovieClip Frame 1
function init() {
ripples._visible = false;
}
function makeActive(t) {
ripples._visible = t;
}
Symbol 202 MovieClip Frame 1
vx = 0;
vy = 0;
radius.useHandCursor = false;
onEnterFrame = function () {
if (locked) {
vx = (vy = 0);
} else if (vx || (vy)) {
_x = (_x + vx);
_y = (_y + vy);
vx = vx * 0.9;
vy = vy * 0.9;
if (_y < 100) {
_y = 100;
vy = Math.abs(vy);
}
if (_y > 128) {
_y = 128;
vy = -Math.abs(vy);
}
if (_x < 425) {
_x = 425;
vx = Math.abs(vx);
}
if ((((_root.frog.sitting_on == this) && (_root.frog.pos == "Pad")) && (_root.frog.shape == "Man")) && (_x < 445)) {
_x = 445;
vx = Math.abs(vx);
}
if (_x > 632) {
_x = 632;
vx = -Math.abs(vx);
}
if (_y > ((_x / 4.3) + 5)) {
_y = ((_x / 4.3) + 5);
}
if (Math.abs(vx) < 0.001) {
vx = 0;
}
if (Math.abs(vy) < 0.001) {
vy = 0;
}
}
};
radius.onRollOver = function () {
var _local2 = -_xmouse;
var _local1 = -_ymouse;
vx = vx + (_local2 / 20);
vy = vy + (_local1 / 20);
};
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 7
onAnimFin();
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 8
onAnimFin();
Symbol 207 MovieClip Frame 1
function registerEvents() {
hit.onPress = function () {
start_x = this._parent._parent._x;
start_y = this._parent._parent._y;
startDrag (this._parent._parent);
this._parent._parent.onDrag();
};
hit.onRelease = function () {
stopDrag();
var _local6 = _parent._x;
var _local4 = _parent._y;
var _local3 = _local6 - start_x;
var _local2 = _local4 - start_y;
var _local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local5 > 10) {
rock.play();
rock.onAnimFin = function () {
_parent.resetLocation();
_parent.setTo("none");
};
} else {
_parent.resetLocation();
}
};
}
stop();
registerEvents();
Symbol 207 MovieClip Frame 8
registerEvents();
Symbol 208 MovieClip Frame 1
function fall(what) {
if (state == "none") {
setTo(what);
gotoAndPlay ("Fall");
return(true);
}
return(false);
}
function setTo(what) {
state = what;
rock.gotoAndStop(what);
}
function resetLocation() {
_x = rest_x;
_y = rest_y;
}
stop();
if (rest_x == undefined) {
rest_x = _x;
rest_y = _y;
}
Symbol 208 MovieClip Frame 22
onLand();
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 20
stop();
onFall();
Symbol 216 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 1
function onEnterFrame() {
var _local9 = _parent.firefly_target;
var _local4 = {x:0, y:0};
_local9.localToGlobal(_local4);
_root.globalToLocal(_local4);
if ((_local4.x && (_local4.y)) && (_local9)) {
var _local11 = (_local4.x - this._x) * 0.05;
var _local10 = (_local4.y - this._y) * 0.05;
vx = vx + ((_local11 + Math.random()) - 0.5);
vy = vy + ((_local10 + Math.random()) - 0.5);
if (Math.abs(vx) > 4) {
vx = ((vx > 0) ? 4 : -4);
}
if (Math.abs(vy) > 4) {
vy = ((vy > 0) ? 4 : -4);
}
if (_parent.firefly_trap) {
var _local8 = _parent.firefly_trap_x0 + 2;
var _local6 = _parent.firefly_trap_x1 - 2;
var _local7 = _parent.firefly_trap_y0 + 2;
var _local5 = _parent.firefly_trap_y1 - 2;
if (_x < _local8) {
_x = _local8;
vx = 0;
}
if (_x > _local6) {
_x = _local6;
vx = 0;
}
if (_y < _local7) {
_y = _local7;
vy = 0;
}
if (_y > _local5) {
_y = _local5;
vy = 0;
}
}
} else {
_parent.firefly_target = _parent.firefly_home;
}
_x = (_x + vx);
_y = (_y + vy);
}
vx = (Math.random() * 5) - 2.5;
vy = (Math.random() * 5) - 2.5;
_yscale = (50 + random(40));
_xscale = (50 + random(40));
_alpha = 80;
this.cacheAsBitmap = true;
Symbol 220 MovieClip Frame 1
hit.onPress = function () {
onActivate();
};
Symbol 231 MovieClip Frame 1
function emerge() {
play();
}
stop();
Symbol 231 MovieClip Frame 90
if (_root.letters.mtail.sucking) {
gotoAndPlay ("m-suck");
}
Symbol 231 MovieClip Frame 109
if (_root.pile.isdown) {
gotoAndPlay ("blocked");
}
Symbol 231 MovieClip Frame 133
onGreenAppear();
Symbol 231 MovieClip Frame 185
onReachY();
Symbol 231 MovieClip Frame 210
gotoAndStop ("idle");
Symbol 231 MovieClip Frame 227
onReachM();
gotoAndStop ("idle");
Symbol 231 MovieClip Frame 258
gotoAndStop ("idle");
Symbol 231 MovieClip Frame 310
gotoAndStop ("idle");
Symbol 233 MovieClip Frame 1
stop();
hit.useHandCursor = false;
hit.onRollOver = function () {
play();
};
Symbol 235 MovieClip Frame 1
Symbol 237 MovieClip Frame 1
function explode() {
play();
}
stop();
Symbol 237 MovieClip Frame 36
onExplode();
Symbol 237 MovieClip Frame 41
delete this.onEnterFrame;
this._visible = false;
stop();
Symbol 323 MovieClip Frame 1
function reset() {
_x = start_x;
_y = start_y;
gotoAndStop ("idle");
pos = "Right";
shape = "Frog";
}
function fish() {
onFishStart();
}
function anthropomorphize() {
if ((pos == "Right") || (pos == "Pad")) {
shape = "Man";
gotoAndPlay ("change");
} else if (pos == "a") {
gotoAndPlay ("disappear");
}
}
function hopTo(pad) {
var pre_anim_length = 4;
var anim_length = 9;
var _local1 = pad._y - _y;
var _local2 = pad._x - _x;
var dyi = (_local1 / anim_length);
var dxi = (_local2 / anim_length);
sitting_on = null;
pos = "Jumping";
frame = 0;
gotoAndPlay ("jump");
onEnterFrame = function () {
if ((frame++) > pre_anim_length) {
if (frame > (pre_anim_length + anim_length)) {
onAnimFin();
} else {
_y = (_y + dyi);
_x = (_x + dxi);
}
}
};
onAnimFin = function () {
sitting_on = pad;
pos = "Pad";
onHopFin();
onEnterFrame = function () {
_x = pad._x;
_y = pad._y;
};
};
}
if (pos == undefined) {
pos = "Right";
start_x = _x;
start_y = _y;
sitting_on = null;
shape = "Frog";
}
stop();
hit.onPress = function () {
onActivate();
};
Symbol 323 MovieClip Frame 8
hit.onPress = function () {
play();
};
Symbol 323 MovieClip Frame 64
gotoAndStop ("a");
Symbol 323 MovieClip Frame 93
stop();
this._visible = false;
Symbol 323 MovieClip Frame 94
stop();
pos = "a";
hit.onPress = function () {
play();
};
Symbol 323 MovieClip Frame 112
onLick();
Symbol 323 MovieClip Frame 118
gotoAndStop ("a");
onLickFin();
Symbol 323 MovieClip Frame 136
onAnimFin();
gotoAndStop ("idle");
onLand();
Symbol 323 MovieClip Frame 157
gotoAndStop ("man");
Symbol 323 MovieClip Frame 158
hit.onPress = function () {
if (pos == "Pad") {
gotoAndPlay ("start-fishing");
} else {
onActivate();
}
};
Symbol 323 MovieClip Frame 181
gotoAndStop ("man");
Symbol 323 MovieClip Frame 221
stop();
hit.onPress = fish;
Symbol 323 MovieClip Frame 264
gotoAndStop ("fishing");
onFishEnd();
Symbol 323 MovieClip Frame 287
onFishPull();
Symbol 323 MovieClip Frame 299
gotoAndStop ("fishing");
onFishEnd();
Symbol 323 MovieClip Frame 372
onEnterRocket();
Symbol 323 MovieClip Frame 379
stop();
this._visible = false;
Symbol 326 MovieClip Frame 1
function spit() {
var _local2 = {x:0, y:0};
tip.localToGlobal(_local2);
_root.globalToLocal(_local2);
var _local3 = _root.getNextHighestDepth();
var _local4 = _root.attachMovie("Flamelet", "p" + _local3, _local3);
_local4._x = _local2.x;
_local4._y = _local2.y;
}
if (ticks == undefined) {
ticks = 30;
} else if (ticks > 0) {
spit();
ticks--;
if (ticks <= 0) {
gotoAndPlay ("Burnout");
onEnterFrame = function () {
spit();
};
}
}
Symbol 326 MovieClip Frame 8
gotoAndPlay (1);
Symbol 326 MovieClip Frame 15
delete onEnterFrame;
onBurnOut();
Symbol 326 MovieClip Frame 16
stop();
_parent._parent.setItem("none");
Symbol 327 MovieClip Frame 1
stop();
Symbol 331 MovieClip [UW MegaCoin] Frame 1
still = true;
Symbol 467 MovieClip Frame 1
function score(txt) {
score_text = txt;
gotoAndPlay ("Score");
}
function enablePile(t) {
phit._visible = t;
}
function setItem(what) {
holding = what;
item.gotoAndStop(what);
}
function onWaterReturn() {
this.onCExplode = function () {
_root.letters.light("C");
};
this.gotoAndPlay("Got it");
}
function fling() {
if (pos == "Right") {
gotoAndPlay ("Right Fling");
} else if (pos == "Middle") {
gotoAndPlay ("Middle Fling");
}
}
pos = "Middle";
hit.onPress = function () {
if (!locked) {
gotoAndPlay ("Go Right");
}
};
phit.onPress = function () {
if (holding == "firestick") {
gotoAndPlay ("Throw");
} else {
gotoAndPlay ("Look");
}
};
if (!inited) {
stop();
setItem("none");
enablePile(false);
inited = true;
}
if (_root.back_from_underwater_game) {
if (_root.won_last_game) {
trace(onWaterReturn);
_root.back_from_underwater_game = false;
onWaterReturn();
}
}
item.stick.onBurnOut = function () {
onBurnOut();
setItem("none");
};
Symbol 467 MovieClip Frame 52
onCExplode();
Symbol 467 MovieClip Frame 57
gotoAndStop ("Middle");
Symbol 467 MovieClip Frame 98
stop();
onEnterLake();
Symbol 467 MovieClip Frame 126
gotoAndStop ("Middle");
setItem("none");
onThrow();
Symbol 467 MovieClip Frame 154
gotoAndStop ("Middle");
Symbol 467 MovieClip Frame 155
pos = "Moving";
Symbol 467 MovieClip Frame 231
pos = "Right";
stop();
if (go_left_flag) {
go_left_flag = false;
gotoAndPlay ("Go Back Left");
}
hit.onPress = function () {
gotoAndPlay ("Go Back Left");
};
hit2.onPress = function () {
if (holding != "firestick") {
gotoAndPlay ("Get Stick");
}
};
Symbol 467 MovieClip Frame 239
setItem("none");
Symbol 467 MovieClip Frame 288
gotoAndStop ("Right");
Symbol 467 MovieClip Frame 289
pos = "Moving";
Symbol 467 MovieClip Frame 369
gotoAndStop ("Middle");
Symbol 467 MovieClip Frame 377
setItem("firestick");
Symbol 467 MovieClip Frame 388
gotoAndStop ("Right");
onGetStick();
Symbol 467 MovieClip Frame 403
board.text = score_text;
Symbol 467 MovieClip Frame 441
gotoAndStop ("Middle");
onScoreFin();
Symbol 467 MovieClip Frame 474
onFlareExplode();
Symbol 467 MovieClip Frame 475
gotoAndStop ("Middle");
Symbol 524 MovieClip Frame 1
function init() {
if (save.data.pile) {
gotoAndStop ("down");
}
}
stop();
Symbol 524 MovieClip Frame 35
stop();
isdown = true;
save.data.pile = true;
onFall();
Symbol 524 MovieClip Frame 53
onBurn();
Symbol 524 MovieClip Frame 62
stop();
save.data.pile = false;
isdown = false;
Symbol 529 MovieClip Frame 1
if (startx == undefined) {
startx = _x;
starty = _y;
}
onDrop = function () {
var _local2 = _x - startx;
var _local1 = _y - starty;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
_x = startx;
_y = starty;
if (_local3 > 10) {
gotoAndStop ("idle");
}
};
function drop() {
dropped = true;
play();
}
stop();
dropped = false;
Symbol 529 MovieClip Frame 11
function light() {
gotoAndStop ("Dropped");
nextFrame();
}
function unlight() {
gotoAndStop ("Dropped");
}
stop();
drag(this, hit);
Symbol 531 MovieClip Frame 1
stop();
this._alpha = 10;
hit.onRollOver = function () {
_alpha = 70;
};
hit.onRollOut = function () {
_alpha = 10;
};
hit.onPress = function () {
onHit();
play();
};
hit.useHandCursor = false;
Symbol 531 MovieClip Frame 12
gotoAndStop (1);
Symbol 531 MovieClip Frame 20
this._visible = false;
stop();
Symbol 537 MovieClip Frame 1
function sing(pitch) {
gotoAndStop(pitch + 2);
this.onEnterFrame = function () {
gotoAndStop (1);
delete this.onEnterFrame;
};
}
stop();
Symbol 540 MovieClip Frame 1
stop();
hit.onPress = function () {
gotoAndStop (2);
onSwitch();
};
Symbol 541 MovieClip Frame 1
stop();
Symbol 544 MovieClip Frame 1
function init() {
if (save.data.pile != undefined) {
this._visible = false;
}
}
stop();
hit.onPress = function () {
play();
};
Symbol 544 MovieClip Frame 13
stop();
onHit();
Symbol 549 Button
on (press) {
getURL ("http://www.foon.co.uk/go/getflash");
}
Symbol 553 MovieClip Frame 1
stop();
Symbol 560 MovieClip Frame 30
gotoAndPlay (1);
Symbol 563 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 1
stop();
hit.onPress = function () {
onHit();
};
Symbol 564 MovieClip Frame 6
stop();
Symbol 565 MovieClip Frame 1
function turn(x, y, val) {
var _local2 = this[("p" + x) + y];
if (val == 3) {
_local2.gx.gotoAndStop(2);
} else {
_local2.gx.gotoAndStop(1);
}
if ((val != 3) && ((val == 1) == _local2.ison)) {
return(undefined);
}
if (val == 3) {
_local2.gotoAndPlay("ton");
_local2.ison = true;
} else {
_local2.gotoAndPlay((_local2.ison ? "toff" : "ton"));
_local2.ison = !_local2.ison;
}
}
for (i in this) {
this[i].ison = true;
}
Symbol 575 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 81
function go(dx, dy) {
var _local2 = player_x + dx;
var _local1 = player_y + dy;
var _local3 = at(_local2, _local1);
if (_local3 == 1) {
return(undefined);
}
player_x = _local2;
player_y = _local1;
update();
}
function at(x, y) {
if ((((x < 0) || (y < 0)) || (x >= maze_x)) || (y >= maze_y)) {
return(1);
}
return(maze[y][x]);
}
function update() {
var _local2 = -1;
while (_local2 <= 1) {
var _local1 = -1;
while (_local1 <= 1) {
pigs.turn(_local2 + 1, _local1 + 1, at(player_x + _local2, player_y + _local1));
_local1++;
}
_local2++;
}
}
function win() {
_root.back_from_maze_game = true;
_root.won_last_game = true;
_root.gotoAndStop("reload");
}
stop();
var _ = 0;
var mazes = [];
mazes.push([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, _, _, _, _, 1, _, _, _, 1, 2, 1, _, 2, 1], [1, _, 1, _, _, _, _, 1, _, _, _, 1, _, _, 1], [1, _, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _, 1, 1], [1, _, 1, _, _, _, _, 1, 1, _, _, 1, _, _, 1], [1, _, _, _, 1, _, _, 1, 1, _, _, _, _, _, 1], [1, 1, 1, 1, 1, 1, _, 1, 1, _, 1, 1, 1, _, 1], [1, _, _, _, _, 1, _, 1, 1, _, 1, 2, 1, _, 1], [1, _, 1, _, _, _, _, 1, 1, _, 1, _, _, _, 1], [1, _, 1, _, 1, _, _, 1, 1, _, 1, 1, _, _, 1], [1, _, _, _, 1, _, _, 1, 1, _, 1, _, 1, _, 1], [1, 1, 1, _, 1, 1, 1, 1, _, _, 1, _, _, _, 1], [1, 2, 1, _, 1, _, _, _, _, 1, 1, _, 1, _, 1], [1, _, _, _, _, _, 1, 1, _, _, _, _, 1, _, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]);
mazes.push([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, _, _, 1, 1, 1, 1, 1, 1, 1, 1, _, _, 1], [1, _, _, _, _, _, _, _, _, _, _, _, _, 1], [1, 1, _, 1, 1, 1, 1, 1, 1, 1, 1, _, _, 1], [1, 1, _, 1, _, _, 1, 1, _, _, 1, _, _, 1], [1, _, _, _, _, _, 1, 1, _, _, _, _, _, 1], [1, _, _, _, 1, _, 1, 1, _, 1, _, _, _, 1], [1, _, 2, 1, 1, _, 1, 1, _, 1, 1, 2, _, 1], [1, _, _, _, 1, _, 1, 1, _, 1, _, _, _, 1], [1, _, _, _, _, _, 1, 1, _, _, _, _, _, 1], [1, 1, _, 1, _, _, 1, 1, _, _, 1, _, 1, 1], [1, 1, _, 1, 1, 1, 1, 1, 1, 1, 1, _, 1, 1], [1, _, _, _, _, _, _, _, _, _, _, _, _, 1], [1, _, _, 1, 1, 1, 1, 1, 1, 1, 1, _, _, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]);
mazes.push([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, _, _, _, _, 1, 1, _, 1, 1, _, _, _, _, 1], [1, _, 1, 1, _, _, _, _, _, _, _, 1, 2, _, 1], [1, _, 1, _, _, 1, 1, 1, 1, 1, _, _, _, _, 1], [1, _, _, _, 1, 1, _, _, _, 1, 1, _, 1, _, 1], [1, 1, _, 1, 1, _, _, 1, _, _, 1, _, 1, 1, 1], [1, _, _, 1, 1, _, _, _, _, _, _, _, _, _, 1], [1, _, 1, 1, 1, _, 1, 1, 1, 1, 1, 1, _, 1, 1], [1, _, _, 1, 1, _, 1, 1, 2, _, 1, 1, _, _, 1], [1, 1, _, 1, 1, _, _, _, _, _, 1, 1, _, 1, 1], [1, _, _, _, 1, 1, _, _, _, 1, 1, _, _, _, 1], [1, _, 1, _, _, 1, 1, 1, 1, 1, _, _, 1, _, 1], [1, _, 2, _, _, _, _, _, _, _, _, 1, 1, _, 1], [1, _, _, _, _, 1, _, 1, _, 1, _, _, _, _, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]);
var maze = mazes[random(mazes.length)];
var positions = [];
var maze_y = maze.length;
var maze_x = maze[0].length;
var x = 0;
while (x < maze_x) {
var y = 0;
while (y < maze_y) {
if (maze[y][x] == 2) {
positions.push({x:x, y:y});
}
y++;
}
x++;
}
do {
start_pos = positions[random(positions.length)];
end_pos = positions[random(positions.length)];
} while (start_pos == end_pos);
maze[end_pos.y][end_pos.x] = 3;
var player_x = start_pos.x;
var player_y = start_pos.y;
pigs.p10.onHit = function () {
go(0, -1);
};
pigs.p12.onHit = function () {
go(0, 1);
};
pigs.p01.onHit = function () {
go(-1, 0);
};
pigs.p21.onHit = function () {
go(1, 0);
};
pigs.p11.onHit = function () {
if ((player_x == end_pos.x) && (player_y == end_pos.y)) {
win();
}
};
update();
Symbol 575 MovieClip Frame 147
gotoAndStop (1);
onLightning();
Symbol 579 MovieClip Frame 1
stop();
Symbol 579 MovieClip Frame 17
gotoAndStop (1);
onDie();
Symbol 596 MovieClip [Obst1] Frame 1
radius = 18;
Symbol 597 MovieClip [Obst2] Frame 1
radius = 30;
Symbol 599 MovieClip [Obst3] Frame 1
vy = 2;
radius = 25;
Symbol 600 MovieClip [Obst4] Frame 1
radius = 15;
Symbol 600 MovieClip [Obst4] Frame 24
radius = 30;
Symbol 600 MovieClip [Obst4] Frame 40
radius = 15;
Symbol 601 MovieClip [Obst5] Frame 1
vx = 3;
radius = 6;
Symbol 623 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 642 MovieClip Frame 1
stop();
if (!inited) {
inited = true;
_root.pushActor(this);
}
Symbol 642 MovieClip Frame 29
stop();
onAnimFin();
Symbol 642 MovieClip Frame 56
stop();
onAnimFin();
Symbol 644 MovieClip Frame 1
_root.pushItemTarget(this);
Symbol 647 MovieClip Frame 1
function process() {
vel[0] = vel[0] + (dir * 0.3);
}
function onHitWall(vec) {
if (Math.abs(vec[0]) < (Math.abs(vec[1]) / 4)) {
return(undefined);
}
if (Math.abs(vec[0]) < 0.5) {
return(undefined);
}
if (vec[0] > 0) {
dir = 1;
} else {
dir = -1;
}
}
function onHitActor(ac) {
if (ac != _root.man) {
return(undefined);
}
ac.getHurt();
}
if (dir == undefined) {
radius = _height / 2;
dir = -1;
_root.pushActor(this);
}
Symbol 660 MovieClip Frame 1
_root.pushColTarget(this);
Symbol 662 MovieClip Frame 1
circular = true;
_root.pushColTarget(this);
Symbol 678 MovieClip [UW Coin] Frame 1
still = true;
gotoAndStop(2 + random(_totalframes));