Frame 1
stop();
Stage.showMenu = false;
Instance of Symbol 136 MovieClip in Frame 1
onClipEvent (load) {
_root.playbut._visible = false;
}
onClipEvent (enterFrame) {
var t1 = _root.getBytesLoaded();
var t2 = _root.getBytesTotal();
_root.perc = (t1 / t2) * 100;
this._xscale = _root.perc;
if (_root.perc >= 100) {
_root.playbut._visible = true;
}
}
Frame 2
stop();
baa = new Sound(_root);
baa.attachSound("baa");
goatsound = new Sound(_root);
goatsound.attachSound("goatsound");
whoosh = new Sound(_root);
whoosh.attachSound("whoosh");
gleam = new Sound(_root);
gleam.attachSound("gleam");
select = new Sound(_root);
select.attachSound("select");
asplode = new Sound(_root);
asplode.attachSound("asplode");
_root.level = 1;
_root.masterscore = 0;
_root.goalaccuracy = 60;
_root.goalthing = _root.goalaccuracy;
_root.goalsheep = 5;
_root.goalgoats = 5;
_root.gottensheep = 0;
_root.gottengoats = 0;
_root.misses = 0;
_root.unloadcount = 0;
x = 0;
while (x < _root.goalsheep) {
e = _root.sheepholder.attachMovie("sheepicon", "sheepicon" + x, x);
e._x = (30 * x) + 5;
x++;
}
t = 0;
while (t < _root.goalgoats) {
w = _root.goatholder.attachMovie("goaticon", "goaticon" + t, t);
w._x = (30 * t) + 5;
t++;
}
_root.guycount = 0;
_root.guylimit = 20;
_root.speed = 3;
_root.counter = 0;
_root.interval = 20;
_root.heavenarrow._visible = false;
_root.hellarrow._visible = false;
_root.placementindex = new Array(210, 210, 260, 260, 325, 325);
_root.directionindex = new Array(40, -40, 40, -40, 40, -40);
_root.xplacement = new Array(-200, 750, -200, 750, -200, 750);
_root.scaleindex = new Array(75, 75, 130, 130, 280, 280);
_root.rowindex = new Array(1, 1, 500, 500, 1000, 1000);
_root.charindex = new Array("goat", "sheep");
_root.onEnterFrame = function () {
if (((_root.unloadcount == _root.guylimit) and (_root.transition != true)) || (((_root.gottengoats >= _root.goalgoats) and (_root.gottensheep >= _root.goalsheep)) and (_root.transition != true))) {
_root.theend = true;
_root.dudes.attachMovie("transition", "transition", 0);
_root.transition = true;
}
_root.counter = _root.counter + 1;
if ((_root.counter == _root.interval) and (_root.guycount < _root.guylimit)) {
var _local3 = random(2);
var _local2 = random(6);
c = _root.dudes.attachMovie(_root.charindex[_local3], _root.charindex[_local3] + (_root.rowindex[_local2] + _root.guycount), _root.rowindex[_local2] + _root.guycount);
c._x = _root.xplacement[_local2];
c._y = _root.placementindex[_local2];
c._xscale = _root.scaleindex[_local2];
c._yscale = _root.scaleindex[_local2];
c.guts._xscale = directionindex[_local2];
_root.counter = 0;
_root.guycount = _root.guycount + 1;
_local3 = null;
_local2 = null;
}
if (Key.isDown(68)) {
_root.tohell = true;
_root.toheaven = false;
_root.hellarrow._visible = true;
_root.heavenarrow._visible = false;
}
if (Key.isDown(83)) {
_root.toheaven = true;
_root.tohell = false;
_root.heavenarrow._visible = true;
_root.hellarrow._visible = false;
}
};
Symbol 31 MovieClip Frame 31
gotoAndPlay ("walk");
Symbol 58 MovieClip [goat] Frame 1
this.onEnterFrame = function () {
if (this.beenplayed != true) {
if (this.guts._xscale == 40) {
this._x = this._x + _root.speed;
} else {
this._x = this._x - _root.speed;
}
}
if ((this._x > (Stage.width + 201)) || (this._x < -201)) {
_root.misses = _root.misses + 1;
_root.unloadcount = _root.unloadcount + 1;
this.unloadMovie();
}
if ((_root.theend == true) and (this.dunnit != true)) {
this.gotoAndPlay("gotohell");
this.beenplayed = true;
this.dunnit = true;
}
};
this.onPress = function () {
if (this.beenplayed != true) {
if (_root.tohell == true) {
this.gotoAndPlay("gotohell");
this.beenplayed = true;
var thing = eval ("_root.goatholder.goaticon" + _root.gottengoats);
thing.gotoAndStop("full");
_root.gottengoats = _root.gottengoats + 1;
_root.unloadcount = _root.unloadcount + 1;
_root.whoosh.start();
}
if (_root.toheaven == true) {
this.gotoAndPlay("gotoheaven");
_root.misses = _root.misses + 1;
this.beenplayed = true;
_root.unloadcount = _root.unloadcount + 1;
_root.goatsound.start();
_root.gleam.start();
}
}
};
stop();
Instance of Symbol 31 MovieClip "guts" in Symbol 58 MovieClip [goat] Frame 1
/* no clip actions */
Symbol 58 MovieClip [goat] Frame 2
Symbol 58 MovieClip [goat] Frame 24
stop();
this.unloadMovie();
Symbol 58 MovieClip [goat] Frame 39
stop();
this.unloadMovie();
Symbol 86 MovieClip [sheep] Frame 1
this.onEnterFrame = function () {
if (this.beenplayed != true) {
if (this.guts._xscale == 40) {
this._x = this._x + _root.speed;
} else {
this._x = this._x - _root.speed;
}
}
if ((this._x > (Stage.width + 201)) || (this._x < -201)) {
_root.misses = _root.misses + 1;
_root.unloadcount = _root.unloadcount + 1;
this.unloadMovie();
}
if ((_root.theend == true) and (this.dunnit != true)) {
this.gotoAndPlay("gotoheaven");
this.beenplayed = true;
this.dunnit = true;
}
};
this.onPress = function () {
if (this.beenplayed != true) {
if (_root.tohell == true) {
this.gotoAndPlay("gotohell");
this.beenplayed = true;
_root.misses = _root.misses + 1;
_root.unloadcount = _root.unloadcount + 1;
_root.whoosh.start();
_root.baa.start();
}
if (_root.toheaven == true) {
this.gotoAndPlay("gotoheaven");
this.beenplayed = true;
var thing = eval ("_root.sheepholder.sheepicon" + _root.gottensheep);
thing.gotoAndStop("full");
_root.unloadcount = _root.unloadcount + 1;
_root.gottensheep = _root.gottensheep + 1;
_root.gleam.start();
}
}
};
stop();
Instance of Symbol 63 MovieClip "guts" in Symbol 86 MovieClip [sheep] Frame 1
/* no clip actions */
Symbol 86 MovieClip [sheep] Frame 2
Symbol 86 MovieClip [sheep] Frame 24
stop();
this.unloadMovie();
Symbol 86 MovieClip [sheep] Frame 39
stop();
this.unloadMovie();
Symbol 89 MovieClip [sheepicon] Frame 1
stop();
Symbol 89 MovieClip [sheepicon] Frame 2
stop();
Symbol 92 MovieClip [goaticon] Frame 1
stop();
Symbol 92 MovieClip [goaticon] Frame 2
stop();
Symbol 95 Button
on (release) {
getURL ("http://www.bomtoons.com/goats/download.html", "_blank");
}
Symbol 108 Button
on (release) {
trace("lots of stuff");
_root.level = _root.level + 1;
_root.goalaccuracy = _root.goalaccuracy + 2;
_root.goalthing = _root.goalaccuracy;
_root.goalsheep = _root.goalsheep + 1;
_root.goalgoats = _root.goalgoats + 1;
_root.gottensheep = 0;
_root.gottengoats = 0;
_root.misses = 0;
_root.unloadcount = 0;
x = 0;
while (x < _root.goalsheep) {
e = _root.sheepholder.attachMovie("sheepicon", "sheepicon" + x, x);
e._x = (30 * x) + 5;
x++;
}
t = 0;
while (t < _root.goalgoats) {
w = _root.goatholder.attachMovie("goaticon", "goaticon" + t, t);
w._x = (30 * t) + 5;
t++;
}
_root.guycount = 0;
_root.guylimit = _root.guylimit + 2;
_root.speed = _root.speed + 0.5;
_root.counter = 0;
_root.interval = _root.interval - 1;
_root.heavenarrow._visible = false;
_root.hellarrow._visible = false;
_root.theend = false;
_root.dudes.transition.gotoAndPlay("close");
_root.transition = false;
}
Symbol 114 Button
on (release) {
g = 5;
while (g < 20) {
u = eval ("_root.sheepholder.sheepicon" + g);
f = eval ("_root.goatholder.goaticon" + g);
u.unloadMovie();
f.unloadMovie();
g++;
}
_root.level = 1;
_root.goalaccuracy = 60;
_root.goalthing = _root.goalaccuracy;
_root.goalsheep = 5;
_root.goalgoats = 5;
_root.gottensheep = 0;
_root.gottengoats = 0;
_root.misses = 0;
_root.masterscore = 0;
_root.unloadcount = 0;
_root.guycount = 0;
_root.guylimit = 20;
_root.speed = 2;
_root.counter = 0;
_root.interval = 20;
_root.heavenarrow._visible = false;
_root.hellarrow._visible = false;
_root.theend = false;
_root.dudes.transition.gotoAndPlay("close");
_root.transition = false;
x = 0;
while (x < _root.goalsheep) {
e = _root.sheepholder.attachMovie("sheepicon", "sheepicon" + x, x);
e._x = (30 * x) + 5;
trace(e);
x++;
}
t = 0;
while (t < _root.goalgoats) {
w = _root.goatholder.attachMovie("goaticon", "goaticon" + t, t);
w._x = (30 * t) + 5;
t++;
}
}
Symbol 120 Button
on (release) {
_root.gottensheep = 0;
_root.gottengoats = 0;
_root.misses = 0;
_root.unloadcount = 0;
_root.guycount = 0;
_root.counter = 0;
_root.masterscore = 0;
_root.heavenarrow._visible = false;
_root.hellarrow._visible = false;
_root.theend = false;
_root.dudes.transition.gotoAndPlay("close");
_root.transition = false;
x = 0;
while (x < _root.goalsheep) {
e = _root.sheepholder.attachMovie("sheepicon", "sheepicon" + x, x);
e._x = (30 * x) + 5;
x++;
}
t = 0;
while (t < _root.goalgoats) {
w = _root.goatholder.attachMovie("goaticon", "goaticon" + t, t);
w._x = (30 * t) + 5;
t++;
}
}
Symbol 124 MovieClip [transition] Frame 1
var guyperc = (((_root.gottensheep + _root.gottengoats) / ((_root.goalsheep + _root.goalgoats) + _root.misses)) * 100);
_root.accuracy = Math.round(guyperc);
_root.useableaccuracy = Math.round(guyperc);
_root.masterscore = _root.masterscore + _root.accuracy;
if (_root.useableaccuracy >= _root.goalaccuracy) {
_root.select.start();
} else {
_root.asplode.start();
}
this.onEnterFrame = function () {
if (_root.useableaccuracy >= _root.goalaccuracy) {
this.tranny.nextwave._visible = true;
this.tranny.restart._visible = false;
this.tranny.accomplished._visible = true;
this.tranny.missed._visible = false;
this.tranny.retry._visible = false;
} else {
this.tranny.nextwave._visible = false;
this.tranny.restart._visible = true;
this.tranny.accomplished._visible = false;
this.tranny.missed._visible = true;
this.tranny.retry._visible = true;
}
if (_root.level >= 12) {
this.tranny.download._visible = true;
} else {
this.tranny.download._visible = false;
}
};
Symbol 124 MovieClip [transition] Frame 12
stop();
Symbol 124 MovieClip [transition] Frame 21
_root.dudes.transition.unloadMovie();
Symbol 129 Button
on (release) {
gotoAndStop (2);
}
Symbol 158 MovieClip Frame 86
this.unloadMovie();
stop();