Frame 1 (42 B)
ifFrameLoaded (6) {
gotoAndStop (4);
}
Frame 3 (17 B)
gotoAndPlay (1);
Frame 4 (692 B)
_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(200) + 150;
_root.ArrSheep[index]._x = random(450) + 30;
index++;
}
stop();
Instance of Symbol 9 MovieClip "sheep" in Frame 4 (21 B)
/* no clip actions */
Frame 5 (55 B)
stop();
_root.sheepmover.stop();
_root.timer.stop();
Symbol 8 MovieClip Frame 1 (57 B)
sheepaction = "default";
stop();
soundbubbles.stop();
Symbol 9 MovieClip Frame 1 (1.16 KiB) ●
function moveSheep() {
sheepPen();
if (_root.gamemodepen2 == 1) {
sheepPen2();
}
this.sheep.gotoAndStop(1);
this.sheepspeed = random(4) + _root.basespeed;
if (this._x < 40) {
this._x = 50;
} else if (490 < this._x) {
this._x = 480;
} else if (this._y < 100) {
this._y = 110;
} else if (390 < this._y) {
this._y = 380;
} 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 = 150;
} else if (this.hitTest(_root.fencehit2)) {
this._x = 240;
} else if (this.hitTest(_root.fencehit3)) {
this._x = 260;
} else if (this.hitTest(_root.fencehit4)) {
this._x = 360;
} else if (this.hitTest(_root.fencehit5) or this.hitTest(_root.fencehit6)) {
this._y = 250;
} else if (this.hitTest(_root.fencehit7)) {
this._y = 340;
}
}
Symbol 12 MovieClip Frame 1 (1.01 KiB) ●
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 = _root.inpen;
_root.escapedtotal = _root.escaped;
}
moveSheep();
Symbol 12 MovieClip Frame 2 (13 B)
moveSheep();
Symbol 15 MovieClip Frame 1 (1.26 KiB) ●
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.scoretimer = (trialrest + ":") + trialhund;
_root.scoretimerraw = trialrest + trialhund;
_root.trialtimer = (trialrest + ":") + trialhund;
Symbol 32 Button (55 B)
on (release) {
_root.gotoAndStop("classicgameplay");
}
Symbol 37 Button (34 B)
on (release) {
gotoAndStop (4);
}