Frame 1
Stage.showMenu = false;
stop();
butt.onPress = function () {
getURL ("http://www.woogiworld.com/games-ww", "_blank");
};
bar.rat = bar._xscale / 100;
bar._xscale = 0;
this.onEnterFrame = function () {
bt = _root.getBytesTotal();
bl = _root.getBytesLoaded();
perc = (bl / bt) * 100;
bar._xscale = perc * bar.rat;
if (perc >= 100) {
delete this.onEnterFrame;
_root.gotoAndStop(3);
}
};
Symbol 60 MovieClip Frame 2
stop();
Symbol 92 MovieClip Frame 7
var s = this._parent._parent._parent._parent._parent.doSound("snd_pickaxe", 1);
Symbol 106 MovieClip Frame 4
stop();
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 6
stop();
Symbol 141 MovieClip Frame 3
stop();
Symbol 177 MovieClip Frame 2
stop();
Symbol 177 MovieClip Frame 3
stop();
Symbol 182 MovieClip Frame 1
this.over._visible = false;
Symbol 191 MovieClip [ui_options] Frame 1
nambox.nam = "[ Choose a skill ]";
var locs = new Array();
locs[0] = new Array(14, 93);
locs[1] = new Array(49, 32);
locs[2] = new Array(125, 32);
locs[3] = new Array(165, 93);
i = 0;
while (i < locs.length) {
if (this.dude.skillnum[i] > 0) {
n = bubs.attachMovie((("icon_skill" + this.dude.dudeclass) + "_") + i, "ike" + i, i);
} else {
n = bubs.attachMovie(((("icon_skill" + this.dude.dudeclass) + "_") + i) + "_gray", "ike" + i, i);
}
n._x = locs[i][0];
n._y = locs[i][1];
i++;
}
Symbol 191 MovieClip [ui_options] Frame 9
stop();
d = this.dude;
main = this._parent._parent._parent;
var nams = main.nams[this.dudeclass];
nambox.exx.onRollOver = function () {
this._parent.nam = "Cancel Action";
};
nambox.exx.onRollOut = function () {
this._parent.nam = "[ Choose a skill ]";
};
nambox.exx.onPress = function () {
var _local2 = new Sound(this);
_local2.attachSound("button_cancel");
_local2.start();
d.doAction(-1, true);
};
i = 0;
while (i < 4) {
var thing = eval ("bubs.b" + i);
thing.id = i;
thing.onRollOver = function () {
if (d.skillnum[this.id] > 0) {
this.over._visible = true;
var _local2 = new Sound(this);
_local2.attachSound("action_mouseover");
_local2.start();
}
this._parent._parent.nambox.nam = ((((this._parent._parent.nams[this.id] + " (") + d.skillnum[this.id]) + "/") + d.skillmax[this.id]) + ")";
};
thing.onRollOut = function () {
this.over._visible = false;
this._parent._parent.nambox.nam = "[ Choose a skill ]";
};
thing.onPress = function () {
if (d.skillnum[this.id] == 0) {
return(undefined);
}
d.doAction(this.id, true);
var _local2 = new Sound(this);
_local2.attachSound("action_click");
_local2.start();
this._parent._parent.gotoAndPlay("close");
};
i++;
}
Symbol 191 MovieClip [ui_options] Frame 18
stop();
this.unloadMovie();
this.removeMovieClip();
Symbol 234 MovieClip [circ] Frame 1
this.cacheAsBitmap = true;
Symbol 239 MovieClip Frame 1
this.onPress = function () {
};
Symbol 248 MovieClip [genbut] Frame 1
stop();
this.onRollOver = function () {
var _local2 = new Sound(this);
_local2.attachSound("button_mouseover");
_local2.start();
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
Symbol 251 MovieClip [resultscreen] Frame 1
stop();
donebut.butnam.text = "Done";
min = 0;
sec = 0;
sec = elapsedtime / 25;
while (sec > 60) {
min++;
sec = sec - 60;
}
sec = int(sec);
xtra = "s";
if (saved == 1) {
xtra = "";
}
wontxt.text = ((saved + " woogling") + xtra) + " made it to the goal.";
xtra = "s";
if (lost == 1) {
xtra = "";
}
losttxt.text = ((lost + " woogling") + xtra) + " got lost on the way.";
elapsedtxt.text = ((("Time elapsed: " + min) + " min ") + sec) + " sec";
if (!saved) {
beatlevel = false;
} else {
beatlevel = true;
}
Instance of Symbol 248 MovieClip [genbut] "donebut" in Symbol 251 MovieClip [resultscreen] Frame 1
on (release) {
main = this._parent._parent;
main.doSound("button_click");
main.hideResults(this._parent.beatlevel);
}
Symbol 284 MovieClip [HUD] Frame 1
quitit.onPress = function () {
_root.gameboy.togMuse();
};
Symbol 317 MovieClip Frame 9
stop();
Symbol 318 MovieClip [portal1] Frame 1
stop();
this.open = 0;
Symbol 318 MovieClip [portal1] Frame 2
this.open = 1;
this._parent._parent._parent.doSound("snd_portalopen");
Symbol 318 MovieClip [portal1] Frame 11
stop();
Symbol 318 MovieClip [portal1] Frame 12
this._parent._parent._parent.doSound("snd_portalclose");
Symbol 318 MovieClip [portal1] Frame 24
stop();
this._parent._parent._parent.showResults();
Symbol 321 MovieClip [portal0] Frame 1
stop();
Symbol 321 MovieClip [portal0] Frame 2
this._parent._parent._parent.doSound("snd_portalopen");
Symbol 321 MovieClip [portal0] Frame 11
stop();
this._parent._parent._parent.startLevel();
Symbol 321 MovieClip [portal0] Frame 12
this._parent._parent._parent.doSound("snd_portalclose");
Symbol 321 MovieClip [portal0] Frame 23
stop();
Symbol 362 MovieClip Frame 1
stop();
Symbol 393 MovieClip Frame 1
playbut.butnam.text = "Play";
instbut.butnam.text = "Instructions";
optbut.butnam.text = "Options";
exitbut.butnam.text = "MORE GAMES";
Instance of Symbol 248 MovieClip [genbut] "playbut" in Symbol 393 MovieClip Frame 1
on (release) {
this._parent.el.stop();
main = this._parent._parent;
main.doSound("button_click");
main.gotoAndStop("levelprev");
}
Instance of Symbol 248 MovieClip [genbut] "instbut" in Symbol 393 MovieClip Frame 1
on (release) {
this._parent.el.stop();
main = this._parent._parent;
main.doSound("button_click");
main.gotoAndStop("instructions");
}
Instance of Symbol 248 MovieClip [genbut] "exitbut" in Symbol 393 MovieClip Frame 1
on (release) {
getURL ("http://www.woogiworld.com/games-ww", "_blank");
}
Symbol 393 MovieClip Frame 13
var s = new Sound(this);
s.attachSound("lightning");
s.start();
Symbol 393 MovieClip Frame 15
var el = new Sound(this);
el.attachSound("electric_loop");
el.start(0, 10);
Symbol 393 MovieClip Frame 33
var s = new Sound(this);
s.attachSound("title_swish");
s.start();
Symbol 393 MovieClip Frame 41
var s = new Sound(this);
s.attachSound("title_slide");
s.start();
var s = new Sound(this);
s.attachSound("white_flash");
s.start();
Symbol 393 MovieClip Frame 47
var s = new Sound(this);
s.attachSound("menu_drop");
s.start();
Symbol 393 MovieClip Frame 54
var s = new Sound(this);
s.attachSound("menu_build");
s.start();
Symbol 393 MovieClip Frame 63
stop();
Symbol 458 MovieClip Frame 1
nex._visible = true;
bak._visible = false;
function nextSl() {
this.gotoAndStop(this._currentframe + 1);
}
function prevSl() {
this.gotoAndStop(this._currentframe - 1);
}
stop();
backbut.butnam.text = "HOME";
nex.butnam.text = "Next";
bak.butnam.text = "Back";
bg.clouds.stop();
Instance of Symbol 248 MovieClip [genbut] "backbut" in Symbol 458 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.doSound("button_click");
main.gotoAndStop("title");
}
Instance of Symbol 248 MovieClip [genbut] "nex" in Symbol 458 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.doSound("button_click");
this._parent.nextSl();
}
Instance of Symbol 248 MovieClip [genbut] "bak" in Symbol 458 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.doSound("button_click");
this._parent.prevSl();
}
Symbol 458 MovieClip Frame 2
bak._visible = true;
Symbol 458 MovieClip Frame 6
nex._visible = true;
Symbol 458 MovieClip Frame 7
nex._visible = false;
Symbol 461 MovieClip Frame 1
stop();
butnams = new Array("Play Next Level", "Revisit Level", "Shop", "Main Menu");
cv = 0;
while (cv < butnams.length) {
b = eval ("but" + cv);
b.butnam.text = butnams[cv];
cv++;
}
Instance of Symbol 248 MovieClip [genbut] "but0" in Symbol 461 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.gotoAndStop("game");
}
Instance of Symbol 248 MovieClip [genbut] "but1" in Symbol 461 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.gotoAndStop("levels");
}
Instance of Symbol 248 MovieClip [genbut] "but2" in Symbol 461 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.gotoAndStop("shop");
}
Instance of Symbol 248 MovieClip [genbut] "but3" in Symbol 461 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.gotoAndStop("title");
}
Symbol 463 MovieClip Frame 1
stop();
backbut.butnam.text = "Back";
Instance of Symbol 248 MovieClip [genbut] "backbut" in Symbol 463 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.doSound("button_click");
main.gotoAndStop("title");
}
Symbol 464 MovieClip Frame 1
stop();
backbut.butnam.text = "Back";
Symbol 467 MovieClip Frame 1
stop();
backbut.butnam.text = "Back";
buybut.butnam.text = "Buy";
sellbut.butnam.text = "Sell";
Instance of Symbol 248 MovieClip [genbut] "backbut" in Symbol 467 MovieClip Frame 1
on (release) {
main = this._parent._parent;
main.doSound("button_click");
main.gotoAndStop("mainmenu");
}
Symbol 484 MovieClip Frame 34
stop();
Symbol 488 MovieClip Frame 1
curlevel = 0;
maxlevel = 3;
levelwoogs = new Array(new Array("1"), new Array("2"), new Array("3"), new Array("1", "2", "3"));
woogsdie = false;
class_skillnum = new Array(new Array(), new Array(0, 0, 10, 0), new Array(0, 0, 10, 0), new Array(10, 0, 0, 0));
class_skillmax = new Array();
var cv = 0;
while (cv < class_skillnum.length) {
class_skillmax.push(new Array());
cv2 = 0;
while (cv2 < class_skillnum[cv].length) {
class_skillmax[cv].push(0 + class_skillnum[cv][cv2]);
cv2++;
}
cv++;
}
function doHitTest(obj, stuff) {
if ((stuff[1] != "NaN") && (stuff[1] != "undefined")) {
point = new Object();
point.x = stuff[0];
point.y = stuff[1];
localToGlobal(point);
return(obj.hitTest(point.x, point.y, stuff[2]));
}
return(obj.hitTest(stuff[0]));
}
function blowAHole(x, y, w, h) {
c = gam.masker.attachMovie("circ", "circ" + circcount, circcount);
c._x = x;
c._y = y;
if (w) {
c._xscale = w;
}
if (h) {
c._yscale = h;
}
circcount = circcount + 1;
return(c);
}
function addTerrain(x, y, w, h) {
c = gam.aw.attachMovie("circ", "circ" + circcount, circcount);
c._x = x;
c._y = y;
if (w) {
c._xscale = w;
}
if (h) {
c._yscale = h;
}
circcount = circcount + 1;
}
function makeTerrain(inside) {
var _local3 = new Array();
var _local4 = 0;
var _local7 = new Array();
var _local6 = new Array();
var _local5 = new Array();
i = 0;
while (i < 7) {
var _local2 = (random(300) + _local4) + 50;
_local3.push(_local2);
_local6.push((random(250) + _local4) - 50);
_local2 = random(700) + 100;
_local7.push(_local2);
_local5.push((_local2 - random(300)) - 200);
_local4 = _local4 + 300;
i++;
}
this.createEmptyMovieClip("gam", 0);
aw = gam.createEmptyMovieClip("aw", 1);
aw.lineStyle(6, 3165793);
aw.beginFill(11189196);
aw.moveTo(0, 500);
i = 0;
while (i < _local3.length) {
aw.curveTo(_local6[i], _local5[i], _local3[i], _local7[i]);
i++;
}
aw.lineTo(_local3[_local3.length - 1], 900);
aw.lineTo(0, 900);
aw.lineTo(0, 500);
if (inside) {
_local3 = new Array();
_local4 = 0;
_local7 = new Array();
_local6 = new Array();
_local5 = new Array();
i = 0;
while (i < 7) {
var _local2 = (random(300) + _local4) + 50;
_local3.push(_local2);
_local6.push((random(250) + _local4) - 50);
_local2 = random(700);
_local7.push(_local2);
_local5.push((_local2 - random(300)) - 200);
_local4 = _local4 + 300;
i++;
}
t = gam.aw.createEmptyMovieClip("topp", 1);
t.lineStyle(6, 4481328);
t.beginFill(10536072);
t.moveTo(0, 500);
i = 0;
while (i < _local3.length) {
t.curveTo(_local6[i], _local5[i], _local3[i], _local7[i]);
i++;
}
t.lineTo(_local3[_local3.length - 1], 900);
t.lineTo(0, 900);
t.lineTo(0, 500);
t._y = 100;
t._xscale = -100;
t._rotation = 180;
}
aw.cacheAsBitmap = true;
}
function makeLev(num) {
this.createEmptyMovieClip("gam", 0);
this.attachMovie("HUD", "HUD", 99);
p = this.attachMovie("pausescreen", "pscreen", 98);
p._visible = false;
backbg = gam.attachMovie("bg" + num, "backbg", 0);
aw = gam.attachMovie("fg" + num, "aw", 1);
bg = gam.attachMovie("bg" + num, "frontbg", 2);
backbg._x = bgx[num];
backbg._y = bgy[num];
aw._x = awx[num];
aw._y = awy[num];
bg._x = bgx[num];
bg._y = bgy[num];
gam.createEmptyMovieClip("masker", 3);
bg.setMask(gam.masker);
gam.masker.cacheAsBitmap = true;
gam._x = start_portal._x;
gam._y = start_portal._y;
limitPan();
updateAfterEvent();
}
function isPaused() {
return((paused || (guypower)) || (guyselected));
}
function makeLayers() {
gam.createEmptyMovieClip("helps", 4);
switch (curlevel) {
case 0 :
var _local1 = gam.helps.attachMovie("helps0_0", "helps0_0", 1);
_local1._x = 816;
_local1._y = 422;
break;
case 1 :
_local1 = gam.helps.attachMovie("helps1_0", "helps1_0", 1);
_local1._x = 625;
_local1._y = 126;
break;
case 2 :
_local1 = gam.helps.attachMovie("helps2_0", "helps2_0", 1);
_local1._x = 567;
_local1._y = 274;
}
gam.createEmptyMovieClip("ropeexit", 5);
gam.createEmptyMovieClip("ropes", 6);
gam.createEmptyMovieClip("portals", 7);
gam.createEmptyMovieClip("dudes", 8);
gam.createEmptyMovieClip("dudeacts", 9);
gam.createEmptyMovieClip("panarrows", 10);
gam.createEmptyMovieClip("dudesel", 11);
gam.createEmptyMovieClip("dudepower", 12);
gam.createEmptyMovieClip("dudeopts", 100);
}
function mousingOver(who) {
x = who._x;
y = who._y;
h = who._height;
w = who._width;
if ((((curmousex() >= (x - (w / 2))) && (curmousex() <= (x + (w / 2)))) && (curmousey() >= (y - h))) && (curmousey() <= y)) {
return(true);
}
return(false);
}
function addPortal(type, x, y) {
p = gam.portals.attachMovie("portal" + type, "portal" + type, type);
p._x = x;
p._y = y;
return(p);
}
function resetOpt(lastguy, closeit) {
var oldopt = eval ("gam.dudeopts.opts" + lastguy);
if (closeit) {
oldopt.gotoAndPlay("close");
} else {
oldopt.unloadMovie();
oldopt.removeMovieClip();
}
guyselected = null;
}
function whilePaused() {
}
function limitPan() {
if (gam._x < panbound_left) {
gam._x = panbound_left;
}
if (gam._x > panbound_right) {
gam._x = panbound_right;
}
if (gam._y > panbound_down) {
gam._y = panbound_down;
}
if (gam._y < panbound_up) {
gam._y = panbound_up;
}
}
function doSound(loc, loop) {
var _local2 = new Sound(this);
_local2.attachSound(loc);
if (loop) {
_local2.start(0, loop);
} else {
_local2.start();
}
return(_local2);
}
main = this;
wrap = this;
offset = 0;
if (this._parent) {
wrap = this._parent;
offset = 1;
}
lastscale = wrap._xscale;
this.curmousex = function () {
return(_xmouse - gam._x);
};
this.curmousey = function () {
return(_ymouse - gam._y);
};
panon = true;
panspeed = 10;
grav = 1;
arrowpowers = new Array(15, 20, 25, 30);
bgx = new Array("0", "0", "0", "0");
bgy = new Array("0", "0", "0", "0");
awx = new Array("0", "0", "0", "0");
awy = new Array("0", "0", "0", "0");
panleft = new Array("-1020", "-750", "-1020", "-2000");
panright = new Array("-5", "-5", "-5", "-5");
pandown = new Array("0", "0", "0", "300");
panup = new Array("-200", "-200", "-200", "0");
spx = new Array("389", "179", "289", "130");
spy = new Array("446", "516", "436", "395");
epx = new Array("1608", "1400", "1608", "2650");
epy = new Array("448", "493", "404", "275");
nams = new Array(new Array(), new Array("Wall", "Drill", "Pick-axe", "Bomb"), new Array("Bomb Arrow", "Earth Arrow", "Rope Arrow", "Spacial Rend"), new Array("Draw", "Erase", "Teleport", "Mass Teleport"));
function addGuy(x, y, sp, cl) {
num = curguy;
d = gam.dudes.attachMovie("dude" + cl, "dude" + num, num);
d.main = main;
d.dudeindex = num;
d.dudeclass = cl;
d.skillnum = new Array();
d.skillmax = new Array();
var _local2 = 0;
while (_local2 < class_skillmax[cl].length) {
d.skillnum.push(0 + class_skillmax[cl][_local2]);
d.skillmax.push(0 + class_skillmax[cl][_local2]);
_local2++;
}
curguy++;
d.speed = sp;
d.curstate = "walk";
d.cooldown = 0;
d._x = x;
d._y = y;
d.Xvel = 0;
d.Yvel = 0;
d.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
if (isPaused()) {
if (this != guypower) {
this.guts.gotoAndStop("rest");
}
return(undefined);
}
this.doStuff(gamespeed);
};
d.doStuff = function (a) {
this.guts.gotoAndStop(this.curstate);
if (this.cooldown > 0) {
increm = 1;
this.cooldown = this.cooldown - increm;
if (this.cooldown <= 0) {
this.doAction(-1);
} else {
this.powercount = this.powercount + increm;
if (this.powercount >= this.powerfreq) {
this.powercount = 0;
usePower(this, this.curaction);
}
}
}
if (!cursel) {
if (mousingOver(this)) {
if (cursel) {
return(undefined);
}
cursel = gam.dudesel.attachMovie("sel", "sel", 1);
cursel.dude = this;
cursel.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
this._x = this.dude._x;
this._y = this.dude._y;
};
cursel.deleteme = function () {
gam.dudesel.sel.unloadMovie();
gam.dudesel.sel.removeMovieClip();
cursel = null;
};
}
} else if ((cursel.dude == this) && (!mousingOver(this))) {
cursel.deleteme();
}
if (this.hitTest(portal_end) && (!portal_end.open)) {
portal_end.gotoAndPlay("open");
}
if (this.inObject(portal_end)) {
numsaved++;
this.die();
doSound("portal_in");
return(undefined);
}
dudePhys(this, gamespeed);
if (a > 1) {
this.doStuff(a - 1);
}
};
d.die = function () {
woogsleft--;
this.unloadMovie();
this.removeMovieClip();
};
d.inObject = function (what) {
return(doHitTest(this, new Array(what._x + gam._x, what._y + gam._y)));
};
d.onPress = function () {
if (guypower && (guypower != this)) {
return(undefined);
}
if (cursel) {
cursel.deleteme();
}
lastguy = guyselected.dudeindex;
if (guyselected) {
doSound("button_woogling_close");
resetOpt(lastguy, lastguy == this.dudeindex);
}
if (lastguy != this.dudeindex) {
var _local2 = gam.dudeopts.attachMovie("ui_options", "opts" + this.dudeindex, this.dudeindex);
doSound("button_woogling_open");
_local2._x = this._x;
_local2._y = this._y;
_local2.dudeindex = this.dudeindex;
_local2.dudeclass = this.dudeclass;
_local2.dude = this;
guyselected = this;
}
};
d.doAction = function (a) {
if (a == -1) {
this.flag.deleteme();
resetOpt(guyselected.dudeindex, true);
this.curstate = "walk";
this.curaction = 0;
this.cooldown = 0;
guypower = null;
delete this.main.onMouseDown;
return(undefined);
}
if (this.dudeclass == 0) {
return(undefined);
}
if (this.dudeclass == 1) {
if (this.flag) {
this.flag.deleteme();
}
var act = this.main.attachMovie((("icon_skill" + this.dudeclass) + "_") + a, "act", 100);
this.curact = act;
this.curaction = a;
act.dude = this;
act._x = _xmouse - (act._width / 2);
act._y = _ymouse - (act._height / 2);
act.acttype = a;
act.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
this._x = _xmouse - (this._width / 2);
this._y = _ymouse - (this._height / 2);
};
act.onPress = function () {
var _local2 = gam.dudeacts.attachMovie((("icon_skill" + this.dude.dudeclass) + "_") + this.acttype, "flag" + this.dude.dudeindex, this.dude.dudeindex);
doSound((("putdown" + this.dude.dudeclass) + "_") + this.acttype);
_local2._x = curmousex() - (act._width / 2);
_local2._y = curmousey() - (act._height / 2);
_local2.attached = false;
_local2.dude = this.dude;
_local2.action = this.acttype;
this.dude.flag = _local2;
_local2.deleteme = function () {
this.unloadMovie();
this.removeMovieClip();
};
_local2.onPress = function () {
this.attached = !this.attached;
if (!this.attached) {
doSound((("putdown" + this.dude.dudeclass) + "_") + this.action);
}
};
_local2.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
if (isPaused()) {
return(undefined);
}
if (this.attached) {
this._x = curmousex() - (this._width / 2);
this._y = curmousey() - (this._height / 2);
} else if (this.hitTest(this.dude)) {
dudePower(this.dude, this.action);
this.deleteme();
} else if (this.hitTest(gam.helps.helps0_0.center)) {
gam.helps.helps0_0.unloadMovie();
gam.helps.helps0_0.removeMovieClip();
}
};
guyselected = null;
this.deleteme();
};
act.deleteme = function () {
this.unloadMovie();
this.removeMovieClip();
};
return(undefined);
}
if (this.dudeclass == 2) {
guyselected = null;
dudePower(this, a);
return(undefined);
}
if (this.dudeclass == 3) {
guyselected = null;
dudePower(this, a);
return(undefined);
}
};
}
function dudePower(who, action) {
cursel.deleteme();
who.action = action;
if (who.dudeclass == 0) {
} else if (who.dudeclass == 1) {
if (!(action === 2)) {
} else {
who.curstate = "axe";
who.cooldown = 350;
who.powerfreq = 5;
who.powercount = 0;
blowAHole(who._x + ((who._xscale / 100) * 15), who._y - 17, 31, 31);
who.skillnum[action]--;
if (who.Xvel == 0) {
who.Xvel = who.origdir;
}
}
} else if (who.dudeclass == 2) {
switch (action) {
case 0 :
case 1 :
case 2 :
who.curstate = "aim";
who.origxscale = who._xscale;
who.guts.gotoAndPlay("aim");
guypower = who;
this.onMouseDown = function () {
if (((!guyselected) && (!paused)) && (!mousingOver(who))) {
addArrow(guypower);
guypower.skillnum[action]--;
guypower._xscale = guypower.origxscale;
guypower.doAction(-1);
delete this.onMouseDown;
}
};
}
} else if (who.dudeclass == 3) {
who.curstate = "spell";
who.origxscale = who._xscale;
who.guts.gotoAndPlay("spell");
guypower = who;
this.onMouseDown = function () {
if (((!guyselected) && (!paused)) && (!mousingOver(who))) {
this.casting = true;
this.lastx = null;
this.lasty = null;
var s = guypower.createEmptyMovieClip("spell", -1);
gam.aw.lineStyle(12, 5848094);
gam.aw.moveTo(curmousex(), curmousey());
gam.helps.createEmptyMovieClip("magic", 100);
gam.helps.magic.lineStyle(12, 5848094);
gam.helps.magic.moveTo(curmousex() - gam.helps.magic._x, curmousey() - gam.helps.magic._y);
var dr = new Sound(gam.helps.magic);
dr.attachSound("snd_spell_draw");
dr.start(0, 999);
s.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
gam.aw.lineTo(curmousex(), curmousey());
gam.helps.magic.lineTo(curmousex() - gam.helps.magic._x, curmousey() - gam.helps.magic._y);
};
this.onMouseUp = function () {
dr.stop();
gam.helps.magic.unloadMovie();
gam.helps.magic.removeMovieClip();
if (gam.helps.helps2_0) {
gam.helps.helps2_0.unloadMovie();
gam.helps.helps2_0.removeMovieClip();
}
this.casting = false;
guypower.skillnum[action]--;
guypower.doAction(-1);
guypower._xscale = guypower.origxscale;
delete this.onMouseDown;
delete this.onMouseUp;
s.unloadMovie();
s.removeMovieClip();
};
}
};
}
}
function addArrow(who) {
var a = gam.dudepower.attachMovie("arrow" + who.action, "arrow" + numarrows, numarrows);
numarrows++;
doSound("snd_arrow");
a.arrowtype = who.action;
a._rotation = who.arrowangle * (who._xscale / 100);
a._xscale = who._xscale;
a._x = ((who.guts.aim.bow._x + who.guts.aim._x) + who.guts._x) + who._x;
a._y = ((who.guts.aim.bow._y + who.guts.aim._y) + who.guts._y) + who._y;
a.vx = ((who._xscale / 100) * arrowpowers[who.arrowpower]) * Math.cos(a._rotation * (Math.PI/180));
a.vy = ((who._xscale / 100) * arrowpowers[who.arrowpower]) * Math.sin(a._rotation * (Math.PI/180));
a.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
if (isPaused()) {
return(undefined);
}
stuck = false;
this.origx = this._x + gam._x;
this.origy = this._y + gam._y;
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if (outofBounds(this)) {
this.deleteme();
}
opp = this.vy;
adj = this.vx;
this.virtx = this._x + gam._x;
this.virty = this._y + gam._y;
if (doHitTest(gam.aw, new Array(this.virtx, this.virty, true)) && (!doHitTest(gam.frontbg, new Array(this.virtx, this.virty, true)))) {
this.vy = this.vy - grav;
while (doHitTest(gam.aw, new Array(this.virtx, this.virty, true)) && (!doHitTest(gam.frontbg, new Array(this.virtx, this.virty, true)))) {
this._x = this._x - (this.vx / Math.abs(this.vy * 2));
this.virtx = this.virtx - (this.vx / Math.abs(this.vy * 2));
this._y = this._y - (this.vy / Math.abs(this.vy * 2));
this.virty = this.virty - (this.vy / Math.abs(this.vy * 2));
}
this._x = this._x + (this.vx / Math.abs(this.vy * 2));
this.virtx = this.virtx + (this.vx / Math.abs(this.vy * 2));
this._y = this._y + (this.vy / Math.abs(this.vy * 2));
this.virty = this.virty + (this.vy / Math.abs(this.vy * 2));
stuck = true;
}
if (stuck) {
doSound("snd_arrow_hit");
if (this.hitTest(gam.helps.helps1_0.center)) {
gam.helps.helps1_0.unloadMovie();
gam.helps.helps1_0.removeMovieClip();
}
switch (a.arrowtype) {
case 0 :
blowAHole(this._x, this._y, 0, 0);
this.unloadMovie();
this.removeMovieClip();
break;
case 1 :
addTerrain(this._x - gam.aw._x, this._y - gam.aw._y, 0, 0);
this.unloadMovie();
this.removeMovieClip();
break;
case 2 :
this.coilx = (this._x + ((this._xscale / 100) * this.coil2._x)) + gam._x;
this.coily = (this._y + ((this._yscale / 100) * this.coil2._y)) + gam._y;
var _local3 = gam.ropes.attachMovie("coil", "coil" + numcoils, numcoils);
_local3._x = this.coilx - gam._x;
_local3._y = this.coily - gam._y;
_local3._rotation = this._rotation;
numcoils++;
this.coilx = (this._x + ((this._xscale / 100) * this.coil3._x)) + gam._x;
this.coily = (this._y + ((this._yscale / 100) * this.coil3._y)) + gam._y;
var _local5 = gam.ropes.attachMovie("coil", "coil" + numcoils, numcoils);
_local5._x = this.coilx - gam._x;
_local5._y = this.coily - gam._y;
_local5._rotation = this._rotation;
numcoils++;
this.coilx = (this._x + ((this._xscale / 100) * this.tip._x)) + gam._x;
this.coily = (this._y + ((this._yscale / 100) * this.tip._y)) + gam._y;
var _local4 = gam.ropes.attachMovie("tip", "coil" + numcoils, numcoils);
_local4._x = this.coilx - gam._x;
_local4._y = this.coily - gam._y;
_local4._rotation = this._rotation;
numcoils++;
this.coilx = (this._x + ((this._xscale / 100) * this.coil._x)) + gam._x;
this.coily = (this._y + ((this._yscale / 100) * this.coil._y)) + gam._y;
nextcoil = this.coily + 8;
if (!(doHitTest(gam.aw, new Array(this.coilx, nextcoil, true)) && (!doHitTest(gam.frontbg, new Array(this.coilx, nextcoil, true))))) {
this.gamx = gam._x;
this.gamy = gam._y;
this.ropelen = 0;
doSound("rope_drop");
this.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
nextcoil = this.coily + 8;
var _local3 = gam.ropes.attachMovie("coil", "coil" + numcoils, numcoils);
_local3._x = this.coilx - this.gamx;
_local3._y = this.coily - this.gamy;
numcoils++;
this.coily = nextcoil;
if (doHitTest(gam.aw, new Array(this.coilx + (gam._x - this.gamx), nextcoil + (gam._y - this.gamy), true)) && (!doHitTest(gam.frontbg, new Array(this.coilx + (gam._x - this.gamx), nextcoil + (gam._y - this.gamy), true)))) {
delete this.onEnterFrame;
}
this.ropelen++;
if (this.ropelen == 4) {
var _local2 = gam.ropeexit.attachMovie("exit", "exit" + numcoils, numcoils);
_local2._x = this.coilx - this.gamx;
_local2._y = this.coily - this.gamy;
_local2.onPress = function () {
curropearrow = this;
curropearrow.coils._visible = false;
};
_local2.onRelease = function () {
curropearrow.coils._visible = true;
curropearrow = null;
};
_local2.onMouseUp = function () {
if (!curropearrow) {
return(undefined);
}
curropearrow.coils._visible = true;
curropearrow = null;
};
_local2.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
return(undefined);
}
if (curropearrow == this) {
this._y = curmousey();
}
};
}
};
} else {
delete this.onEnterFrame;
}
if (this.ropelen < 4) {
break;
}
_local3.unloadMovie();
_local3.removeMovieClip();
_local5.unloadMovie();
_local5.removeMovieClip();
_local4.unloadMovie();
_local4.removeMovieClip();
c4.unloadMovie();
c4.removeMovieClip();
}
return(undefined);
}
this._rotation = Math.atan(opp / adj) * 57.2957795130823;
};
a.deleteme = function () {
this.unloadMovie();
this.removeMovieClip();
};
}
function usePower(who, action) {
if (who.dudeclass == 0) {
} else if (who.dudeclass == 1) {
if (!(action === 2)) {
} else {
divotlayer = who._parent._parent.frontbg;
terrainlayer = who._parent._parent.aw;
var _local2 = blowAHole(who._x + (15 * (who._xscale / 100)), who._y - 17, 31, 31);
lookout = 32;
if (who.reallyendnow) {
who.reallyendnow = false;
who.endearly = false;
who.cooldown = 1;
} else if (who.endearly) {
who.reallyendnow = true;
} else if ((!doHitTest(gam.aw, new Array(who.virtx + lookout, who.virty - 17, true))) || (doHitTest(gam.frontbg, new Array(who.virtx + lookout, who.virty - 17, true)))) {
}
}
} else if (who.dudeclass == 2) {
} else if (who.dudeclass == 3) {
}
}
function doGuyPower(who, action) {
if (paused || (guyselected)) {
return(undefined);
}
if (who.dudeclass == 0) {
} else if (who.dudeclass == 1) {
} else if (who.dudeclass == 2) {
switch (action) {
case 0 :
case 1 :
case 2 :
if (curmousex() > who._x) {
who._xscale = 100;
} else {
who._xscale = -100;
}
adj = curmousex() - who._x;
opp = curmousey() - who._y;
arrowpower = int(0.02 * Math.sqrt(Math.pow(adj, 2) + Math.pow(opp, 2)));
if (arrowpower == "NaN") {
arrowpower = 0;
}
if (arrowpower > 3) {
arrowpower = 3;
}
rot = ((who._xscale / 100) * Math.atan(opp / adj)) * 57.2957795130823;
who.guts.aim.bow.gotoAndPlay("p" + arrowpower);
who.arrowpower = arrowpower;
who.guts.aim.bow._rotation = rot;
who.arrowangle = rot;
}
}
}
function dudePhys(who, g) {
factor = wrap._xscale / 100;
who.h = 25 * factor;
who.w = 26 * factor;
who.origx = who._x + gam._x;
who.origy = who._y + gam._y;
who._x = who._x + who.Xvel;
who._y = who._y + who.Yvel;
if (Math.abs(who.Xvel) > 1) {
who.Xvel = who.Xvel - (0.2 * (Math.abs(who.Xvel) / who.Xvel));
}
who.virtx = who._x + gam._x;
who.virty = who._y + gam._y;
if ((((who.curstate != "axe") && (who.curstate != "drill")) && (who.curstate != "teleport")) && (who.curstate != "massteleport")) {
if (who.onrope) {
if (doHitTest(gam.ropeexit, new Array(who.virtx, who.virty, true))) {
who.Xvel = 4;
who._x = who._x + who.Xvel;
who.Yvel = 0;
who.onrope = false;
doSound("rope_off");
return(undefined);
}
if (((doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) && (who.Yvel == 1)) || ((doHitTest(gam.aw, new Array(who.virtx, who.virty - who.h, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty - who.h, true)))) && (who.Yvel == -1))) {
who.Yvel = who.Yvel * -1;
who._y = who._y + who.Yvel;
return(undefined);
}
return(undefined);
}
if (doHitTest(gam.ropes, new Array(who.virtx, who.virty, true)) || (doHitTest(gam.ropes, new Array(who.virtx, who.virty - who.h, true)))) {
who.onrope = true;
who.curdiry = -1;
who.origdir = who.Xvel;
who.Yvel = -1;
who._y = who._y + who.Yvel;
who.Xvel = 0;
return(undefined);
}
who.Yvel = who.Yvel + grav;
} else {
who.onrope = false;
who.Yvel = who.Yvel + (grav * factor);
}
if (outOfBounds(who)) {
if (woogsdie) {
curwoogs.splice(who.dudeindex, 1);
}
who.die();
return(undefined);
}
if (who.Yvel >= who.h) {
if (doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) {
while (doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) {
who.Yvel = 0;
who._y = who._y - 1;
who.virty = who.virty - 1;
}
}
}
if (who.Yvel > 0) {
cv = who.origy;
while (cv < who.virty) {
if (doHitTest(gam.aw, new Array(who.virtx, cv, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, cv, true)))) {
who._y = cv - gam._y;
cv = who.virty;
who.virty = who._y + gam._y;
}
cv = cv + (0.5 * factor);
}
if ((doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) && (!(doHitTest(gam.aw, new Array(who.virtx, who.virty - who.h, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty - who.h, true)))))) {
while ((doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) && (!(doHitTest(gam.aw, new Array(who.virtx, who.virty - who.h, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty - who.h, true)))))) {
who.Yvel = 0;
who._y = who._y - 1;
who.virty = who.virty - 1;
}
}
}
if (who.stuck) {
if (who.Xvel == 0) {
who.Yvel = 0;
who.guts.gotoAndStop("rest");
return(undefined);
}
}
if ((doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) && (!(doHitTest(gam.aw, new Array(who.virtx, who.virty - who.h, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty - who.h, true)))))) {
while ((doHitTest(gam.aw, new Array(who.virtx, who.virty, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty, true)))) && (!(doHitTest(gam.aw, new Array(who.virtx, who.virty - who.h, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx, who.virty - who.h, true)))))) {
who.Yvel = 0;
who._y = who._y - 1;
who.virty = who.virty - 1;
}
}
if ((who.Xvel != 0) && (who.curstate != "axe")) {
if ((doHitTest(gam.aw, new Array(who.virtx + (5 * (who.Xvel * factor)), who.virty - who.h, true)) && (!doHitTest(gam.frontbg, new Array(who.virtx + (5 * (who.Xvel * factor)), who.virty - who.h, true)))) || (who._x < 0)) {
who.Xvel = who.Xvel * -1;
who.origdir = who.Xvel;
who._x = who._x + (2 * who.Xvel);
who.virtx = who.virtx + (2 * who.Xvel);
}
} else if (((who.Xvel == 0) && (who.Yvel == 0)) && (who.curstate == "walk")) {
who.Xvel = origdir;
}
if (who.Xvel < 0) {
who._xscale = -100;
} else if (who.Xvel > 0) {
who._xscale = 100;
} else if (who.origdir < 0) {
who._xscale = -100;
} else {
who._xscale = 100;
}
}
stop();
stopAllSounds();
var s = new Sound(this);
s.attachSound("musicgamemenu");
s.start(0, 999);
Symbol 488 MovieClip Frame 2
stop();
Symbol 488 MovieClip Frame 3
stop();
Symbol 488 MovieClip Frame 4
stop();
Symbol 488 MovieClip Frame 5
function togMuse() {
if (museon) {
museon = false;
nickmuse.stop();
} else {
nickmuse.start(0, 999);
museon = true;
}
}
function initLevel() {
curwoogs = levelwoogs[curlevel];
circcount = 0;
numarrows = 0;
numcoils = 0;
curguy = 0;
origdir = 1;
paused = false;
guyselected = null;
numsaved = 0;
woogsleft = 0;
woogswaiting = curwoogs.length;
woogstotal = curwoogs.length;
gamespeed = 2;
countdown = 1;
elapsedtime = 0;
toclose = 0;
panbound_left = panleft[curlevel];
panbound_right = panright[curlevel];
panbound_down = pandown[curlevel];
panbound_up = panup[curlevel];
makeLev(curlevel);
makeLayers();
portal_start = addPortal(0, spx[curlevel], spy[curlevel]);
portal_end = addPortal(1, epx[curlevel], epy[curlevel]);
blowAHole(-50, 0, 0, 0);
HUD.pausy.onPress = function () {
this._parent._parent.pauseIt();
};
HUD.quitit.onPress = function () {
curlevel = 0;
gam.unloadMovie();
gam.removeMovieClip();
this._parent._visible = false;
this._parent._parent.gotoAndPlay("title");
};
HUD.restartit.onPress = function () {
this._parent._parent.initLevel();
};
HUD.inc.onPress = function () {
if (this._parent._parent.gamespeed < 3) {
this._parent._parent.gamespeed++;
}
};
HUD.dec.onPress = function () {
if (this._parent._parent.gamespeed > 0) {
this._parent._parent.gamespeed--;
}
};
}
function startLevel() {
popWoog();
}
function popWoog() {
addGuy(portal_start._x, portal_start._y, 1, curwoogs[curwoogs.length - woogswaiting]);
doSound("portal_out");
woogswaiting--;
woogsleft++;
if (woogswaiting > 0) {
nextwoog = 75;
} else {
toclose = 40;
}
}
function outOfBounds(who) {
x = who._x;
y = who._y;
h = who._height;
w = who._width;
if (((x < (-w)) || (x > ((800 + Math.abs(panbound_left)) + w))) || (y > ((600 + Math.abs(panbound_up)) + h))) {
return(true);
}
return(false);
}
function pauseIt() {
paused = !paused;
this.pscreen._visible = !this.pscreen._visible;
}
function endLevel() {
portal_end.gotoAndPlay("close");
Key.removeListener(keyListener);
delete this.onEnterFrame;
}
function showResults() {
res = this.attachMovie("resultscreen", "resultscreen", 1000);
res._x = 400;
res._y = 300;
res.saved = numsaved;
res.lost = woogstotal - numsaved;
res.elapsedtime = elapsedtime;
}
function hideResults(beatlevel) {
this.HUD._visible = false;
this.resultscreen.unloadMovie();
this.resultscreen.removeMovieClip();
this.gam.unloadMovie();
this.game.removeMovieClip();
if (beatlevel) {
curlevel++;
if (curlevel > maxlevel) {
gotoAndStop ("endgame");
} else {
gotoAndStop ("levelprev");
}
} else {
gotoAndStop ("retrylevel");
}
}
stop();
stopAllSounds();
museon = true;
if (curlevel == 3) {
this.nickmuse = doSound("bgmusic0", 999);
} else {
this.nickmuse = doSound("bgmusic" + curlevel, 999);
}
initLevel();
var keyListener = new Object();
keyListener.onKeyDown = function () {
var _local1 = Key.getCode();
if (_local1 == 32) {
pauseIt();
}
if (paused) {
} else {
if ((_local1 == 187) && (gamespeed < 3)) {
gamespeed++;
}
if ((_local1 == 189) && (gamespeed > 1)) {
gamespeed--;
}
}
};
Key.addListener(keyListener);
this.onEnterFrame = function () {
if (lastscale != wrap._xscale) {
lastscale = wrap._xscale;
return(undefined);
}
lastscale = wrap._xscale;
if (countdown > 0) {
countdown--;
if (countdown == 0) {
portal_start.gotoAndPlay("open");
}
} else {
elapsedtime = elapsedtime + gamespeed;
if (panon) {
if (_xmouse < 30) {
gam._x = gam._x + panspeed;
}
if (_xmouse > 770) {
gam._x = gam._x - panspeed;
}
if (_ymouse < 30) {
gam._y = gam._y + panspeed;
}
if ((_ymouse > 540) && (_ymouse < 570)) {
gam._y = gam._y - panspeed;
}
limitPan();
updateAfterEvent();
}
if (guypower) {
doGuyPower(guypower, guypower.action);
return(undefined);
}
if ((woogsleft == 0) && (woogswaiting == 0)) {
endLevel();
} else if ((!isPaused()) && (nextwoog)) {
nextwoog = nextwoog - gamespeed;
if (nextwoog <= 0) {
nextwoog = 0;
popWoog();
}
}
if (toclose) {
toclose = toclose - gamespeed;
if (toclose <= 0) {
toclose = 0;
portal_start.gotoAndPlay("close");
}
}
}
};
Symbol 488 MovieClip Frame 6
stop();
Symbol 488 MovieClip Frame 7
stop();
Symbol 488 MovieClip Frame 8
stop();
Symbol 488 MovieClip Frame 9
stop();
levelnam.text = "Level " + (curlevel + 1);
levprev.gotoAndStop(curlevel + 1);
playbut.butnam.text = "Play";
var lp = this.attachMovie("levelprev" + curlevel, "levelprev", 1);
lp._xscale = 32;
lp._yscale = 32;
lp._x = 103;
lp._y = 71;
bg.clouds.stop();
Instance of Symbol 248 MovieClip [genbut] "playbut" in Symbol 488 MovieClip Frame 9
on (release) {
this._parent.levelprev.unloadMovie();
this._parent.levelprev.removeMovieClip();
this._parent.gotoAndStop("game");
}
Symbol 488 MovieClip Frame 10
stop();
stopAllSounds();
var s = new Sound(this);
s.attachSound("winsong");
s.start();
donebut.butnam.text = "WOOGI WORLD";
Instance of Symbol 248 MovieClip [genbut] "donebut" in Symbol 488 MovieClip Frame 10
on (release) {
getURL ("http://www.woogiworld.com/games-ww", "_blank");
}
Symbol 488 MovieClip Frame 11
stop();
stopAllSounds();
var s = new Sound(this);
s.attachSound("losesong");
s.start();
backbut.butnam.text = "Retry";
quitbut.butnam.text = "Quit";
Instance of Symbol 248 MovieClip [genbut] "backbut" in Symbol 488 MovieClip Frame 11
on (release) {
this._parent.gotoAndStop("game");
}
Instance of Symbol 248 MovieClip [genbut] "quitbut" in Symbol 488 MovieClip Frame 11
on (release) {
this._parent.gotoAndStop("title");
}