Frame 1
_root.bar._visible = 0;
_root.movieloaded = _root.getBytesLoaded();
_root.movietotal = _root.getBytesTotal();
if (_root.movieloaded == _root.movietotal) {
_root.gotoAndPlay("home");
} else {
_root.bar._visible = 1;
_root.movieresult = (_root.movieloaded * 100) / _root.movietotal;
_root.bar.gotoAndStop(int(_root.movieresult));
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
index = 0;
while (index < amountsheep) {
removeMovieClip(_root.ArrSheep[index]);
index++;
}
stopAllSounds();
Frame 4
_root.gamemode = "classic";
_root.basespeed = 8;
_root.gamemodenoescape = 0;
ArrJumps = new Array();
ArrJumps[0] = _root.jump1;
ArrJumps[1] = _root.jump2;
ArrJumps[2] = _root.jump3;
ArrJumps[3] = _root.jump4;
_root.timerold = getTimer();
_root.sheepmover.play();
_root.timer.play();
_root.inpen = 0;
_root.escaped = 0;
_root.amountsheep = 8;
_root.pushzone = random(25) + 125;
ArrSheep = new Array();
index = 0;
while (index < amountsheep) {
duplicateMovieClip ("_root.sheep", "sheep" + index, index);
ArrSheep[index] = eval ("_root.sheep" + index);
_root.ArrSheep[index]._y = random(420) + 30;
_root.ArrSheep[index]._x = random(570) + 30;
index++;
}
stop();
Instance of Symbol 80 MovieClip "sheep" in Frame 4
/* no clip actions */
Frame 5
stop();
_root.sheepmover.stop();
_root.timer.stop();
_root.msg = ((("Welldone you " + inpentotal) + " sheep in ") + _root.trialtimerraw) + " seconds";
Symbol 19 Button
on (release) {
this.play();
}
Symbol 25 MovieClip Frame 1
stop();
Symbol 42 Button
on (release) {
_root.gotoAndPlay("classicgame");
}
Symbol 46 Button
on (release) {
getURL ("http://www.sheepgame.co.uk", "_blank");
}
Symbol 49 Button
on (release) {
getURL ("http://www.sheepgame.co.uk", "_blank");
}
Symbol 74 Button
on (rollOver) {
soundbaa = new Sound();
soundbaa.attachSound("soundbaa");
soundbaa.start();
}
Symbol 79 MovieClip Frame 1
sheepaction = "default";
stop();
soundbubbles.stop();
Symbol 79 MovieClip Frame 2
sheepaction = "water";
stop();
soundbubbles = new Sound();
soundbubbles.attachSound("soundbubbles");
soundbubbles.start(0, 999);
Symbol 79 MovieClip Frame 3
sheepaction = "jump";
play();
soundboing = new Sound();
soundboing.attachSound("soundboing");
soundboing.start();
Symbol 79 MovieClip Frame 18
sheepaction = "default";
gotoAndStop (1);
Symbol 79 MovieClip Frame 19
sheepaction = "mud";
soundsplat = new Sound();
soundsplat.attachSound("soundsplat");
soundsplat.start();
Symbol 80 MovieClip Frame 1
function moveSheep() {
this.sheepaction = "default";
if (this.sheep.sheepaction != "jump") {
sheepPen();
if (_root.gamemodepen2 == 1) {
sheepPen2();
}
if (this.sheepaction == "default") {
with (this.sheep) {
gotoAndStop(1);
}
this.sheepspeed = random(4) + _root.basespeed;
index = 0;
while (index < _root.ArrJumps.length) {
if (this.hitTest(_root.ArrJumps[index])) {
this.sheepspeed = _root.basespeed * 2;
this.sheep.gotoAndPlay("jump");
this.sheepaction = "jump";
}
index++;
}
}
}
if (this._x < 10) {
sheepEscape();
} else if (630 < this._x) {
sheepEscape();
} else if (this._y < 10) {
sheepEscape();
} else if (470 < this._y) {
sheepEscape();
} else {
ymov = this.sheepspeed * Math.sin((Math.PI/180) * this._rotation);
xmov = this.sheepspeed * Math.cos((Math.PI/180) * this._rotation);
this._x = this._x + xmov;
this._y = this._y + ymov;
}
}
function sheepEscape() {
_root.escaped++;
this.removeMovieClip();
}
function sheepPen() {
if (this.hitTest(_root.penhit1)) {
this.inpen = 1;
} else {
this.inpen = 0;
}
if (this.hitTest(_root.fencehit1)) {
this._x = 210;
} else if (this.hitTest(_root.fencehit2)) {
this._x = 290;
} else if (this.hitTest(_root.fencehit3)) {
this._x = 330;
} else if (this.hitTest(_root.fencehit4)) {
this._x = 420;
} else if (this.hitTest(_root.fencehit5) or this.hitTest(_root.fencehit6)) {
this._y = 300;
} else if (this.hitTest(_root.fencehit7)) {
this._y = 400;
}
}
function sheepPen2() {
if (this.hitTest(_root.pen2hit1)) {
this.inpen2 = 1;
} else {
this.inpen2 = 0;
}
if (this.hitTest(_root.fence2hit1)) {
this._x = 210;
} else if (this.hitTest(_root.fence2hit2)) {
this._x = 290;
} else if (this.hitTest(_root.fence2hit3)) {
this._x = 330;
} else if (this.hitTest(_root.fence2hit4)) {
this._x = 420;
} else if (this.hitTest(_root.fence2hit5) or this.hitTest(_root.fence2hit6)) {
this._y = 180;
} else if (this.hitTest(_root.fence2hit7)) {
this._y = 80;
}
}
Symbol 83 MovieClip Frame 1
function moveSheep() {
if ((_root.escaped + _root.inpen) == _root.amountsheep) {
_root.gotoAndStop("classicgameend");
}
dtr = (Math.PI/180);
_root.inpen = 0;
index = 0;
while (index < _root.amountsheep) {
if (((((_root.ArrSheep[index]._y - _root.pushzone) < _root._ymouse) && (_root._ymouse < (_root.ArrSheep[index]._y + _root.pushzone))) && ((_root.ArrSheep[index]._x - _root.pushzone) < _root._xmouse)) && (_root._xmouse < (_root.ArrSheep[index]._x + _root.pushzone))) {
dx = _root.ArrSheep[index]._x - _root._xmouse;
dy = _root.ArrSheep[index]._y - _root._ymouse;
angle = (Math.atan(dy / dx) * 1) / dtr;
if (_root._xmouse < _root.ArrSheep[index]._x) {
} else {
angle = angle - 180;
}
_root.ArrSheep[index]._rotation = angle;
_root.ArrSheep[index].moveSheep();
}
_root.inpen = _root.inpen + _root.ArrSheep[index].inpen;
index++;
}
_root.inpentotal = "Caught: " + _root.inpen;
_root.escapedtotal = "Escaped: " + _root.escaped;
}
moveSheep();
Symbol 83 MovieClip Frame 2
moveSheep();
Symbol 87 MovieClip Frame 1
soundbirds = new Sound();
soundbirds.attachSound("soundbirds");
soundbirds2 = new Sound();
soundbirds2.attachSound("soundbirds2");
soundcrickets = new Sound();
soundcrickets.attachSound("soundcrickets");
Symbol 87 MovieClip Frame 2
index = random(25);
if (index == 1) {
soundbirds.start();
}
if (index == 2) {
soundbirds2.start();
}
if (index == 3) {
soundcrickets.start();
}
Symbol 87 MovieClip Frame 25
gotoAndPlay (2);
Symbol 95 MovieClip Frame 1
function lapfinished() {
this.laptime = getTimer() - _root.timerold;
_root.timer.stop();
if ((_root.bestlap == "none") or (this.laptime < _root.bestlap)) {
_root.bestlap = this.laptime;
this.bestraw = _root.bestlap.toString();
this.bestlength = this.bestraw.length;
this.bestpos1 = this.bestlength - 1;
this.bestpos2 = this.bestlength - 3;
this.bestpos3 = this.bestlength - 3;
this.bestmilli = this.bestraw.substr(this.bestpos1, 2);
this.besthund = this.bestraw.substr(this.bestpos2, 2);
this.bestrest = this.bestraw.substr(0, this.bestpos3);
_root.bestdisplay = (("BEST: " + this.bestrest) + ":") + this.besthund;
_root.trialtimer = (("TIME: " + this.bestrest) + ":") + this.besthund;
}
}
function startTimer() {
_root.timerold = getTimer();
this.play();
}
trialtime = getTimer() - _root.timerold;
trialraw = trialtime.toString();
triallength = trialraw.length;
trialpos1 = triallength - 1;
trialpos2 = triallength - 3;
trialpos3 = triallength - 3;
trialmilli = trialraw.substr(trialpos1, 2);
trialhund = trialraw.substr(trialpos2, 2);
trialrest = trialraw.substr(0, trialpos3);
_root.trialtimerraw = trialrest;
_root.trialtimer = (("TIME: " + trialrest) + ":") + trialhund;
Symbol 101 Button
on (release) {
gotoAndStop (3);
}
Symbol 105 Button
on (release) {
_root.gotoAndStop("classicgame");
}